@neocode-ai/web 1.1.1

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.
Files changed (86) hide show
  1. package/README.md +54 -0
  2. package/astro.config.mjs +145 -0
  3. package/config.mjs +14 -0
  4. package/package.json +41 -0
  5. package/public/robots.txt +6 -0
  6. package/public/theme.json +183 -0
  7. package/src/assets/lander/check.svg +2 -0
  8. package/src/assets/lander/copy.svg +2 -0
  9. package/src/assets/lander/screenshot-github.png +0 -0
  10. package/src/assets/lander/screenshot-splash.png +0 -0
  11. package/src/assets/lander/screenshot-vscode.png +0 -0
  12. package/src/assets/lander/screenshot.png +0 -0
  13. package/src/assets/logo-dark.svg +20 -0
  14. package/src/assets/logo-light.svg +20 -0
  15. package/src/assets/logo-ornate-dark.svg +18 -0
  16. package/src/assets/logo-ornate-light.svg +18 -0
  17. package/src/assets/web/web-homepage-active-session.png +0 -0
  18. package/src/assets/web/web-homepage-new-session.png +0 -0
  19. package/src/assets/web/web-homepage-see-servers.png +0 -0
  20. package/src/components/Head.astro +50 -0
  21. package/src/components/Header.astro +128 -0
  22. package/src/components/Hero.astro +11 -0
  23. package/src/components/Lander.astro +713 -0
  24. package/src/components/Share.tsx +634 -0
  25. package/src/components/SiteTitle.astro +59 -0
  26. package/src/components/icons/custom.tsx +87 -0
  27. package/src/components/icons/index.tsx +4454 -0
  28. package/src/components/share/common.tsx +77 -0
  29. package/src/components/share/content-bash.module.css +85 -0
  30. package/src/components/share/content-bash.tsx +67 -0
  31. package/src/components/share/content-code.module.css +26 -0
  32. package/src/components/share/content-code.tsx +32 -0
  33. package/src/components/share/content-diff.module.css +153 -0
  34. package/src/components/share/content-diff.tsx +231 -0
  35. package/src/components/share/content-error.module.css +64 -0
  36. package/src/components/share/content-error.tsx +24 -0
  37. package/src/components/share/content-markdown.module.css +154 -0
  38. package/src/components/share/content-markdown.tsx +75 -0
  39. package/src/components/share/content-text.module.css +63 -0
  40. package/src/components/share/content-text.tsx +37 -0
  41. package/src/components/share/copy-button.module.css +30 -0
  42. package/src/components/share/copy-button.tsx +28 -0
  43. package/src/components/share/part.module.css +428 -0
  44. package/src/components/share/part.tsx +780 -0
  45. package/src/components/share.module.css +832 -0
  46. package/src/content/docs/1-0.mdx +67 -0
  47. package/src/content/docs/acp.mdx +156 -0
  48. package/src/content/docs/agents.mdx +720 -0
  49. package/src/content/docs/cli.mdx +597 -0
  50. package/src/content/docs/commands.mdx +323 -0
  51. package/src/content/docs/config.mdx +683 -0
  52. package/src/content/docs/custom-tools.mdx +170 -0
  53. package/src/content/docs/ecosystem.mdx +76 -0
  54. package/src/content/docs/enterprise.mdx +170 -0
  55. package/src/content/docs/formatters.mdx +130 -0
  56. package/src/content/docs/github.mdx +321 -0
  57. package/src/content/docs/gitlab.mdx +195 -0
  58. package/src/content/docs/ide.mdx +48 -0
  59. package/src/content/docs/index.mdx +359 -0
  60. package/src/content/docs/keybinds.mdx +191 -0
  61. package/src/content/docs/lsp.mdx +188 -0
  62. package/src/content/docs/mcp-servers.mdx +511 -0
  63. package/src/content/docs/models.mdx +223 -0
  64. package/src/content/docs/modes.mdx +331 -0
  65. package/src/content/docs/network.mdx +57 -0
  66. package/src/content/docs/permissions.mdx +237 -0
  67. package/src/content/docs/plugins.mdx +362 -0
  68. package/src/content/docs/providers.mdx +1889 -0
  69. package/src/content/docs/rules.mdx +180 -0
  70. package/src/content/docs/sdk.mdx +391 -0
  71. package/src/content/docs/server.mdx +286 -0
  72. package/src/content/docs/share.mdx +128 -0
  73. package/src/content/docs/skills.mdx +220 -0
  74. package/src/content/docs/themes.mdx +369 -0
  75. package/src/content/docs/tools.mdx +345 -0
  76. package/src/content/docs/troubleshooting.mdx +300 -0
  77. package/src/content/docs/tui.mdx +390 -0
  78. package/src/content/docs/web.mdx +136 -0
  79. package/src/content/docs/windows-wsl.mdx +113 -0
  80. package/src/content/docs/zen.mdx +251 -0
  81. package/src/content.config.ts +7 -0
  82. package/src/pages/[...slug].md.ts +18 -0
  83. package/src/pages/s/[id].astro +113 -0
  84. package/src/styles/custom.css +405 -0
  85. package/src/types/lang-map.d.ts +27 -0
  86. package/tsconfig.json +9 -0
