用于AI驱动的Fastly CDN管理模型上下文协议(MCP)服务器。
概览
Fastly MCP 服务器允许 MCP 客户端使用 Fastly API。 连接到Claude Desktop、Claude Code、Gemini CLI、Opencode、Qwen Code、Cline或Swival等助手,赋予它Fastly API令牌,助手就能查询服务、检查域名和TLS设置、检查流量和使用情况、管理字典和ACL、清理内容,并在你要求时进行配置更改。 该项目正在积极开发,并支持Fastly一级开源支持。支持政策详见Fastly的开源文档。 欢迎在Fastly开发者工具社区论坛提出问题和反馈。 大多数MCP服务器为每个操作暴露一个工具。Fastly的API较大,因此该服务器使用较小的工作流程,更方便助手正确使用。 搜索工具通过关键词、方法名称、API 类或 HTTP 路径查找相关的 API 方法。
概述(AI 翻译)
Fastly MCP 服务器允许 MCP 客户端使用 Fastly API。
连接到Claude Desktop、Claude Code、Gemini CLI、Opencode、Qwen Code、Cline或Swival等助手,并赋予它一个Fastly API令牌。 助理随后可以:
- 查找服务,检查域名和TLS设置。
- 检查交通和使用情况。
- 管理词典和ACL。
- 清除内容并在要求时进行配置更改。
该项目正在积极开发,并支持Fastly的Tier 1开源。 支持政策在Fastly的开源文档中有描述。
欢迎在Fastly开发者工具社区论坛提出问题和反馈。
目录
- 工作原理
- 要求
- 安装
- 通过HTTP运行
- 为多个用户运行远程服务
- 利用服务器井
- 秘密加密
- 故障排除
- 地方发展
- 安全
- 许可证
它是如何运作的
大多数MCP服务器为每个操作暴露一个工具。 由于Fastly的API庞大,该服务器使用较少的工具集,助手可以一起使用。
-
以
search开始,通过关键词、方法名、API 类或 HTTP 路径查找 API 方法。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Fastly MCP Server
The Fastly MCP server lets MCP clients work with the Fastly API.
Connect it to an assistant such as Claude Desktop, Claude Code, Gemini CLI, Opencode, Qwen Code, Cline, or Swival, and give it a Fastly API token. The assistant can then:
- Look up services and inspect domains and TLS settings.
- Check traffic and usage.
- Manage dictionaries and ACLs.
- Purge content and make configuration changes when you ask it to.
This project is actively developed and has Tier 1 Fastly open-source support. The support policy is described in Fastly’s open-source documentation.
Questions and feedback are welcome on the Fastly developer tools community forum.
Contents
- How it works
- Requirements
- Installation
- Running over HTTP
- Running a remote service for several users
- Using the server well
- Secret encryption
- Troubleshooting
- Local development
- Security
- License
How it works
Most MCP servers expose one tool for each operation. Because Fastly’s API is large, this server uses a smaller set of tools that an assistant can use together.
-
Start with
searchto find API methods by keyword, method name, API class, or HTTP path. -
Then use
inspectto get a method’s documentation, including its parameters, return type, and an example. -
Once you have the details, use
executeto run a short JavaScript snippet with theFastlyclient already set up with your API token.
This keeps the tool list small while still covering every method documented in the bundled Fastly client docs.
Requirements
Runtime
Install either Bun or Node.js 24.12.0 or newer; you do not need both to run the server. Node.js is recommended for remote mode.
The examples use bunx, which downloads and runs the package without a global install.
With Node.js, use npx instead.
Use the full package and command names to avoid picking up an unrelated mcp command on your PATH:
- With
bunx:bunx -p @fastly/mcp fastly-mcp - With
npx:npx -p @fastly/mcp fastly-mcp - Explicitly using Bun:
bunx --bun -p @fastly/mcp fastly-mcp
The --bun option runs the package with Bun rather than following its Node.js shebang.
Fastly API token
You also need a Fastly API token. For everyday use, create the narrowest token that fits the work you expect the assistant to do:
- Start with a read-only token for investigation and reporting.
- Use a token with write access only when you actually want the assistant to make changes.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"fastly": {
"command": "bunx",
"args": ["-p", "@fastly/mcp", "fastly-mcp"],
"env": {
"FASTLY_API_TOKEN": "your-token-here"
}
}
}
}