Agents & MCP
Register MCP servers with a client (Claude Code and friends): stdio vs HTTP transports, scoping, passing secrets by env not argv, and debugging a server that will not connect.
1 file
Description
Register MCP servers with a client (Claude Code and friends): stdio vs HTTP transports, scoping, passing secrets by env not argv, and debugging a server that will not connect.
Adding an MCP server to a client's config, deciding local vs project vs user scope, or fixing a server that registers but never connects.
{
"mcpServers": {
"orders": {
"command": "node",
"args": ["./servers/orders/dist/index.js"],
"env": { "DATABASE_URL": "postgres://..." }
}
}
}
Pass secrets through env, never in args. Arguments show up in process listings and shell history; environment variables do not.
command plus args yourself in a terminal. If it does not start standalone, the client cannot start it either.stdout: on a stdio server, any non-protocol write to stdout (a console.log, a banner) corrupts the JSON-RPC stream and the client reports it disconnected. All logging goes to stderr.args path resolves against the client's working directory, not the config file. Prefer an absolute path or a documented cwd.args leaks into process listings. Use env.Added 2026-07-01. Back to the Skill Library.

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.