
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
fastly-mcp-server
Advanced tools
A Model Context Protocol (MCP) server implementation for the Fastly API that enables AI assistants to interact with Fastly CDN services.
This package provides an MCP server that allows AI models to interact with the Fastly API through a standardized protocol. It implements the Model Context Protocol specification, enabling AI assistants to execute operations on the Fastly CDN platform like:
Recommendation: Bun is the preferred runtime for fastly-mcp-server due to its superior performance and startup time.
# With Bun (recommended)
bun add -g fastly-mcp-server
# With npm
npm install -g fastly-mcp-server
# With yarn
yarn global add fastly-mcp-server
# With pnpm
pnpm add -g fastly-mcp-server
# With Bun (recommended)
bun add fastly-mcp-server
# With npm
npm install fastly-mcp-server
# With yarn
yarn add fastly-mcp-server
# With pnpm
pnpm add fastly-mcp-server
# Using bunx (recommended, no installation required)
bunx fastly-mcp-server@latest run
# If installed globally with Bun
fastly-mcp-server run
# Using npx (Node.js alternative)
npx fastly-mcp-server@latest run
{
"mcpServers": {
"fastly api": {
"command": "bunx",
"args": ["fastly-mcp-server@latest", "run"],
"env": {
"API_KEY_APIKEYAUTH": "your-fastly-api-key"
}
}
}
}
{
"mcpServers": {
"fastly": {
"command": "npx",
"args": ["-y", "fastly-mcp-server@latest", "run"],
"env": {
"API_KEY_APIKEYAUTH": "your-fastly-api-key"
}
}
}
}
The server requires a Fastly API key to authenticate with the Fastly API. You can provide this in several ways:
export API_KEY_APIKEYAUTH=your-fastly-api-key
Create a .env
file in your project root:
API_KEY_APIKEYAUTH=your-fastly-api-key
As shown in the usage examples above, you can provide the API key in the environment variables section of your AI assistant's configuration.
The server will automatically set the Fastly-Key
header with your API key for all requests to the Fastly API.
To get a Fastly API key for use with the MCP server:
API_KEY_APIKEYAUTH
in your configurationImportant Security Notes:
The server provides comprehensive tools for interacting with the Fastly API:
Many API endpoints require path parameters such as service_id
or version_id
. When using these tools, you must provide these parameters in your request:
// To get service details
{
"service_id": "3ELXhLGOuQTQvW9NR3wlWD"
}
// To list versions for a service
{
"service_id": "3ELXhLGOuQTQvW9NR3wlWD"
}
// To activate a version
{
"service_id": "3ELXhLGOuQTQvW9NR3wlWD",
"version_id": "2"
}
// To purge a specific URL
{
"url": "www.example.com/path/to/resource"
}
Here are some common workflows you can implement with this MCP server:
# Clone the repository
git clone https://github.com/jedisct1/fastly-openapi-schema.git
cd fastly-openapi-schema/fastly-mcp-server
# Install dependencies (with Bun, recommended)
bun install
# Or with npm
npm install
# Build the server (with Bun, recommended)
bun run build
# Or with npm
npm run build
# Run type checking (with Bun, recommended)
bun run typecheck
# Or with npm
npm run typecheck
MIT
FAQs
MCP Server for the Fastly API
We found that fastly-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.