Skip to main content

MCP Servers

Neusis Code supports both local and remote Model Context Protocol (MCP) servers. You register them under the mcp key in your config — the key you choose becomes the tool-name prefix the agent sees, so name it carefully.

Local MCP​

A local server is launched by Neusis Code over stdio:

{
"mcp": {
"my-server": {
"type": "local",
"command": ["npx", "-y", "my-mcp-package"],
"environment": { "MY_VAR": "value" },
"enabled": true
}
}
}
KeyRequiredDescription
typeyes"local".
commandyesCommand and arguments to run the server, as an array.
environmentnoEnvironment variables to set for the server process.
enablednoSet to false to keep the server defined but skip it on startup.
timeoutnoPer-request timeout in milliseconds. Defaults to 5000 (5 seconds).

Remote MCP​

A remote server is reached over HTTP (Streamable HTTP, falling back to SSE):

{
"mcp": {
"remote-server": {
"type": "remote",
"url": "https://mcp-server.com",
"headers": { "Authorization": "Bearer KEY" }
}
}
}
KeyRequiredDescription
typeyes"remote".
urlyesURL of the remote MCP server.
headersnoHeaders sent with each request.
enablednoSet to false to skip the server on startup.
oauthnoOAuth configuration, or false to disable OAuth auto-detection.
timeoutnoPer-request timeout in milliseconds. Defaults to 5000 (5 seconds).

OAuth for remote servers​

When a remote server requires authentication, Neusis Code runs an OAuth flow and registers itself as a client. You can shape that flow with the optional oauth block:

{
"mcp": {
"remote-server": {
"type": "remote",
"url": "https://mcp-server.com",
"oauth": {
"clientId": "my-client-id",
"scope": "read write",
"callbackPort": 19876
}
}
}
}
KeyDescription
clientIdPre-registered OAuth client ID. Omit to attempt dynamic client registration (RFC 7591).
clientSecretOAuth client secret, if the server requires one.
scopeOAuth scopes to request. Included in the client metadata sent to the server.
callbackPortPort for the local OAuth callback server. Defaults to 19876. Shorthand for redirectUri when only the port differs; ignored if redirectUri is set.
redirectUriFull OAuth redirect URI. Defaults to http://127.0.0.1:19876/mcp/oauth/callback.

:::info Client metadata The client metadata Neusis Code presents during registration carries the scope you configure and a redirect URI derived from callbackPort (or the default port 19876). Set oauth: false to turn off OAuth auto-detection entirely. :::

:::note Retired: Neusis Neuron Earlier installers could add an mcp.neusis-neuron block with a GitHub token to your global config. Nothing uses it now. To clean up, delete the block, delete ~/.neusis/bin/neusis-neuron-mcp, and revoke the token in your GitHub settings. :::

Server lifecycle​

A few behaviors are worth knowing when you work across projects:

  • Servers start per open directory. MCP connections are scoped to the directory (project instance) you have open — servers are connected for that instance rather than once globally. Opening a different directory gives that instance its own set of connections.
  • Dynamically-added servers can be disconnected. Servers added at runtime (not just those declared in your config file) are tracked per instance and can be connected and disconnected on demand; disconnecting marks the server disabled and closes its client.
  • enabled: false skips startup. Any server marked "enabled": false is reported as disabled and is not connected.