MCP server
Wire Foyer into any MCP-aware agent.
@getfoyer/mcp is a Model Context Protocol server. Wire Foyer into any
MCP-aware agent (Claude Code, Codex, Cursor, Windsurf, …) so the agent
can pull intent, repair prompts,
plan artifacts, and blockers directly — same surface the GitHub App uses.
Run foyer login first so a token exists at ~/.foyer/credentials. See
the CLI reference for what login does and where the credentials
live.
Install (Claude Code)
claude mcp add foyer \
--scope user \
--env FOYER_TOKEN="$(jq -r .token ~/.foyer/credentials)" \
-- npx -y @getfoyer/mcp@latestThe MCP server defaults to https://api.getfoyer.dev. Only set
FOYER_API_URL if you're pointing at a non-production deployment.
Why the jq? Reading the token directly from the file (instead of via
shell variable or copy-paste) strips any trailing newline — that newline is
the -32000 MCP JSON-RPC error footgun.
If ~/.foyer/credentials is plain text instead of JSON (older CLI), swap:
--env FOYER_TOKEN="$(tr -d '[:space:]' < ~/.foyer/credentials)"Install (other MCP clients)
{
"mcpServers": {
"foyer": {
"command": "npx",
"args": ["-y", "@getfoyer/mcp@latest"],
"env": {
"FOYER_TOKEN": "<paste the .token field from ~/.foyer/credentials>"
}
}
}
}Verify
In Claude Code: run /mcp — foyer should show up green with the tool
list. If the entry is red, see troubleshooting.