$npx -y skills add AlexAI-MCP/hermes-CCC --skill native-mcpMCP server integration in Claude Code — add servers to .mcp.json, configure transports, and use their tools natively.
| 1 | # Native MCP Integration |
| 2 | |
| 3 | Connect MCP servers to Claude Code and use their tools as first-class native tools. |
| 4 | |
| 5 | ## How It Works |
| 6 | |
| 7 | 1. Add server config to `.mcp.json` in your project root |
| 8 | 2. Restart Claude Code |
| 9 | 3. The server's tools appear as native tools Claude can call directly |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | ## .mcp.json Schema |
| 14 | |
| 15 | ```json |
| 16 | { |
| 17 | "mcpServers": { |
| 18 | "server-name": { |
| 19 | "command": "python", |
| 20 | "args": ["path/to/server.py"], |
| 21 | "env": { |
| 22 | "API_KEY": "secret" |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | ``` |
| 28 | |
| 29 | --- |
| 30 | |
| 31 | ## Transport Types |
| 32 | |
| 33 | ### stdio (default — for local processes) |
| 34 | ```json |
| 35 | { |
| 36 | "mcpServers": { |
| 37 | "my-server": { |
| 38 | "command": "python", |
| 39 | "args": ["server.py"] |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | ``` |
| 44 | |
| 45 | ### HTTP/SSE (for remote or HTTP servers) |
| 46 | ```json |
| 47 | { |
| 48 | "mcpServers": { |
| 49 | "remote-server": { |
| 50 | "url": "http://localhost:8080/sse" |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | ``` |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## Common MCP Servers |
| 59 | |
| 60 | ### Filesystem |
| 61 | ```json |
| 62 | { |
| 63 | "mcpServers": { |
| 64 | "filesystem": { |
| 65 | "command": "npx", |
| 66 | "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"] |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | ``` |
| 71 | |
| 72 | ### Git |
| 73 | ```json |
| 74 | { |
| 75 | "mcpServers": { |
| 76 | "git": { |
| 77 | "command": "uvx", |
| 78 | "args": ["mcp-server-git", "--repository", "."] |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | ``` |
| 83 | |
| 84 | ### GitHub |
| 85 | ```json |
| 86 | { |
| 87 | "mcpServers": { |
| 88 | "github": { |
| 89 | "command": "npx", |
| 90 | "args": ["-y", "@modelcontextprotocol/server-github"], |
| 91 | "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."} |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | ``` |
| 96 | |
| 97 | ### Obsidian |
| 98 | ```json |
| 99 | { |
| 100 | "mcpServers": { |
| 101 | "obsidian": { |
| 102 | "command": "npx", |
| 103 | "args": ["-y", "mcp-obsidian"], |
| 104 | "env": {"OBSIDIAN_VAULT_PATH": "/path/to/vault"} |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | ``` |
| 109 | |
| 110 | ### Playwright (Browser Automation) |
| 111 | ```json |
| 112 | { |
| 113 | "mcpServers": { |
| 114 | "playwright": { |
| 115 | "command": "npx", |
| 116 | "args": ["-y", "@playwright/mcp"] |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | ``` |
| 121 | |
| 122 | ### Notion |
| 123 | ```json |
| 124 | { |
| 125 | "mcpServers": { |
| 126 | "notion": { |
| 127 | "command": "npx", |
| 128 | "args": ["-y", "@notionhq/mcp"], |
| 129 | "env": {"NOTION_API_KEY": "secret_..."} |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | ``` |
| 134 | |
| 135 | ### SQLite |
| 136 | ```json |
| 137 | { |
| 138 | "mcpServers": { |
| 139 | "sqlite": { |
| 140 | "command": "uvx", |
| 141 | "args": ["mcp-server-sqlite", "--db-path", "./data.db"] |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | ``` |
| 146 | |
| 147 | --- |
| 148 | |
| 149 | ## Prerequisites |
| 150 | |
| 151 | ### npx servers (Node.js) |
| 152 | ```bash |
| 153 | node --version # must be 18+ |
| 154 | npm --version |
| 155 | ``` |
| 156 | |
| 157 | ### uvx servers (Python) |
| 158 | ```bash |
| 159 | pip install uv |
| 160 | uvx --version |
| 161 | ``` |
| 162 | |
| 163 | ### Python servers |
| 164 | ```bash |
| 165 | pip install fastmcp mcp |
| 166 | ``` |
| 167 | |
| 168 | --- |
| 169 | |
| 170 | ## After Adding a Server |
| 171 | |
| 172 | 1. Save `.mcp.json` |
| 173 | 2. Restart Claude Code (or reload window in IDE extension) |
| 174 | 3. Tools from the server now appear in Claude's tool list |
| 175 | 4. Test: ask Claude to use one of the new tools |
| 176 | |
| 177 | --- |
| 178 | |
| 179 | ## Debugging |
| 180 | |
| 181 | Check Claude Code MCP logs: |
| 182 | - Mac/Linux: `~/.claude/logs/` |
| 183 | - Windows: `%APPDATA%\Claude\logs\` |
| 184 | |
| 185 | Common issues: |
| 186 | - `command not found`: install npx/uvx or use full path |
| 187 | - Auth errors: check `env` section for API keys |
| 188 | - Timeout: server took too long to start |
| 189 | |
| 190 | --- |
| 191 | |
| 192 | ## Security Best Practices |
| 193 | |
| 194 | Never hardcode secrets in `.mcp.json` — use env vars from shell: |
| 195 | ```json |
| 196 | { |
| 197 | "mcpServers": { |
| 198 | "my-api": { |
| 199 | "command": "python", |
| 200 | "args": ["server.py"], |
| 201 | "env": { |
| 202 | "API_KEY": "${MY_API_KEY}" |
| 203 | } |
| 204 | } |
| 205 | } |
| 206 | } |
| 207 | ``` |
| 208 | |
| 209 | Or set in `.env` and load via direnv / shell profile. |
| 210 | |
| 211 | --- |
| 212 | |
| 213 | ## Multiple Servers |
| 214 | |
| 215 | ```json |
| 216 | { |
| 217 | "mcpServers": { |
| 218 | "filesystem": {...}, |
| 219 | "github": {...}, |
| 220 | "obsidian": {...}, |
| 221 | "playwright": {...}, |
| 222 | "custom-api": {...} |
| 223 | } |
| 224 | } |
| 225 | ``` |
| 226 | |
| 227 | All tools from all servers are available simultaneously. |