Everything above has the agent work with mapping files. Traffic Parrot
also speaks the
Model Context Protocol (MCP), so
an assistant can work with the running instance itself: read the mappings it is
serving, the requests that have arrived and the scenarios defined, and change
them, without you pasting JSON into the conversation or copying it back out.
Traffic Parrot serves the endpoint itself: nothing extra to install, no separate
process. It is on the management port (8080 by default) and, unlike
the rest of the management API, not under /api:
http://localhost:8080/mcp
The trusted-network guidance above
matters more here: six of the twelve tools change what the instance is serving.
Anything that can lose work takes dryRun, and it defaults to
true: a call that leaves it out previews and changes nothing, so an
assistant shows you what it would do before it does it. A mapping change is
written through to the selected scenario's mapping files. The
tools themselves, with their arguments and what each
preview returns, and the protocol detail (the handshake, the headers, and the
curl calls to check the endpoint by hand) are on the
MCP endpoint reference page; your client shows the same
tool catalogue.
Give the assistant the brief
The install directory ships AGENTS.md, a brief written for the
assistant rather than for you: the endpoint, how to register it in Claude Code,
GitHub Copilot CLI, Cursor and Antigravity, the ground rules, the twelve tools
and the workflows an assistant is most often asked for. Copy it into the
repository you work in, or point the assistant at it, and the assistant starts
out knowing all of that without you explaining it in every conversation. If
your client does not pick up AGENTS.md by name, name the file in
your prompt or reference it from the client's own instructions file.
Point your client at it
Claude Code, from the folder you work in:
claude mcp add --transport http traffic-parrot http://localhost:8080/mcp
The same server as JSON, here in Claude Code's .mcp.json; other
clients read the same mcpServers shape from their own configuration
file:
{
"mcpServers": {
"traffic-parrot": { "type": "http", "url": "http://localhost:8080/mcp" }
}
}
Then ask the assistant what the instance is serving. In Claude Code,
/mcp shows the connection and the twelve tools.
Who can reach it
By default the endpoint accepts requests from the machine Traffic Parrot is
running on and refuses everything else, which is the common case: the assistant
runs where you do. Nothing to configure, and no token to manage.
Traffic Parrot in a container with a published port is the usual exception: its
requests arrive from the container network, not loopback, so the default refuses
them. Set both of these in trafficparrot.properties (see the
Configuration Reference) and
restart:
trafficparrot.mcp.authenticator=BEARER_TOKEN
trafficparrot.mcp.token=a-secret-of-your-choosing
Every request must then carry Authorization: Bearer <token>,
which the client sends for you:
claude mcp add --transport http traffic-parrot http://localhost:8080/mcp \
--header "Authorization: Bearer a-secret-of-your-choosing"
A refused request says which property to change. The reference's
refusal table covers the token rules, the web UI
login, and how to tell the refusals apart.