command-code 0.52.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2541 -0
- package/dist/bundled/command-code-knowledge/SKILL.md +52 -0
- package/dist/bundled/command-code-knowledge/reference/checkpoints.md +366 -0
- package/dist/bundled/command-code-knowledge/reference/custom-agents.md +91 -0
- package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +345 -0
- package/dist/bundled/command-code-knowledge/reference/headless.md +234 -0
- package/dist/bundled/command-code-knowledge/reference/hooks.md +1097 -0
- package/dist/bundled/command-code-knowledge/reference/mcp.md +626 -0
- package/dist/bundled/command-code-knowledge/reference/memory.md +98 -0
- package/dist/bundled/command-code-knowledge/reference/models.md +81 -0
- package/dist/bundled/command-code-knowledge/reference/permissions.md +412 -0
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +101 -0
- package/dist/bundled/command-code-knowledge/reference/product-help.md +421 -0
- package/dist/bundled/command-code-knowledge/reference/skills.md +993 -0
- package/dist/bundled/mod-builder/SKILL.md +128 -0
- package/dist/bundled/mod-builder/examples/block-dangerous-commands.ts +41 -0
- package/dist/bundled/mod-builder/examples/custom-entry-renderer.ts +32 -0
- package/dist/bundled/mod-builder/examples/custom-tool.ts +53 -0
- package/dist/bundled/mod-builder/examples/flags-and-options.ts +29 -0
- package/dist/bundled/mod-builder/examples/input-shortcuts.ts +41 -0
- package/dist/bundled/mod-builder/examples/kitchen-sink.ts +110 -0
- package/dist/bundled/mod-builder/examples/lifecycle-hooks.ts +64 -0
- package/dist/bundled/mod-builder/examples/observe-events.ts +30 -0
- package/dist/bundled/mod-builder/examples/slash-command.ts +33 -0
- package/dist/bundled/mod-builder/reference/api.md +81 -0
- package/dist/bundled/mod-builder/reference/hooks-and-events.md +308 -0
- package/dist/bundled/mod-builder/reference/overview.md +161 -0
- package/dist/bundled/mod-builder/reference/packaging.md +63 -0
- package/dist/bundled/mod-builder/reference/ui.md +63 -0
- package/dist/bundled/mod-builder/reference/verify.md +58 -0
- package/dist/bundled/skill-builder/SKILL.md +104 -0
- package/dist/cli.mjs +5 -5
- package/package.json +35 -26
- package/vsix/commandcode-vscode.vsix +0 -0
- /package/{skills → dist/bundled}/agent-browser/SKILL.md +0 -0
- /package/{skills → dist/bundled}/design/SKILL.md +0 -0
- /package/{skills → dist/bundled}/design/references/border.md +0 -0
- /package/{skills → dist/bundled}/design/references/button.md +0 -0
- /package/{skills → dist/bundled}/design/references/checkup.md +0 -0
- /package/{skills → dist/bundled}/design/references/color.md +0 -0
- /package/{skills → dist/bundled}/design/references/create.md +0 -0
- /package/{skills → dist/bundled}/design/references/design-html.md +0 -0
- /package/{skills → dist/bundled}/design/references/deslop.md +0 -0
- /package/{skills → dist/bundled}/design/references/finish.md +0 -0
- /package/{skills → dist/bundled}/design/references/interaction.md +0 -0
- /package/{skills → dist/bundled}/design/references/layout.md +0 -0
- /package/{skills → dist/bundled}/design/references/motion.md +0 -0
- /package/{skills → dist/bundled}/design/references/redesign.md +0 -0
- /package/{skills → dist/bundled}/design/references/refine.md +0 -0
- /package/{skills → dist/bundled}/design/references/relayout.md +0 -0
- /package/{skills → dist/bundled}/design/references/report-html.md +0 -0
- /package/{skills → dist/bundled}/design/references/responsive.md +0 -0
- /package/{skills → dist/bundled}/design/references/review.md +0 -0
- /package/{skills → dist/bundled}/design/references/setup.md +0 -0
- /package/{skills → dist/bundled}/design/references/shadow.md +0 -0
- /package/{skills → dist/bundled}/design/references/smell.md +0 -0
- /package/{skills → dist/bundled}/design/references/surface.md +0 -0
- /package/{skills → dist/bundled}/design/references/tokenize.md +0 -0
- /package/{skills → dist/bundled}/design/references/typeset.md +0 -0
- /package/{skills → dist/bundled}/design/references/voice.md +0 -0
- /package/{skills → dist/bundled}/design/references/writing.md +0 -0
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
<!-- GENERATED FILE — do not edit. Source: packages/docs/src/app/mcp/page.mdx. Regenerate: pnpm generate:knowledge -->
|
|
2
|
+
|
|
3
|
+
# MCP Servers
|
|
4
|
+
|
|
5
|
+
Connect Command Code to external tools and data sources through MCP servers. MCP is an open protocol that lets Command Code interact with external services — databases, APIs, issue trackers, and more.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What is MCP?
|
|
10
|
+
|
|
11
|
+
MCP (Model Context Protocol) is an open protocol that lets AI agents connect to external tools and services. With MCP, Command Code can interact with databases, APIs, dev tools, and more — all through a standardized interface.
|
|
12
|
+
|
|
13
|
+
Instead of building custom integrations, you connect MCP servers and Command Code automatically discovers and uses their tools.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## What you can do
|
|
18
|
+
|
|
19
|
+
With MCP servers connected, you can ask Command Code to:
|
|
20
|
+
|
|
21
|
+
- **Work with project management**: "Create a GitHub issue for the bug we found and assign it to me."
|
|
22
|
+
- **Query databases**: "Show me all users who signed up in the last 7 days from our Postgres database."
|
|
23
|
+
- **Integrate with services**: "Search Notion for the API design doc and summarize it."
|
|
24
|
+
- **Automate workflows**: "Review PR #123 on GitHub, then post a summary in Slack."
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Quickstart
|
|
29
|
+
|
|
30
|
+
Add your first MCP server to Command Code in under a minute.
|
|
31
|
+
|
|
32
|
+
**Add an MCP server**
|
|
33
|
+
|
|
34
|
+
Pick one transport:
|
|
35
|
+
|
|
36
|
+
**Add MCP Server**
|
|
37
|
+
|
|
38
|
+
```bash {{ title: 'HTTP (remote)' }}
|
|
39
|
+
cmd mcp add --transport http <name> <url>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash {{ title: 'Stdio (local)' }}
|
|
43
|
+
cmd mcp add <name> -- <command> [args...]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Example:
|
|
47
|
+
|
|
48
|
+
**Examples**
|
|
49
|
+
```bash {{ title: 'HTTP (remote)' }}
|
|
50
|
+
cmd mcp add --transport http notion https://mcp.notion.com/mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```bash {{ title: 'Stdio (local)' }}
|
|
54
|
+
cmd mcp add playwright -- npx -y @playwright/mcp@latest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Authenticate if prompted**
|
|
58
|
+
|
|
59
|
+
Some remote servers require OAuth. Open the MCP menu:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
/mcp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Follow the browser prompt to log in. Tokens are stored securely and refreshed automatically.
|
|
66
|
+
|
|
67
|
+
If needed, pass auth headers:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cmd mcp add --transport http private-api https://api.company.com/mcp \
|
|
71
|
+
--header "X-API-Key: your-key-here"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
All options (`--transport`, `--env`, `--scope`, `--header`) must come before the server name. `--` separates the server name from the local command for stdio servers.
|
|
75
|
+
|
|
76
|
+
**Verify connection**
|
|
77
|
+
|
|
78
|
+
List your configured servers:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cmd mcp list
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or inspect one server:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
cmd mcp get notion
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Inside a session, `/mcp` shows connection status and available tools.
|
|
91
|
+
|
|
92
|
+
**Try it out**
|
|
93
|
+
|
|
94
|
+
Start a session:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
cmd
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then ask naturally:
|
|
101
|
+
|
|
102
|
+
```md
|
|
103
|
+
Create a note on Notion named "API Design v2".
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Command Code automatically discovers and calls the right MCP tools based on your request.
|
|
107
|
+
|
|
108
|
+
**Optional: Add MCP servers from JSON**
|
|
109
|
+
|
|
110
|
+
For complex setups, use JSON:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
cmd mcp add-json my-server '{
|
|
114
|
+
"transport": "http",
|
|
115
|
+
"url": "https://api.example.com/mcp",
|
|
116
|
+
"headers": {
|
|
117
|
+
"Authorization": "Bearer ${API_KEY}"
|
|
118
|
+
}
|
|
119
|
+
}'
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Example:
|
|
123
|
+
|
|
124
|
+
**GitHub MCP Server**
|
|
125
|
+
|
|
126
|
+
```bash {{ title: 'HTTP server' }}
|
|
127
|
+
cmd mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer ghp_xxx"}}'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```bash {{ title: 'Stdio server' }}
|
|
131
|
+
cmd mcp add-json my-tool '{"type":"stdio","command":"npx","args":["@my-org/mcp-server"],"env":{"API_KEY":"xxx"}}'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```bash {{ title: 'With OAuth' }}
|
|
135
|
+
cmd mcp add-json oauth-server '{"type":"http","url":"https://api.example.com/mcp","oauth":{"authorizationUrl":"https://example.com/authorize","tokenUrl":"https://example.com/token","clientId":"my-client"}}' --client-secret my-secret
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
For copying configs between machines or scripting:
|
|
139
|
+
|
|
140
|
+
- The JSON accepts `type` as an alias for `transport`.
|
|
141
|
+
- Environment variables in config values (like `${API_KEY}`) are resolved at runtime.
|
|
142
|
+
|
|
143
|
+
**Optional: Import from Claude Desktop**
|
|
144
|
+
|
|
145
|
+
If you already configured MCP servers in Claude Desktop:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
cmd mcp add-from-claude-desktop
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
You will get an interactive picker for which servers to import.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Adding MCP servers
|
|
156
|
+
|
|
157
|
+
### HTTP transport (remote servers)
|
|
158
|
+
|
|
159
|
+
Use `--transport http` to connect to remote MCP servers:
|
|
160
|
+
|
|
161
|
+
**HTTP Examples**
|
|
162
|
+
|
|
163
|
+
```bash {{ title: 'Basic' }}
|
|
164
|
+
cmd mcp add --transport http notion https://mcp.notion.com/mcp
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
```bash {{ title: 'With auth header' }}
|
|
168
|
+
cmd mcp add --transport http github https://api.githubcopilot.com/mcp \
|
|
169
|
+
--header "Authorization: Bearer ghp_xxxxx"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```bash {{ title: 'With env vars' }}
|
|
173
|
+
cmd mcp add --transport http my-api https://api.example.com/mcp \
|
|
174
|
+
--env API_KEY=sk-xxx
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Stdio transport (local processes)
|
|
178
|
+
|
|
179
|
+
Stdio is the default transport. Use `--` to separate the server name from the command:
|
|
180
|
+
|
|
181
|
+
**Stdio Examples**
|
|
182
|
+
|
|
183
|
+
```bash {{ title: 'Basic' }}
|
|
184
|
+
cmd mcp add my-tool -- npx @my-org/mcp-server
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
```bash {{ title: 'With args and env' }}
|
|
188
|
+
cmd mcp add --env API_KEY=sk-xxx my-tool -- npx @my-org/mcp-server --verbose
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
All flags (`--transport`, `--scope`, `--env`, `--header`) must come **before** the server name. The `--` separates the server name from the stdio command and its arguments.
|
|
192
|
+
|
|
193
|
+
### Command options
|
|
194
|
+
|
|
195
|
+
| **Flag** | **Description** | **Default** |
|
|
196
|
+
| --------------------------- | -------------------------------------------- | ----------- |
|
|
197
|
+
| `-t, --transport <type>` | Transport type: `stdio` or `http` | `stdio` |
|
|
198
|
+
| `-s, --scope <scope>` | Where to store: `local`, `project`, or `user`| `local` |
|
|
199
|
+
| `-e, --env <KEY=value>` | Environment variable (repeatable) | — |
|
|
200
|
+
| `-H, --header <Header: value>` | HTTP header (repeatable, http only) | — |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Command reference
|
|
205
|
+
|
|
206
|
+
All MCP management is done through `cmd mcp <subcommand>`.
|
|
207
|
+
|
|
208
|
+
| **Command** | **Description** | **Example** |
|
|
209
|
+
|-------------------------------------- |------------------------------------------------|-----------------------------------------------------------------|
|
|
210
|
+
| `cmd mcp add` | Add server with CLI options | `cmd mcp add --transport http notion https://mcp.notion.com/mcp` |
|
|
211
|
+
| `cmd mcp add-json` | Add server from JSON config | `cmd mcp add-json github '{"type":"http","url":"https://..."}'` |
|
|
212
|
+
| `cmd mcp list` | List all configured servers | `cmd mcp list` |
|
|
213
|
+
| `cmd mcp get <name>` | Show server details | `cmd mcp get notion` |
|
|
214
|
+
| `cmd mcp remove <name>` | Remove a server from configuration | `cmd mcp remove notion` |
|
|
215
|
+
| `cmd mcp auth <server>` | Authenticate with OAuth (opens browser) | `cmd mcp auth notion` |
|
|
216
|
+
| `cmd mcp auth --status <server>` | Check authentication status | `cmd mcp auth --status notion` |
|
|
217
|
+
| `cmd mcp auth --list` | List all servers with stored tokens | `cmd mcp auth --list` |
|
|
218
|
+
| `cmd mcp auth --clear <server>` | Clear stored tokens | `cmd mcp auth --clear notion` |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Configuration & scopes
|
|
223
|
+
|
|
224
|
+
MCP servers can be stored in three scopes with different visibility:
|
|
225
|
+
|
|
226
|
+
| **Scope** | **File Location** | **Purpose** |
|
|
227
|
+
| ----------- | --------------------------------------------- | ------------------------------------- |
|
|
228
|
+
| `local` | `~/.commandcode/projects/<slug>/mcp.json` | Private, per-project (default) |
|
|
229
|
+
| `project` | `.mcp.json` in project root | Shared, version controlled |
|
|
230
|
+
| `user` | `~/.commandcode/mcp.json` | Private, available across all projects|
|
|
231
|
+
|
|
232
|
+
**Precedence:** When the same server name exists in multiple scopes, `local` overrides `project`, which overrides `user`.
|
|
233
|
+
|
|
234
|
+
**Scope Examples**
|
|
235
|
+
|
|
236
|
+
```bash {{ title: 'Local (default)' }}
|
|
237
|
+
cmd mcp add --transport http notion https://mcp.notion.com/mcp
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
```bash {{ title: 'Project (shared)' }}
|
|
241
|
+
cmd mcp add --scope project --transport http notion https://mcp.notion.com/mcp
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
```bash {{ title: 'User (global)' }}
|
|
245
|
+
cmd mcp add --scope user --transport http notion https://mcp.notion.com/mcp
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
The `project` scope saves to `.mcp.json` in your project root, which is meant to be committed to Git. OAuth client secrets are automatically stripped from this file and stored securely in `~/.commandcode/mcp-tokens.json` instead.
|
|
249
|
+
|
|
250
|
+
### Local scope (default)
|
|
251
|
+
|
|
252
|
+
Stored in `~/.commandcode/`. Only available to you for the current project.
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
cmd mcp add --transport http stripe https://mcp.stripe.com
|
|
256
|
+
|
|
257
|
+
# Explicit:
|
|
258
|
+
cmd mcp add --transport http stripe --scope local https://mcp.stripe.com
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Project scope
|
|
262
|
+
|
|
263
|
+
Stored in `.mcp.json` at your project root. Checked into version control — shared with your team.
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
cmd mcp add --transport http stripe --scope project https://mcp.stripe.com
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
This creates or updates `.mcp.json`:
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"mcpServers": {
|
|
274
|
+
"stripe": {
|
|
275
|
+
"transport": "http",
|
|
276
|
+
"url": "https://mcp.stripe.com"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### User scope
|
|
283
|
+
|
|
284
|
+
Stored in `~/.commandcode/mcp.json`. Available to you across all projects.
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
cmd mcp add --transport http stripe --scope user https://mcp.stripe.com
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Config schema
|
|
291
|
+
|
|
292
|
+
The configuration files follow this schema:
|
|
293
|
+
|
|
294
|
+
**Config Schema**
|
|
295
|
+
|
|
296
|
+
```json {{ title: 'HTTP server' }}
|
|
297
|
+
{
|
|
298
|
+
"mcpServers": {
|
|
299
|
+
"my-server": {
|
|
300
|
+
"transport": "http",
|
|
301
|
+
"enabled": true,
|
|
302
|
+
"url": "https://api.example.com/mcp",
|
|
303
|
+
"headers": { "Authorization": "Bearer token" },
|
|
304
|
+
"env": { "API_KEY": "value" }
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
```json {{ title: 'Stdio server' }}
|
|
311
|
+
{
|
|
312
|
+
"mcpServers": {
|
|
313
|
+
"my-tool": {
|
|
314
|
+
"transport": "stdio",
|
|
315
|
+
"enabled": true,
|
|
316
|
+
"command": "npx",
|
|
317
|
+
"args": ["@my-org/mcp-server", "--verbose"],
|
|
318
|
+
"env": { "API_KEY": "value" }
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
```json {{ title: 'With OAuth' }}
|
|
325
|
+
{
|
|
326
|
+
"mcpServers": {
|
|
327
|
+
"oauth-server": {
|
|
328
|
+
"transport": "http",
|
|
329
|
+
"enabled": true,
|
|
330
|
+
"url": "https://api.example.com/mcp",
|
|
331
|
+
"oauth": {
|
|
332
|
+
"authorizationUrl": "https://example.com/authorize",
|
|
333
|
+
"tokenUrl": "https://example.com/token",
|
|
334
|
+
"clientId": "my-client",
|
|
335
|
+
"scopes": ["read", "write"]
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Authentication
|
|
345
|
+
|
|
346
|
+
### OAuth flow
|
|
347
|
+
|
|
348
|
+
Command Code supports OAuth 2.0 Authorization Code with PKCE for HTTP servers.
|
|
349
|
+
|
|
350
|
+
**Add a server that requires OAuth**
|
|
351
|
+
|
|
352
|
+
**Add OAuth Server**
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
cmd mcp add --transport http my-server https://api.example.com/mcp
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
If the server requires authentication, Command Code detects this automatically and starts the OAuth flow.
|
|
359
|
+
|
|
360
|
+
**Authenticate via browser**
|
|
361
|
+
|
|
362
|
+
A browser window opens for you to authorize. After you grant access, tokens are stored securely in `~/.commandcode/mcp-tokens.json`.
|
|
363
|
+
|
|
364
|
+
You can also authenticate later:
|
|
365
|
+
|
|
366
|
+
**Authenticate**
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
cmd mcp auth my-server
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Or use the `/mcp` menu inside a session to authenticate interactively.
|
|
373
|
+
|
|
374
|
+
**Tokens refresh automatically**
|
|
375
|
+
|
|
376
|
+
Tokens are refreshed automatically when they expire. If refresh fails, re-authenticate with `cmd mcp auth <server>`.
|
|
377
|
+
|
|
378
|
+
**Token Commands**
|
|
379
|
+
|
|
380
|
+
```bash {{ title: 'Check status' }}
|
|
381
|
+
cmd mcp auth --status my-server
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
```bash {{ title: 'List all' }}
|
|
385
|
+
cmd mcp auth --list
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
```bash {{ title: 'Clear tokens' }}
|
|
389
|
+
cmd mcp auth --clear my-server
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
```bash {{ title: 'Re-authenticate' }}
|
|
393
|
+
cmd mcp auth my-server
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### OAuth flow (remote servers)
|
|
397
|
+
|
|
398
|
+
Many remote MCP servers support OAuth 2.0. Use `/mcp` inside Command Code to authenticate:
|
|
399
|
+
|
|
400
|
+
```
|
|
401
|
+
/mcp
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Select the server and follow the browser login flow. Tokens are stored securely and refreshed automatically.
|
|
405
|
+
|
|
406
|
+
**Tips:**
|
|
407
|
+
- Use "Clear authentication" in `/mcp` to revoke access
|
|
408
|
+
- If your browser doesn't open automatically, copy the provided URL
|
|
409
|
+
- OAuth works with HTTP and SSE transport servers
|
|
410
|
+
|
|
411
|
+
### OAuth with JSON
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
cmd mcp add-json my-server \
|
|
415
|
+
'{"type":"http","url":"https://mcp.example.com/mcp","oauth":{"clientId":"your-client-id","callbackPort":8080}}' \
|
|
416
|
+
--client-secret
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### API key auth
|
|
420
|
+
|
|
421
|
+
For servers that use API keys, pass them as environment variables or headers:
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
# Via env
|
|
425
|
+
cmd mcp add --transport stdio --env API_KEY=your-key my-server \
|
|
426
|
+
-- npx -y my-mcp-server
|
|
427
|
+
|
|
428
|
+
# Via header
|
|
429
|
+
cmd mcp add --transport http my-server https://api.example.com/mcp \
|
|
430
|
+
--header "Authorization: Bearer your-token"
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## The `/mcp` menu
|
|
436
|
+
|
|
437
|
+
Inside a Command Code session, type `/mcp` to open the interactive MCP manager.
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
/mcp
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
The menu shows:
|
|
444
|
+
|
|
445
|
+
- All configured servers with connection status
|
|
446
|
+
- Color-coded indicators: green (connected), cyan (authenticated), yellow (requires auth), red (error)
|
|
447
|
+
- Tool count for each connected server
|
|
448
|
+
- Actions: connect, authenticate, or remove servers
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Using MCP tools
|
|
453
|
+
|
|
454
|
+
Once a server is connected, its tools appear alongside built-in tools. They follow the naming convention `mcp__<server>__<tool>`:
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
mcp__notion__search_page
|
|
458
|
+
mcp__github__create_issue
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
You don't need to remember tool names. Just describe what you want:
|
|
462
|
+
|
|
463
|
+
```
|
|
464
|
+
Search for the API design doc on Notion.
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Command Code discovers and calls the appropriate MCP tool automatically.
|
|
468
|
+
|
|
469
|
+
---
|
|
470
|
+
|
|
471
|
+
## Server examples
|
|
472
|
+
|
|
473
|
+
A list of useful MCP servers and how to add them in Command Code. These servers extend Command Code with access to external tools, documentation, and services.
|
|
474
|
+
|
|
475
|
+
### Notion
|
|
476
|
+
|
|
477
|
+
Search, read, and create pages in your Notion workspace.
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
cmd mcp add --transport http notion https://mcp.notion.com/mcp
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
After adding, authenticate via the `/mcp` menu inside a Command Code session.
|
|
484
|
+
|
|
485
|
+
### GitHub
|
|
486
|
+
|
|
487
|
+
Manage GitHub beyond what git supports — issues, PRs, code search, and more. It requires your GitHub Personal Access Token (PAT).
|
|
488
|
+
|
|
489
|
+
**Fine-grained token (recommended)** — scoped to specific repos, minimal permissions:
|
|
490
|
+
|
|
491
|
+
1. Go to [GitHub > Settings > Developer settings > Personal access tokens > Fine-grained tokens](https://github.com/settings/personal-access-tokens)
|
|
492
|
+
2. Click **Generate new token**
|
|
493
|
+
3. Name it `commandcode-mcp`, set expiration as needed
|
|
494
|
+
4. **Repository access** → Choose "All repositories" or "Only select repositories"
|
|
495
|
+
5. **Permissions** → Repository permissions → expand and configure:
|
|
496
|
+
- **Contents**: Read and write (for file operations)
|
|
497
|
+
- **Issues**: Read and write (for issue management)
|
|
498
|
+
- **Pull requests**: Read and write (for PR operations)
|
|
499
|
+
- **Metadata**: Read-only (automatically included)
|
|
500
|
+
6. Generate token and copy it
|
|
501
|
+
|
|
502
|
+
**Classic token** — broader access, simpler setup:
|
|
503
|
+
|
|
504
|
+
1. Go to [GitHub > Settings > Developer settings > Personal access tokens > Tokens (classic)](https://github.com/settings/tokens/new)
|
|
505
|
+
2. Name it `commandcode-mcp`, set expiration as needed
|
|
506
|
+
3. Check the **repo** scope (includes all repository permissions)
|
|
507
|
+
4. Generate token and copy it
|
|
508
|
+
|
|
509
|
+
Replace `YOUR_GITHUB_PAT` with your generated token:
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
cmd mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
For more details, see the instructions in these [GitHub MCP Server installation docs](https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md).
|
|
516
|
+
|
|
517
|
+
### Playwright
|
|
518
|
+
|
|
519
|
+
Control and inspect a browser using Playwright. Write and run browser tests, take screenshots, and automate web interactions.
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
cmd mcp add playwright -- npx -y @playwright/mcp@latest
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### Sentry
|
|
526
|
+
|
|
527
|
+
Access Sentry logs, monitor errors, and debug production issues.
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
cmd mcp add --transport http sentry https://mcp.sentry.dev/mcp
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
After adding, authenticate via the `/mcp` menu inside a Command Code session.
|
|
534
|
+
|
|
535
|
+
### OpenAI Docs
|
|
536
|
+
|
|
537
|
+
Search and read OpenAI developer documentation directly from your prompts.
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
cmd mcp add --transport http openai-docs https://developers.openai.com/mcp
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Context7
|
|
544
|
+
|
|
545
|
+
Connect to up-to-date developer documentation. Dynamically fetches version-specific docs and code examples from official sources.
|
|
546
|
+
|
|
547
|
+
```bash
|
|
548
|
+
cmd mcp add context7 -- npx -y @upstash/context7-mcp
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Include `use context7` in your prompts to pull in the latest docs for any library.
|
|
552
|
+
|
|
553
|
+
### Figma
|
|
554
|
+
|
|
555
|
+
Access your Figma designs. Available as both a remote and local server.
|
|
556
|
+
|
|
557
|
+
**Figma MCP**
|
|
558
|
+
|
|
559
|
+
```bash {{ title: 'Remote' }}
|
|
560
|
+
cmd mcp add --transport http figma https://mcp.figma.com/mcp
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
```bash {{ title: 'Local (Desktop App)' }}
|
|
564
|
+
cmd mcp add --transport http figma-desktop http://127.0.0.1:3845/mcp
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
For the remote server, authenticate via the `/mcp` menu after adding. The local server requires the Figma desktop app to be running.
|
|
568
|
+
|
|
569
|
+
### Chrome Developer Tools
|
|
570
|
+
|
|
571
|
+
Control and inspect Chrome from Command Code. Debug pages, take screenshots, and interact with the DOM.
|
|
572
|
+
|
|
573
|
+
```bash
|
|
574
|
+
cmd mcp add chrome-devtools -- npx -y chrome-devtools-mcp@latest
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
Chrome must be running with the `--remote-debugging-port=9222` flag for the MCP server to connect.
|
|
578
|
+
|
|
579
|
+
### Adding any MCP server
|
|
580
|
+
|
|
581
|
+
Most MCP servers connect in three ways: as a remote HTTP server, a local stdio process, or from a JSON config.
|
|
582
|
+
|
|
583
|
+
**General Pattern**
|
|
584
|
+
|
|
585
|
+
```bash {{ title: 'HTTP (remote)' }}
|
|
586
|
+
cmd mcp add --transport http <name> <url>
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
```bash {{ title: 'Stdio (local)' }}
|
|
590
|
+
cmd mcp add <name> -- <command> [args...]
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
```bash {{ title: 'From JSON' }}
|
|
594
|
+
cmd mcp add-json <name> '{"type":"http","url":"https://..."}'
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## Troubleshooting
|
|
600
|
+
|
|
601
|
+
**Server won't connect:**
|
|
602
|
+
|
|
603
|
+
- Check the URL or command is correct: `cmd mcp get <name>`
|
|
604
|
+
- For stdio, ensure the command is installed and in your PATH
|
|
605
|
+
- Use `/mcp` to see the connection error message
|
|
606
|
+
|
|
607
|
+
**Authentication issues:**
|
|
608
|
+
|
|
609
|
+
- Re-authenticate: `cmd mcp auth <server>`
|
|
610
|
+
- Clear and retry: `cmd mcp auth --clear <server>` then `cmd mcp auth <server>`
|
|
611
|
+
- Check token status: `cmd mcp auth --status <server>`
|
|
612
|
+
|
|
613
|
+
**Tools not appearing:**
|
|
614
|
+
|
|
615
|
+
- Verify the server is connected via `/mcp`
|
|
616
|
+
- The server may take a few seconds to initialize after startup
|
|
617
|
+
- Check that the server actually exposes tools (some only expose resources)
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## Next steps
|
|
622
|
+
|
|
623
|
+
- [CLI Reference](https://commandcode.ai/docs/reference/cli) for all Command Code commands
|
|
624
|
+
- [Slash Commands](https://commandcode.ai/docs/reference/slash-commands) for custom prompts
|
|
625
|
+
- [MCP Protocol Specification](https://modelcontextprotocol.io/introduction) for building your own MCP server
|
|
626
|
+
- Join our [Discord community](https://commandcode.ai/discord) for support
|