OpenProgram Docs

MCP

Each connected server's tools appear in chat as <name>__<tool>. Its resources and prompts reach the model through the mcp_meta tools in Built-in tools.

openprogram mcp add drawio -- npx -y @drawio/mcp
openprogram mcp list
openprogram mcp show drawio
CommandEffect
openprogram mcp add NAME COMMAND…Adds a stdio server, effective at once. --env KEY=VALUE (repeatable), --timeout (startup and per-call seconds), --disabled (write config, do not start).
openprogram mcp listStatus of every server
openprogram mcp show NAMEIts tools and full schemas
openprogram mcp rm NAMEStops it and deletes its config
openprogram mcp restart NAMEStops and starts it
openprogram mcp enable, disable NAMEToggles; disable keeps the config
openprogram mcp testStarts an ad-hoc server, confirms a tool list, writes nothing
openprogram mcp editCompatibility only: reports that raw editing was removed because it exposed stored secrets. Use add, rm or the MCP settings page.

Management commands talk to the background worker: openprogram worker start, openprogram status. Servers connect in the background when the worker starts; the App and core API stay available meanwhile. Until ready its tools are unavailable; mcp list and the settings page show the status.

Configuration

~/.openprogram/mcp_servers.json (with --profile <name>, ~/.openprogram-<name>/mcp_servers.json):

{
  "servers": {
    "drawio": {
      "type": "local",
      "command": ["npx", "-y", "@drawio/mcp"],
      "env": {},
      "enabled": true,
      "timeout_seconds": 30
    },
    "linear": {
      "type": "http",
      "url": "https://mcp.linear.app/mcp",
      "auth": {"kind": "oauth", "client_name": "OpenProgram"},
      "enabled": true
    }
  }
}

Transports and auth

typeTransportFields
localstdio subprocesscommand, env
httpStreamable HTTPurl, headers, auth
sseLegacy SSEurl, headers, auth
auth.kindNeeds
noneNothing
bearertoken
oauthOAuth 2.1 PKCE. Servers with dynamic client registration need nothing; others need client_id and client_secret.

OAuth sign-in happens once

WhenWhat happens
First connectionOpens the consent page and captures the redirect on localhost
SavedTokens, the client registration and discovered endpoints, in ~/.openprogram/mcp_tokens/<server>.json (mode 0600)
Later connectionsReuse them; an expired token renews silently
Refresh token rejectedThe browser returns, and the management UI shows the server as needing re-authentication
Switch accountsPOST /api/mcp/servers/{name}/auth/clear wipes the state and restarts the server

Serve OpenProgram over MCP

openprogram mcp token create
export OPENPROGRAM_MCP_TOKEN="<paste the token printed above>"
openprogram mcp serve

token create prints the token as one raw line and does not set the environment. If one exists, reuse it. serve rejects a missing or mismatched token.

Last updated · 2026-11-25