@@ -0,0 +1,188 @@
1
+ ---
2
+ title: LSP Servers
3
+ description: NeoCode integrates with your LSP servers.
4
+ ---
5
+
6
+ NeoCode integrates with your Language Server Protocol (LSP) to help the LLM interact with your codebase. It uses diagnostics to provide feedback to the LLM.
7
+
8
+ ---
9
+
10
+ ## Built-in
11
+
12
+ NeoCode comes with several built-in LSP servers for popular languages:
13
+
14
+ | LSP Server | Extensions | Requirements |
15
+ | ------------------ | ------------------------------------------------------------------- | ------------------------------------------------------------ |
16
+ | astro | .astro | Auto-installs for Astro projects |
17
+ | bash | .sh, .bash, .zsh, .ksh | Auto-installs bash-language-server |
18
+ | clangd | .c, .cpp, .cc, .cxx, .c++, .h, .hpp, .hh, .hxx, .h++ | Auto-installs for C/C++ projects |
19
+ | csharp | .cs | `.NET SDK` installed |
20
+ | clojure-lsp | .clj, .cljs, .cljc, .edn | `clojure-lsp` command available |
21
+ | dart | .dart | `dart` command available |
22
+ | deno | .ts, .tsx, .js, .jsx, .mjs | `deno` command available (auto-detects deno.json/deno.jsonc) |
23
+ | elixir-ls | .ex, .exs | `elixir` command available |
24
+ | eslint | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vue | `eslint` dependency in project |
25
+ | fsharp | .fs, .fsi, .fsx, .fsscript | `.NET SDK` installed |
26
+ | gleam | .gleam | `gleam` command available |
27
+ | gopls | .go | `go` command available |
28
+ | hls | .hs, .lhs | `haskell-language-server-wrapper` command available |
29
+ | jdtls | .java | `Java SDK (version 21+)` installed |
30
+ | kotlin-ls | .kt, .kts | Auto-installs for Kotlin projects |
31
+ | lua-ls | .lua | Auto-installs for Lua projects |
32
+ | nixd | .nix | `nixd` command available |
33
+ | ocaml-lsp | .ml, .mli | `ocamllsp` command available |
34
+ | oxlint | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vue, .astro, .svelte | `oxlint` dependency in project |
35
+ | php intelephense | .php | Auto-installs for PHP projects |
36
+ | prisma | .prisma | `prisma` command available |
37
+ | pyright | .py, .pyi | `pyright` dependency installed |
38
+ | ruby-lsp (rubocop) | .rb, .rake, .gemspec, .ru | `ruby` and `gem` commands available |
39
+ | rust | .rs | `rust-analyzer` command available |
40
+ | sourcekit-lsp | .swift, .objc, .objcpp | `swift` installed (`xcode` on macOS) |
41
+ | svelte | .svelte | Auto-installs for Svelte projects |
42
+ | terraform | .tf, .tfvars | Auto-installs from GitHub releases |
43
+ | tinymist | .typ, .typc | Auto-installs from GitHub releases |
44
+ | typescript | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts | `typescript` dependency in project |
45
+ | vue | .vue | Auto-installs for Vue projects |
46
+ | yaml-ls | .yaml, .yml | Auto-installs Red Hat yaml-language-server |
47
+ | zls | .zig, .zon | `zig` command available |
48
+
49
+ LSP servers are automatically enabled when one of the above file extensions are detected and the requirements are met.
50
+
51
+ :::note
52
+ You can disable automatic LSP server downloads by setting the `NEOCODE_DISABLE_LSP_DOWNLOAD` environment variable to `true`.
53
+ :::
54
+
55
+ ---
56
+
57
+ ## How It Works
58
+
59
+ When neocode opens a file, it:
60
+
61
+ 1. Checks the file extension against all enabled LSP servers.
62
+ 2. Starts the appropriate LSP server if not already running.
63
+
64
+ ---
65
+
66
+ ## Configure
67
+
68
+ You can customize LSP servers through the `lsp` section in your neocode config.
69
+
70
+ ```json title="neocode.json"
71
+ {
72
+ "$schema": "https://neo.khulnasoft.com/config.json",
73
+ "lsp": {}
74
+ }
75
+ ```
76
+
77
+ Each LSP server supports the following:
78
+
79
+ | Property | Type | Description |
80
+ | ---------------- | -------- | ------------------------------------------------- |
81
+ | `disabled` | boolean | Set this to `true` to disable the LSP server |
82
+ | `command` | string[] | The command to start the LSP server |
83
+ | `extensions` | string[] | File extensions this LSP server should handle |
84
+ | `env` | object | Environment variables to set when starting server |
85
+ | `initialization` | object | Initialization options to send to the LSP server |
86
+
87
+ Let's look at some examples.
88
+
89
+ ---
90
+
91
+ ### Environment variables
92
+
93
+ Use the `env` property to set environment variables when starting the LSP server:
94
+
95
+ ```json title="neocode.json" {5-7}
96
+ {
97
+ "$schema": "https://neo.khulnasoft.com/config.json",
98
+ "lsp": {
99
+ "rust": {
100
+ "env": {
101
+ "RUST_LOG": "debug"
102
+ }
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ ---
109
+
110
+ ### Initialization options
111
+
112
+ Use the `initialization` property to pass initialization options to the LSP server. These are server-specific settings sent during the LSP `initialize` request:
113
+
114
+ ```json title="neocode.json" {5-9}
115
+ {
116
+ "$schema": "https://neo.khulnasoft.com/config.json",
117
+ "lsp": {
118
+ "typescript": {
119
+ "initialization": {
120
+ "preferences": {
121
+ "importModuleSpecifierPreference": "relative"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ ```
128
+
129
+ :::note
130
+ Initialization options vary by LSP server. Check your LSP server's documentation for available options.
131
+ :::
132
+
133
+ ---
134
+
135
+ ### Disabling LSP servers
136
+
137
+ To disable **all** LSP servers globally, set `lsp` to `false`:
138
+
139
+ ```json title="neocode.json" {3}
140
+ {
141
+ "$schema": "https://neo.khulnasoft.com/config.json",
142
+ "lsp": false
143
+ }
144
+ ```
145
+
146
+ To disable a **specific** LSP server, set `disabled` to `true`:
147
+
148
+ ```json title="neocode.json" {5}
149
+ {
150
+ "$schema": "https://neo.khulnasoft.com/config.json",
151
+ "lsp": {
152
+ "typescript": {
153
+ "disabled": true
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ### Custom LSP servers
162
+
163
+ You can add custom LSP servers by specifying the command and file extensions:
164
+
165
+ ```json title="neocode.json" {4-7}
166
+ {
167
+ "$schema": "https://neo.khulnasoft.com/config.json",
168
+ "lsp": {
169
+ "custom-lsp": {
170
+ "command": ["custom-lsp-server", "--stdio"],
171
+ "extensions": [".custom"]
172
+ }
173
+ }
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Additional Information
180
+
181
+ ### PHP Intelephense
182
+
183
+ PHP Intelephense offers premium features through a license key. You can provide a license key by placing (only) the key in a text file at:
184
+
185
+ - On macOS/Linux: `$HOME/intelephense/licence.txt`
186
+ - On Windows: `%USERPROFILE%/intelephense/licence.txt`
187
+
188
+ The file should contain only the license key with no additional content.
@@ -0,0 +1,511 @@
1
+ ---
2
+ title: MCP servers
3
+ description: Add local and remote MCP tools.
4
+ ---
5
+
6
+ You can add external tools to NeoCode using the _Model Context Protocol_, or MCP. NeoCode supports both local and remote servers.
7
+
8
+ Once added, MCP tools are automatically available to the LLM alongside built-in tools.
9
+
10
+ ---
11
+
12
+ #### Caveats
13
+
14
+ When you use an MCP server, it adds to the context. This can quickly add up if you have a lot of tools. So we recommend being careful with which MCP servers you use.
15
+
16
+ :::tip
17
+ MCP servers add to your context, so you want to be careful with which ones you enable.
18
+ :::
19
+
20
+ Certain MCP servers, like the GitHub MCP server, tend to add a lot of tokens and can easily exceed the context limit.
21
+
22
+ ---
23
+
24
+ ## Enable
25
+
26
+ You can define MCP servers in your [NeoCode Config](https://neo.khulnasoft.com/docs/config/) under `mcp`. Add each MCP with a unique name. You can refer to that MCP by name when prompting the LLM.
27
+
28
+ ```jsonc title="neocode.jsonc" {6}
29
+ {
30
+ "$schema": "https://neo.khulnasoft.com/config.json",
31
+ "mcp": {
32
+ "name-of-mcp-server": {
33
+ // ...
34
+ "enabled": true,
35
+ },
36
+ "name-of-other-mcp-server": {
37
+ // ...
38
+ },
39
+ },
40
+ }
41
+ ```
42
+
43
+ You can also disable a server by setting `enabled` to `false`. This is useful if you want to temporarily disable a server without removing it from your config.
44
+
45
+ ---
46
+
47
+ ### Overriding remote defaults
48
+
49
+ Organizations can provide default MCP servers via their `.well-known/neocode` endpoint. These servers may be disabled by default, allowing users to opt-in to the ones they need.
50
+
51
+ To enable a specific server from your organization's remote config, add it to your local config with `enabled: true`:
52
+
53
+ ```json title="neocode.json"
54
+ {
55
+ "$schema": "https://neo.khulnasoft.com/config.json",
56
+ "mcp": {
57
+ "jira": {
58
+ "type": "remote",
59
+ "url": "https://jira.example.com/mcp",
60
+ "enabled": true
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ Your local config values override the remote defaults. See [config precedence](/docs/config#precedence-order) for more details.
67
+
68
+ ---
69
+
70
+ ## Local
71
+
72
+ Add local MCP servers using `type` to `"local"` within the MCP object.
73
+
74
+ ```jsonc title="neocode.jsonc" {15}
75
+ {
76
+ "$schema": "https://neo.khulnasoft.com/config.json",
77
+ "mcp": {
78
+ "my-local-mcp-server": {
79
+ "type": "local",
80
+ // Or ["bun", "x", "my-mcp-command"]
81
+ "command": ["npx", "-y", "my-mcp-command"],
82
+ "enabled": true,
83
+ "environment": {
84
+ "MY_ENV_VAR": "my_env_var_value",
85
+ },
86
+ },
87
+ },
88
+ }
89
+ ```
90
+
91
+ The command is how the local MCP server is started. You can also pass in a list of environment variables as well.
92
+
93
+ For example, here's how you can add the test [`@modelcontextprotocol/server-everything`](https://www.npmjs.com/package/@modelcontextprotocol/server-everything) MCP server.
94
+
95
+ ```jsonc title="neocode.jsonc"
96
+ {
97
+ "$schema": "https://neo.khulnasoft.com/config.json",
98
+ "mcp": {
99
+ "mcp_everything": {
100
+ "type": "local",
101
+ "command": ["npx", "-y", "@modelcontextprotocol/server-everything"],
102
+ },
103
+ },
104
+ }
105
+ ```
106
+
107
+ And to use it I can add `use the mcp_everything tool` to my prompts.
108
+
109
+ ```txt "mcp_everything"
110
+ use the mcp_everything tool to add the number 3 and 4
111
+ ```
112
+
113
+ ---
114
+
115
+ #### Options
116
+
117
+ Here are all the options for configuring a local MCP server.
118
+
119
+ | Option | Type | Required | Description |
120
+ | ------------- | ------- | -------- | ----------------------------------------------------------------------------------- |
121
+ | `type` | String | Y | Type of MCP server connection, must be `"local"`. |
122
+ | `command` | Array | Y | Command and arguments to run the MCP server. |
123
+ | `environment` | Object | | Environment variables to set when running the server. |
124
+ | `enabled` | Boolean | | Enable or disable the MCP server on startup. |
125
+ | `timeout` | Number | | Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds). |
126
+
127
+ ---
128
+
129
+ ## Remote
130
+
131
+ Add remote MCP servers by setting `type` to `"remote"`.
132
+
133
+ ```json title="neocode.json"
134
+ {
135
+ "$schema": "https://neo.khulnasoft.com/config.json",
136
+ "mcp": {
137
+ "my-remote-mcp": {
138
+ "type": "remote",
139
+ "url": "https://my-mcp-server.com",
140
+ "enabled": true,
141
+ "headers": {
142
+ "Authorization": "Bearer MY_API_KEY"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ The `url` is the URL of the remote MCP server and with the `headers` option you can pass in a list of headers.
150
+
151
+ ---
152
+
153
+ #### Options
154
+
155
+ | Option | Type | Required | Description |
156
+ | --------- | ------- | -------- | ----------------------------------------------------------------------------------- |
157
+ | `type` | String | Y | Type of MCP server connection, must be `"remote"`. |
158
+ | `url` | String | Y | URL of the remote MCP server. |
159
+ | `enabled` | Boolean | | Enable or disable the MCP server on startup. |
160
+ | `headers` | Object | | Headers to send with the request. |
161
+ | `oauth` | Object | | OAuth authentication configuration. See [OAuth](#oauth) section below. |
162
+ | `timeout` | Number | | Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds). |
163
+
164
+ ---
165
+
166
+ ## OAuth
167
+
168
+ NeoCode automatically handles OAuth authentication for remote MCP servers. When a server requires authentication, NeoCode will:
169
+
170
+ 1. Detect the 401 response and initiate the OAuth flow
171
+ 2. Use **Dynamic Client Registration (RFC 7591)** if supported by the server
172
+ 3. Store tokens securely for future requests
173
+
174
+ ---
175
+
176
+ ### Automatic
177
+
178
+ For most OAuth-enabled MCP servers, no special configuration is needed. Just configure the remote server:
179
+
180
+ ```json title="neocode.json"
181
+ {
182
+ "$schema": "https://neo.khulnasoft.com/config.json",
183
+ "mcp": {
184
+ "my-oauth-server": {
185
+ "type": "remote",
186
+ "url": "https://mcp.example.com/mcp"
187
+ }
188
+ }
189
+ }
190
+ ```
191
+
192
+ If the server requires authentication, NeoCode will prompt you to authenticate when you first try to use it. If not, you can [manually trigger the flow](#authenticating) with `neocode mcp auth <server-name>`.
193
+
194
+ ---
195
+
196
+ ### Pre-registered
197
+
198
+ If you have client credentials from the MCP server provider, you can configure them:
199
+
200
+ ```json title="neocode.json" {7-11}
201
+ {
202
+ "$schema": "https://neo.khulnasoft.com/config.json",
203
+ "mcp": {
204
+ "my-oauth-server": {
205
+ "type": "remote",
206
+ "url": "https://mcp.example.com/mcp",
207
+ "oauth": {
208
+ "clientId": "{env:MY_MCP_CLIENT_ID}",
209
+ "clientSecret": "{env:MY_MCP_CLIENT_SECRET}",
210
+ "scope": "tools:read tools:execute"
211
+ }
212
+ }
213
+ }
214
+ }
215
+ ```
216
+
217
+ ---
218
+
219
+ ### Authenticating
220
+
221
+ You can manually trigger authentication or manage credentials.
222
+
223
+ Authenticate with a specific MCP server:
224
+
225
+ ```bash
226
+ neocode mcp auth my-oauth-server
227
+ ```
228
+
229
+ List all MCP servers and their auth status:
230
+
231
+ ```bash
232
+ neocode mcp list
233
+ ```
234
+
235
+ Remove stored credentials:
236
+
237
+ ```bash
238
+ neocode mcp logout my-oauth-server
239
+ ```
240
+
241
+ The `mcp auth` command will open your browser for authorization. After you authorize, NeoCode will store the tokens securely in `~/.local/share/neocode/mcp-auth.json`.
242
+
243
+ ---
244
+
245
+ #### Disabling OAuth
246
+
247
+ If you want to disable automatic OAuth for a server (e.g., for servers that use API keys instead), set `oauth` to `false`:
248
+
249
+ ```json title="neocode.json" {7}
250
+ {
251
+ "$schema": "https://neo.khulnasoft.com/config.json",
252
+ "mcp": {
253
+ "my-api-key-server": {
254
+ "type": "remote",
255
+ "url": "https://mcp.example.com/mcp",
256
+ "oauth": false,
257
+ "headers": {
258
+ "Authorization": "Bearer {env:MY_API_KEY}"
259
+ }
260
+ }
261
+ }
262
+ }
263
+ ```
264
+
265
+ ---
266
+
267
+ #### OAuth Options
268
+
269
+ | Option | Type | Description |
270
+ | -------------- | --------------- | -------------------------------------------------------------------------------- |
271
+ | `oauth` | Object \| false | OAuth config object, or `false` to disable OAuth auto-detection. |
272
+ | `clientId` | String | OAuth client ID. If not provided, dynamic client registration will be attempted. |
273
+ | `clientSecret` | String | OAuth client secret, if required by the authorization server. |
274
+ | `scope` | String | OAuth scopes to request during authorization. |
275
+
276
+ #### Debugging
277
+
278
+ If a remote MCP server is failing to authenticate, you can diagnose issues with:
279
+
280
+ ```bash
281
+ # View auth status for all OAuth-capable servers
282
+ neocode mcp auth list
283
+
284
+ # Debug connection and OAuth flow for a specific server
285
+ neocode mcp debug my-oauth-server
286
+ ```
287
+
288
+ The `mcp debug` command shows the current auth status, tests HTTP connectivity, and attempts the OAuth discovery flow.
289
+
290
+ ---
291
+
292
+ ## Manage
293
+
294
+ Your MCPs are available as tools in NeoCode, alongside built-in tools. So you can manage them through the NeoCode config like any other tool.
295
+
296
+ ---
297
+
298
+ ### Global
299
+
300
+ This means that you can enable or disable them globally.
301
+
302
+ ```json title="neocode.json" {14}
303
+ {
304
+ "$schema": "https://neo.khulnasoft.com/config.json",
305
+ "mcp": {
306
+ "my-mcp-foo": {
307
+ "type": "local",
308
+ "command": ["bun", "x", "my-mcp-command-foo"]
309
+ },
310
+ "my-mcp-bar": {
311
+ "type": "local",
312
+ "command": ["bun", "x", "my-mcp-command-bar"]
313
+ }
314
+ },
315
+ "tools": {
316
+ "my-mcp-foo": false
317
+ }
318
+ }
319
+ ```
320
+
321
+ We can also use a glob pattern to disable all matching MCPs.
322
+
323
+ ```json title="neocode.json" {14}
324
+ {
325
+ "$schema": "https://neo.khulnasoft.com/config.json",
326
+ "mcp": {
327
+ "my-mcp-foo": {
328
+ "type": "local",
329
+ "command": ["bun", "x", "my-mcp-command-foo"]
330
+ },
331
+ "my-mcp-bar": {
332
+ "type": "local",
333
+ "command": ["bun", "x", "my-mcp-command-bar"]
334
+ }
335
+ },
336
+ "tools": {
337
+ "my-mcp*": false
338
+ }
339
+ }
340
+ ```
341
+
342
+ Here we are using the glob pattern `my-mcp*` to disable all MCPs.
343
+
344
+ ---
345
+
346
+ ### Per agent
347
+
348
+ If you have a large number of MCP servers you may want to only enable them per agent and disable them globally. To do this:
349
+
350
+ 1. Disable it as a tool globally.
351
+ 2. In your [agent config](/docs/agents#tools), enable the MCP server as a tool.
352
+
353
+ ```json title="neocode.json" {11, 14-18}
354
+ {
355
+ "$schema": "https://neo.khulnasoft.com/config.json",
356
+ "mcp": {
357
+ "my-mcp": {
358
+ "type": "local",
359
+ "command": ["bun", "x", "my-mcp-command"],
360
+ "enabled": true
361
+ }
362
+ },
363
+ "tools": {
364
+ "my-mcp*": false
365
+ },
366
+ "agent": {
367
+ "my-agent": {
368
+ "tools": {
369
+ "my-mcp*": true
370
+ }
371
+ }
372
+ }
373
+ }
374
+ ```
375
+
376
+ ---
377
+
378
+ #### Glob patterns
379
+
380
+ The glob pattern uses simple regex globbing patterns:
381
+
382
+ - `*` matches zero or more of any character (e.g., `"my-mcp*"` matches `my-mcp_search`, `my-mcp_list`, etc.)
383
+ - `?` matches exactly one character
384
+ - All other characters match literally
385
+
386
+ :::note
387
+ MCP server tools are registered with server name as prefix, so to disable all tools for a server simply use:
388
+
389
+ ```
390
+ "mymcpservername_*": false
391
+ ```
392
+
393
+ :::
394
+
395
+ ---
396
+
397
+ ## Examples
398
+
399
+ Below are examples of some common MCP servers. You can submit a PR if you want to document other servers.
400
+
401
+ ---
402
+
403
+ ### Sentry
404
+
405
+ Add the [Sentry MCP server](https://mcp.sentry.dev) to interact with your Sentry projects and issues.
406
+
407
+ ```json title="neocode.json" {4-8}
408
+ {
409
+ "$schema": "https://neo.khulnasoft.com/config.json",
410
+ "mcp": {
411
+ "sentry": {
412
+ "type": "remote",
413
+ "url": "https://mcp.sentry.dev/mcp",
414
+ "oauth": {}
415
+ }
416
+ }
417
+ }
418
+ ```
419
+
420
+ After adding the configuration, authenticate with Sentry:
421
+
422
+ ```bash
423
+ neocode mcp auth sentry
424
+ ```
425
+
426
+ This will open a browser window to complete the OAuth flow and connect NeoCode to your Sentry account.
427
+
428
+ Once authenticated, you can use Sentry tools in your prompts to query issues, projects, and error data.
429
+
430
+ ```txt "use sentry"
431
+ Show me the latest unresolved issues in my project. use sentry
432
+ ```
433
+
434
+ ---
435
+
436
+ ### Context7
437
+
438
+ Add the [Context7 MCP server](https://github.com/upstash/context7) to search through docs.
439
+
440
+ ```json title="neocode.json" {4-7}
441
+ {
442
+ "$schema": "https://neo.khulnasoft.com/config.json",
443
+ "mcp": {
444
+ "context7": {
445
+ "type": "remote",
446
+ "url": "https://mcp.context7.com/mcp"
447
+ }
448
+ }
449
+ }
450
+ ```
451
+
452
+ If you have signed up for a free account, you can use your API key and get higher rate-limits.
453
+
454
+ ```json title="neocode.json" {7-9}
455
+ {
456
+ "$schema": "https://neo.khulnasoft.com/config.json",
457
+ "mcp": {
458
+ "context7": {
459
+ "type": "remote",
460
+ "url": "https://mcp.context7.com/mcp",
461
+ "headers": {
462
+ "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
463
+ }
464
+ }
465
+ }
466
+ }
467
+ ```
468
+
469
+ Here we are assuming that you have the `CONTEXT7_API_KEY` environment variable set.
470
+
471
+ Add `use context7` to your prompts to use Context7 MCP server.
472
+
473
+ ```txt "use context7"
474
+ Configure a Cloudflare Worker script to cache JSON API responses for five minutes. use context7
475
+ ```
476
+
477
+ Alternatively, you can add something like this to your [AGENTS.md](/docs/rules/).
478
+
479
+ ```md title="AGENTS.md"
480
+ When you need to search docs, use `context7` tools.
481
+ ```
482
+
483
+ ---
484
+
485
+ ### Grep by Vercel
486
+
487
+ Add the [Grep by Vercel](https://grep.app) MCP server to search through code snippets on GitHub.
488
+
489
+ ```json title="neocode.json" {4-7}
490
+ {
491
+ "$schema": "https://neo.khulnasoft.com/config.json",
492
+ "mcp": {
493
+ "gh_grep": {
494
+ "type": "remote",
495
+ "url": "https://mcp.grep.app"
496
+ }
497
+ }
498
+ }
499
+ ```
500
+
501
+ Since we named our MCP server `gh_grep`, you can add `use the gh_grep tool` to your prompts to get the agent to use it.
502
+
503
+ ```txt "use the gh_grep tool"
504
+ What's the right way to set a custom domain in an SST Astro component? use the gh_grep tool
505
+ ```
506
+
507
+ Alternatively, you can add something like this to your [AGENTS.md](/docs/rules/).
508
+
509
+ ```md title="AGENTS.md"
510
+ If you are unsure how to do something, use `gh_grep` to search code examples from GitHub.
511
+ ```