Skip to main content

MCP

drwn mcp is the MCP-scoped namespace for inspecting and writing MCP server state. The two subcommands are read (list) and write (write); the write side is an alias for drwn write --mcp-only and shares the same materialization engine.

drwn mcp list

List MCP servers from the merged registry, with active state under the current effective config.

drwn mcp list
drwn mcp list --json

The merged registry is the built-in registry/mcp-servers.json unioned with standalone MCP inventory at ~/.agents/drwn/mcp-servers/ and definitions declared by locked Cards in the current project. Standalone records override built-in entries; Card definitions participate before project activation toggles are interpreted. Output columns are name, transport, active, and targets.

drwn mcp list is project-aware: when run inside a configured project, the active set reflects the project overlay (<project>/.agents/drwn/config.json) and any extension-derived MCP state (e.g. extensions.parallel.mcp).

This command is read-only.

drwn mcp write

Write the effective MCP configuration into enabled downstream targets.

drwn mcp write --dry-run
drwn mcp write
drwn mcp write --target=claude
drwn mcp write --target=cursor
drwn mcp write --json

drwn mcp write is equivalent to drwn write --mcp-only. --dry-run previews changes without mutating files. --target limits the write to one of claude, codex, or cursor.

Where MCP definitions live

SourcePathOwner
Built-in registryregistry/mcp-servers.jsonpackaged harness
Standalone MCP inventory~/.agents/drwn/mcp-servers/<id>.jsondrwn-managed machine-local records
Card-declared definitionslocked card manifests and card store contentcard authors
Registry/target configregistry/config.jsonpackaged harness
Machine selections~/.agents/drwn/machine.json under capabilities.mcpServersmachine-local
Project overlay<project>/.agents/drwn/config.jsonper-project

Inclusion rules

Machine and project evaluation use separate inclusion rules:

  • Machine scope activates only profile MCP IDs plus explicit capabilities.mcpServers IDs.
  • transport: "platform-provided" entries are never projected into local tool configs.
  • In a project, drwn add mcp <name> writes servers.<name>.enabled = true; this also enables optional MCPs declared only by locked cards.
  • Inside a project, extensions.parallel.mcp = true enables the project-local Parallel MCP overlay; the project overlay can also enable or disable any individual server.
  • Packaged optional/Parallel flags never activate machine MCPs.

Generated config

drwn write (and drwn mcp write) produce target-specific output:

  • Claude: per-server owned fields in ~/.claude.json (or project .mcp.json)
  • Codex: per-server owned fields in ~/.codex/config.toml
  • Cursor: per-server owned fields in ~/.cursor/mcp.json

Unrelated fields and server IDs survive machine writes. A same-ID field that is not in the global write record is foreign and blocks projection.

  • Write — full materialization, including skills
  • Status — see which MCP servers are active and why
  • Doctor — detect MCP drift between recorded and live state