ncode CLI Features
MCP servers
MCP servers#
MCP (Model Context Protocol) servers add their tools to the agents. ncode supports two transports:
| Transport | What you give it |
|---|---|
| stdio (a local process) | a command, its arguments, and environment variables (KEY=VALUE) |
| http (streamable HTTP) | a URL and request headers (Name: value) |
A server is either global (every project) or scoped to one project. It can be switched off without deleting it, and each of its tools has its own switch: a tool you turn off is not offered to any agent. The environment variables and headers you enter are stored like your other keys.
A tool the server marks as read-only is treated like a read and never asks. Every other MCP tool is treated like a shell command: blocked in Read-only, asked about in Auto, allowed in Full access.
Adding a server in Settings#
Open Settings (F2) at MCP servers. There you can:
- add a stdio server (a command, its arguments and
KEY=VALUEenvironment variables) or an HTTP server (a URL andName: valueheaders); - import the servers of a
.mcp.jsonfile, the format other coding tools use; - switch a server, or single tools of it, on and off;
- reconnect a server after you changed or restarted it.
Environment values and headers are masked on screen. Probing a server runs as a task with its seconds shown; c cancels it.
Adding a server from a script#
ncode config record add mcp_server docs --http https://mcp.example.com/mcp
printf '%s' "$DOCS_TOKEN" | ncode config secret mcp_server:docs.headers.Authorization --stdin
ncode config record add mcp_server files --stdio npx -y @modelcontextprotocol/server-filesystem .
ncode config record add mcp_server github --stdio github-mcp-server stdio
printf '%s' "$GITHUB_TOKEN" | ncode config secret mcp_server:github.env.GITHUB_PERSONAL_ACCESS_TOKEN --stdinHeader and environment values that are secrets go through config secret … --stdin, never the command line. Then:
ncode config mcp toggle docs # switch the server off or on
ncode config mcp reconnect docs # reconnect it
ncode config records mcp_server # list your servers