Skip to content

keycard-upsert-mcp-config

Add an MCP server entry to your project's .mcp.json.

Add an MCP server entry to your project’s .mcp.json.

Use this skill when you want to add an MCP server to .mcp.json. It writes only to the project’s .mcp.json, never to your user-level MCP config.

The skill only adds new servers. If .mcp.json already has a server with that name, it stops with an error rather than overwrite it. Use a different name, or remove the existing entry first.

Do not use this skill to set a keycard.toml field (use keycard-upsert-config).

Two invocation forms are supported:

  • HTTP transport (e.g. Keycard gateway URLs): add "<name>" type=http url="<url>"
  • Stdio transport (local process-based servers): add "<name>" command="<cmd>" args=[...] env={...}

type defaults to stdio when not specified. The name can use letters, digits, ., _, and -, up to 64 characters.

  • “Add an MCP server called my-server using npx with args -y @my/mcp-server”
  • “Add a local MCP tool at /usr/local/bin/my-mcp”
  • “Add an HTTP MCP server called granola at https://granola.mcp.example.com/sse”