MCP
MCP is a host talking to local stdio servers or remote Streamable HTTP servers.
Adding a server means writing a mcpServers entry. Do not print env values or
auth headers.
Classify
- Remote: a
https://…/mcpURL. Prefer/mcpover legacy/sse. - Local: a
commandplusargs(npx -y @playwright/mcp).
Name the server short, lowercase, no spaces. Infer from the URL or package when the user did not pick one.
Persist
Prefer the project .mcp.json unless the user said every project.
{
"mcpServers": {
"playwright": { "command": "npx", "args": ["-y", "@playwright/mcp"] },
"docs": { "url": "https://example.invalid/mcp" }
}
}
If a CLI exists (graff mcp add, or the host's equivalent), use it. Merge;
do not drop other servers. Do not commit secrets. OAuth stays the host's login
command.
Check
After writing, list tools or reconnect. If nothing appears, the command failed or the URL is wrong — do not invent a parallel config file.