Skip to content

Menu

Fastly MCP Server logo

Fastly MCP Server

Published

At a glance

GitHub repository
fastly/mcp
Watch out for
It depends on a locally installed and authenticated Fastly CLI, so it can only do what that CLI and the token's permissions allow.

Fastly publishes this server itself in the fastly/mcp repository on GitHub, under the MIT license, and lists it as an actively developed open-source project with Tier 1 support. It is a single Go binary called fastly-mcp that sits on top of the Fastly CLI. Rather than wrapping each Fastly API endpoint as its own tool, it lets an agent discover CLI commands, read their help, and run them with structured arguments.

By default it talks to the client over stdio. You can also start it with --http to serve on port 8080 (or a port you pick), and add --sse for Server-Sent Events. A CLI mode exists for testing commands by hand before you wire up an assistant.

Safety gets a lot of attention in the README. Commands run without a shell, arguments are checked against shell metacharacters, and anything that changes state needs a --user-reviewed flag that the agent should only add after you approve. Large outputs over 25KB are cached in memory with a preview, so the model does not get flooded with JSON.

How it connects

Your AI app

An assistant or agent that supports MCP

Fastly MCP Server

Gives the agent

  • Command discovery
  • Running CLI commands
  • Large result handling
  • Time context
  • Guarded writes
  • Output controls

Fastly

Signs in with

  • Token
Your AI app talks to Fastly MCP Server over the Model Context Protocol, and the server carries out the work. Built from the setup and capability sections on this page.

What it can do

Command discovery
fastly_list_commands returns the Fastly CLI commands the server allows, and fastly_describe gives detailed help for one, such as "service list".
Running CLI commands
fastly_execute runs a Fastly CLI command with a command name, an args array and a flags list, for example service list with the json flag.
Large result handling
Output above the cache threshold is stored for 10 minutes; fastly_result_read pages through it, fastly_result_query filters it, fastly_result_summary gives statistics and fastly_result_list shows what is cached.
Time context
current_time returns the current time as Unix, ISO, UTC and local values, which helps when the agent asks for stats over a time window.
Guarded writes
delete, purge, create, update, activate, deactivate and upload need the --user-reviewed flag, while auth, sso and profile commands are blocked outright.
Output controls
--allowed-commands and --allowed-commands-file restrict what can run, and --sanitize strips sensitive data from responses.

Setting it up

You need the Fastly CLI installed and on your PATH. Get the binary from the GitHub releases page, run go install github.com/fastly/mcp/cmd/fastly-mcp@latest, or clone the repo and run make build (the binary lands at ./bin/fastly-mcp). Authenticate the CLI first: check with fastly whoami, and if that fails, create an API token in the Fastly web interface and run fastly profile create to save it. The README advises against the FASTLY_API_TOKEN environment variable because the MCP server process may not inherit it. For Claude Code, run claude mcp add fastly /path/to/fastly-mcp. For Claude Desktop, add an mcpServers entry named fastly with "command" set to the binary path and an empty args array in claude_desktop_config.json, then restart the app. To try commands without a client, fastly-mcp list-commands and fastly-mcp describe service list work from the terminal.

Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)

Where it helps

  • List every Fastly service on the account with its domains and versions.
  • Pull traffic and cache hit ratio stats for a service and summarise what changed over the past day.
  • Help troubleshoot a spike in 5xx errors by checking backend configuration and recent stats.
  • Review ACL rules and TLS certificates during a security audit.
  • Prepare a backend change or cache purge and show the exact command for a human to approve before it runs.

Limitations and things to watch

  • It depends on a locally installed and authenticated Fastly CLI, so it can only do what that CLI and the token's permissions allow.
  • State-changing commands such as purge, activate and delete only run with --user-reviewed, and the agent is trusted to ask you before adding that flag.
  • Authentication, SSO and profile commands are blocked, so token setup has to be done by hand outside the agent.
  • Cached large results expire after 10 minutes of inactivity, so long sessions may need to rerun a command.
  • Setting FASTLY_API_TOKEN as an environment variable is not recommended for MCP clients, because the server process may not inherit it.

Sources

Written from the project's own documentation, checked November 2026.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…