MCP Quickstart
Add your first MCP server to Command Code in under a minute.
Add an MCP server
Pick one transport:
Add MCP Server
cmd mcp add --transport http <name> <url>
Example:
Examples
cmd mcp add --transport http notion https://mcp.notion.com/mcp
Authenticate if prompted
Some remote servers require OAuth. Open the MCP menu:
/mcp
Follow the browser prompt to log in. Tokens are stored securely and refreshed automatically.
If needed, pass auth headers:
cmd mcp add --transport http private-api https://api.company.com/mcp \
--header "X-API-Key: your-key-here"
All options (--transport, --env, --scope, --header) must come before the server name. -- separates the server name from the local command for stdio servers.
Verify connection
List your configured servers:
cmd mcp list
Or inspect one server:
cmd mcp get notion
Inside a session, /mcp shows connection status and available tools.
Try it out
Start a session:
cmd
Then ask naturally:
Create a note on Notion named "API Design v2".
Command Code automatically discovers and calls the right MCP tools based on your request.
Optional: Add MCP servers from JSON
For complex setups, use JSON:
cmd mcp add-json my-server '{
"transport": "http",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}'
Example
GitHub MCP Server
cmd mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer ghp_xxx"}}'
For copying configs between machines or scripting:
- The JSON accepts
typeas an alias fortransport. - Environment variables in config values (like
${API_KEY}) are resolved at runtime.
Optional: Import from Claude Desktop
If you already configured MCP servers in Claude Desktop:
cmd mcp add-from-claude-desktop
You will get an interactive picker for which servers to import.
- Check out our MCP Examples to see real-world MCP server examples
- Join our Discord community for support