fastly-mcp
fastly-mcp
Fastly REST API 用の Node.js Model Context Protocol サーバーです。stdio および Streamable HTTP トランスポート、テナントスコープのユーザーまたはアカウント ID、永続的な Postgres 設定、永続的な Vault シークレットをサポートします。
保証
すべての Fastly リクエストは、呼び出し元のユーザースコープの
Fastly-Keyを使用します。プロセス内に共有 Fastly トークンは設定されません。トークン素材は、Vault の
fastly/tenants/<tenant>/{users|accounts}/<principal>/http/auth/token-index/fastlyにのみ書き込まれます。非シークレット設定は、テナント、プリンシパルタイプ、プリンシパル ID、キーでキー付けされた Postgres テーブル
fastly_configを使用します。ミューテーションには、その環境変数が設定されている場合、
authorizationKeyツールパラメータを通じてMCP_ADMIN_AUTH_KEYが必要です。service_api_requestは、このサーバーリリース後に追加された API を含む、文書化されたすべての Fastly メソッドとパスをサポートします。
Related MCP server: Terros MCP Server
ツール
service_query_suggestion は読み取り専用のスキーマ探索です。意図や正しい Fastly ルートが不明な場合に使用します。推奨される前提条件、安全チェック、ツールスキーマ、例を返します。
service_connection_info と service_scope_info は、読み取り専用のランタイムおよびテナント/アカウント探索ツールです。運用ワークフローの前に使用してください。
service_health_check は、ユーザートークンで GET /tokens/self を呼び出します。fastly_list_services は GET /service を呼び出します。fastly_list_versions は GET /service/:service_id/version を呼び出します。
service_api_request は、全範囲をカバーする脱出ハッチです。method、path、オプションの query、body、headers、および必須の fastlyToken を受け入れます。GET/HEAD は読み取り専用です。POST/PUT/PATCH/DELETE はミューテーションであり、設定されている場合は authorizationKey が必要です。
fastly_purge_service は高リスクであり、POST /service/:service_id/purge_all を呼び出します。サービス ID を確認し、管理者キーを使用してください。fastly_update_user_token は高リスクであり、置換トークンを Vault に永続化します。userId または accountId のいずれか 1 つだけを、tenantId、fastlyToken、および管理者キーとともに指定してください。
すべての応答には、{ "ok": true, "status": 200, "data": {} } の形の JSON テキストが含まれます。失敗時は MCP の isError を設定し、{ "ok": false, "status": 4xx, "error": "..." } を返します。シークレットのように見えるフィールドは、デフォルトで編集されます。
設定
.env.example を .env にコピーします。POSTGRES_*、VAULT_ADDR、VAULT_TOKEN または Vault Agent 設定、および MCP_ADMIN_AUTH_KEY を設定します。TARGET_SERVICE_BASE_URL はデフォルトで https://api.fastly.com になります。MCP_TRANSPORT_MODE=stdio、http、または both を使用します。
docker compose up -d postgres vault でローカル依存関係を実行し、vault-production/README.md に従って Vault を初期化します。npm start でサーバーを起動するか、HTTP の場合は npm run start:http を使用します。HTTP エンドポイントはデフォルトで http://127.0.0.1:3000/mcp であり、ベアラートークンが必要です。
外部サービスモード
Fastly MCP が外部の Vault および Postgres サービスに接続する場合は、docker-compose.external.yml を使用します。アプリのみの Compose サービスを開始する前に、POSTGRES_HOST、VAULT_ADDR、および対応する資格情報を設定します。
インベントリとテスト
npm run inventory:generate は、Fastly の API リファレンスインデックス、または FASTLY_OPENAPI_URL で提供される JSON OpenAPI ドキュメントを取得し、artifacts/fastly-openapi-endpoints.json に書き込みます。このアーティファクトはコミットされ、生成によって変更された場合 CI は失敗します。
npm test は、Fastly クライアント、MCP 認可、永続化をサポートするインフラストラクチャ、HTTP、および Vault のテストを実行します。GitHub Actions は、テストジョブの前にインベントリ生成を実行します。
MCP クライアント登録
{
"mcpServers": {
"fastly-mcp": {
"command": "npm",
"args": ["run", "start:stdio"],
"cwd": "/Users/{user}/Documents/GitHub/fastly-mcp"
}
}
}開発メモ
Fastly API は TLS 1.2 以降を使用し、読み取り、書き込み、パージの各制限を個別に適用します。同じサービスへの同時書き込みは避けてください。fastlyToken の値をログに記録したりコミットしたりしないでください。このプロジェクトは MIT ライセンスの下でリリースされています。LICENSE を参照してください。
Maintenance
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables interaction with Slack workspaces as a user, supporting channel listing, message posting, threading, reactions, and user management via the Slack API.811MIT
- FlicenseAqualityNot gradedmaintenanceEnables interaction with the Terros platform's User API to manage and retrieve user profiles. Users can fetch authenticated account details, list users with filters, and lookup specific user information by ID.6
- FlicenseNot gradedqualityDmaintenanceProvides tools to interact with the Attio API, enabling management of resources in an Attio workspace.5
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Vercel API to manage deployments, domains, projects, and environment variables.1,774MIT
Related MCP Connectors
Access the Notra API for managing posts, brand identities, integrations, and schedules.
Issue, rotate and revoke scoped API-key passes for 25+ providers — the agent never sees a real key
34 production API tools over one hosted MCP endpoint.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LesterAJohn/fastly-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server