MCP servers
Connect Model Context Protocol servers over stdio or HTTP to give the agent new tools and resources.
The Model Context Protocol (MCP) is an open standard for connecting agents to tools and data: issue trackers, databases, browsers, design tools, internal APIs. Cusp is an MCP client. Any server that works with another MCP client works with Cusp.
Configuration files
| Scope | File | Use it for |
|---|---|---|
| Project | .cusp/mcp.json, or .mcp.json at the repository root | Servers the whole team uses. Commit the file |
| User | ~/.cusp/mcp.json, or mcpServers in ~/.claude.json | Servers you want in every project |
| Local | projects["<path>"].mcpServers in ~/.claude.json | Personal servers for one project |
| Settings | mcpServers in any settings file | Servers defined alongside other settings |
| Managed | managed-mcp.json in the managed settings directory | Organization policy. When present, it has exclusive control |
All files share one format:
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" }
},
"postgres": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "${DATABASE_URL}"]
}
}
}When two scopes define a server with the same name, the higher scope's whole entry wins; fields are not merged. From highest to lowest: managed, command line, local, project, user, settings, then servers declared by subagents. Within a scope, .cusp/ files win over .mcp.json and ~/.claude.json.
Transports
stdio
Cusp starts the server as a child process and talks to it over stdin and stdout.
| Field | Meaning |
|---|---|
type | "stdio" (the default when command is set) |
command | The executable |
args | Arguments |
env | Extra environment variables |
cwd | Working directory |
timeout | Startup and request timeout |
HTTP
Cusp connects to a remote server using the streamable HTTP transport, and falls back to the older SSE transport for servers that only support that.
| Field | Meaning |
|---|---|
type | "http" (or "sse" for SSE-only servers) |
url | The server endpoint |
headers | Request headers, for example an Authorization header |
headersHelper | A command whose output supplies headers, for tokens that expire |
timeout | Request timeout |
Common fields
| Field | Meaning |
|---|---|
alwaysLoad | Load this server's tools up front instead of deferring them |
Variables
${VAR} in any string is replaced with the environment variable VAR when the server starts. ${CUSP_PROJECT_DIR} and ${CLAUDE_PROJECT_DIR} are set to the project root. Keep secrets in your environment, not in committed files.
Expanded values, including any secrets, are never shown to the model.
Approving project servers
A project's .mcp.json comes from whoever wrote the repository. Before Cusp connects to a server defined there, you approve it. The approval is tied to a hash of the exact entry, so if someone changes the command or URL later, Cusp asks again.
You can pre-approve in settings:
| Setting | Effect |
|---|---|
enabledMcpjsonServers: ["github"] | Approve these project servers |
disabledMcpjsonServers: ["postgres"] | Reject these |
enableAllProjectMcpServers: true | Approve every server in the project's file |
In an untrusted workspace, the project's own settings can't approve its servers.
Tools and resources
Each server tool becomes a Cusp tool named mcp__<server>__<tool>. The input schema is the server's own JSON Schema.
MCP tools are deferred by default: the model sees their names and loads the definitions with ToolSearch when it needs one. This keeps a server with fifty tools from filling the context on every turn. Set alwaysLoad: true on a server whose tools the agent needs constantly.
Two built-in tools give access to server resources: ListMcpResourcesTool and ReadMcpResourceTool.
Permissions
MCP tools go through the permission engine like any other tool.
{
"permissions": {
"allow": ["mcp__github__get_issue", "mcp__github__list_pull_requests"],
"ask": ["mcp__github__*"],
"deny": ["mcp__postgres__execute"]
}
}| Rule | Matches |
|---|---|
mcp__github | Every tool on the github server |
mcp__github__* | The same, written as a wildcard |
mcp__github__create_issue | One tool |
Per-agent servers
A subagent can list servers in its frontmatter, either by name or as an inline definition. Inline servers are available only to that agent. See Agents.
Troubleshooting
- The server doesn't appear. Check that it's approved (project servers) and that the command runs on its own in a terminal.
- Tools are missing. They're deferred. Ask the agent to use the tool by name, or set
alwaysLoad. - Variables come through empty.
${VAR}reads from the daemon's environment. An app started from the Dock or Start menu may not see variables exported in your shell profile. Check with the CLI started from a terminal, which does.
Hooks
Run your own commands, HTTP calls or model checks at fixed points in the agent loop, with the hook events and JSON protocol your existing hooks already use.
Cusp Hub
A catalog of extensions and blueprints with capability labels, security scanning and pinned, verifiable installs. What works today, and what's still in preview.