Skip to content
Star -

Claude Desktop

Related Topics: Quickstart (first connection) | Deployment (production setup) | Common Tasks (quick how-to)

Claude Desktop has native Model Context Protocol (MCP) support, making it the easiest way to connect your MXCP endpoints to an AI assistant.

Claude Desktop’s configuration is stored in:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add your MXCP server to the configuration file:

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/absolute/path/to/your/project"
}
}
}

Important: Use absolute paths for cwd. Relative paths will fail.

If MXCP is installed in a virtual environment:

{
"mcpServers": {
"my-project": {
"command": "bash",
"args": [
"-c",
"cd /path/to/project && source /path/to/.venv/bin/activate && mxcp serve --transport stdio"
]
}
}
}

Or use the full path to the Python executable:

{
"mcpServers": {
"my-project": {
"command": "/path/to/.venv/bin/mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/path/to/project"
}
}
}

Connect multiple MXCP projects:

{
"mcpServers": {
"analytics": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/path/to/analytics-project"
},
"customer-support": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/path/to/support-project"
},
"inventory": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/path/to/inventory-project"
}
}
}

Pass environment variables to the server:

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/path/to/project",
"env": {
"MXCP_PROFILE": "production",
"DATABASE_URL": "postgresql://localhost/mydb"
}
}
}
}

After modifying the configuration:

  1. Save the configuration file
  2. Restart Claude Desktop completely (quit and reopen)
  3. Verify connection in Claude Desktop

You should see your tools available in Claude’s interface.

Claude automatically discovers your MXCP tools. Ask Claude:

“What tools do you have access to?”

Claude will list all available tools from your MXCP server.

Simply ask Claude to use your tools naturally:

“Can you find the user with ID 123?”

Claude will call the appropriate tool and return results.

Access MXCP resources:

“Show me the user profile for alice@example.com

Invoke MXCP prompts:

“Use the customer-analysis prompt to analyze this data”

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": [
"serve",
"--transport", "stdio",
"--log-level", "INFO"
],
"cwd": "/path/to/project"
}
}
}

Enable verbose logging:

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": [
"serve",
"--transport", "stdio",
"--log-level", "DEBUG"
],
"cwd": "/path/to/project"
}
}
}

Use a specific MXCP profile:

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": [
"serve",
"--transport", "stdio",
"--profile", "production"
],
"cwd": "/path/to/project"
}
}
}

Symptoms: Claude doesn’t show your tools

Check:

  1. Configuration file syntax is valid JSON
  2. Paths are absolute and correct
  3. MXCP is installed and in PATH
  4. Project has valid mxcp-site.yml

Test manually:

Terminal window
cd /path/to/project
mxcp serve --transport stdio

Type {"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}} and press Enter.

Symptoms: Claude reports errors when using tools

Check:

  1. Run mxcp validate in your project
  2. Run mxcp test to verify functionality
  3. Check Claude’s developer console for errors

Symptoms: “Permission denied” or similar errors

Check:

  1. Virtual environment activation
  2. File permissions on project directory
  3. Database connection permissions

Symptoms: Tools take long to respond

Optimize:

  1. Check database query performance
  2. Enable caching where appropriate
  3. Use materialized views for complex queries

Access Claude Desktop’s developer console:

  1. macOS: Cmd + Option + Shift + I
  2. Windows/Linux: Ctrl + Shift + Alt + I

Look for:

  • Connection errors
  • Request/response timing
  • Error messages

Check MCP server logs for detailed error information:

  • macOS: ~/Library/Logs/Claude/mcp*.log
  • Windows: %APPDATA%\Claude\logs\mcp*.log

If you see ENOENT errors referencing ${APPDATA}, add the expanded path to the env key:

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "C:\\path\\to\\project",
"env": {
"APPDATA": "C:\\Users\\YourUsername\\AppData\\Roaming"
}
}
}
}
{
"mcpServers": {
"sales-analytics": { ... },
"customer-support-tools": { ... }
}
}

Always verify your MXCP project works:

Terminal window
cd /path/to/project
mxcp validate
mxcp test
mxcp serve --transport stdio

Begin with a single tool to verify the connection:

tools/hello.yml
mxcp: 1
tool:
name: hello
description: Test tool that says hello
return:
type: string
source:
code: "SELECT 'Hello from MXCP!'"
tests:
- name: test_hello
result: "Hello from MXCP!"

Keep an eye on logs during development:

{
"mcpServers": {
"my-project": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio", "--log-level", "INFO"],
"cwd": "/path/to/project"
}
}
}
{
"mcpServers": {
"dev-server": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio", "--profile", "dev"],
"cwd": "/path/to/project"
},
"prod-server": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio", "--profile", "prod"],
"cwd": "/path/to/project"
}
}
}

Complete example with multiple projects:

{
"mcpServers": {
"sales-data": {
"command": "/home/user/.venv/bin/mxcp",
"args": [
"serve",
"--transport", "stdio",
"--profile", "production",
"--log-level", "INFO"
],
"cwd": "/home/user/projects/sales-mcp",
"env": {
"WAREHOUSE_HOST": "analytics.company.com"
}
},
"support-tools": {
"command": "mxcp",
"args": ["serve", "--transport", "stdio"],
"cwd": "/home/user/projects/support-mcp"
}
}
}