OMP Docs
Extend

MCP

Connect omp to external services and local programs through Model Context Protocol servers.

Connect your first server

Use MCP when a service or tool already publishes an MCP server and you want omp to work with it—for example, to search an issue tracker, query a database, or use a filesystem outside the current project. You configure the server once, then ask for the work in ordinary language.

Add the server

The quickest route is the guided setup inside omp:

/mcp add

Choose Project when everyone working in this repository should discover the server, or User when it is only for you.

Verify the connection

Verify the server immediately after setup:

/mcp test filesystem

A successful test shows the server name and version, its tool count, and up to ten tool names.

Use the tools in natural language

You can then ask for work in ordinary conversation:

Use the filesystem MCP server to summarize the Markdown files in my Documents folder.

You do not need to address MCP tools by their internal names.

Minimal configuration

For a local server, create .omp/mcp.json in the project. This example starts the official filesystem server and grants it access only to one directory:

{
  "$schema": "https://raw.githubusercontent.com/can1357/oh-my-pi/main/packages/coding-agent/src/config/mcp-schema.json",
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/alice/Documents"
      ]
    }
  }
}

Replace the path with an absolute directory on your machine. stdio is the default transport when type is omitted.

If you edit the file while omp is running, apply and verify the change with:

/mcp reload
/mcp list
/mcp test filesystem

/mcp list groups servers by source and shows whether each one is connected, connecting, inactive, disabled, or not connected.

Where omp looks

You often do not need to copy an existing MCP setup. omp automatically imports supported server definitions from Claude Code, Codex, Gemini CLI, OpenCode, Cursor, Windsurf, VS Code, installed plugins, and extension packages. Run /mcp list to see what was found and which file supplied it.

For configuration owned by omp, prefer:

ScopeFileUse it for
Project.omp/mcp.jsonA server definition shared by this repository
User~/.omp/agent/mcp.jsonYour personal servers in the default profile
Named profile~/.omp/profiles/<name>/agent/mcp.jsonServers isolated to omp --profile <name>
Portable fallbackmcp.json or .mcp.json at the project rootA lowest-priority file shared with other MCP clients

Project MCP discovery is enabled by default. The first definition found for a duplicate server wins; definitions are not merged. /mcp add, /mcp enable, /mcp disable, and OAuth commands write only omp-managed files, not another application's config.

Transports

Choose the transport published by the server. A URL ending in /sse does not by itself select SSE; set type explicitly for every remote server. A server cannot have both command and url.

Use for a local executable process. type may be omitted.

  • Required fields: command
  • Optional fields: args, env, cwd
{
  "$schema": "https://raw.githubusercontent.com/can1357/oh-my-pi/main/packages/coding-agent/src/config/mcp-schema.json",
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/alice/Documents"
      ]
    }
  }
}

Authentication and secrets

Bearer tokens and API keys

Protect credentials

Never commit tokens or client secrets directly into configuration files. Prefer environment variables, trusted secret evaluation commands, or managed OAuth.

Put credentials for a local process in env, or credentials for HTTP/SSE in headers. Reference an environment variable instead of committing the secret:

{
  "mcpServers": {
    "acme": {
      "type": "http",
      "url": "https://mcp.example.com/mcp",
      "headers": {
        "Authorization": "Bearer ${ACME_TOKEN}"
      }
    }
  }
}

omp expands ${VAR} and ${VAR:-default} in server configuration when it loads the file. In env and headers, a whole value that names an environment variable also resolves from the process environment. A value beginning with ! runs the remaining shell command and uses its trimmed output; use that only with a command you trust.

Although auth.type: "apikey" is accepted by the schema, it does not fetch and inject an API key. Use env or headers for API keys.

OAuth

For an HTTP or SSE server that supports OAuth, leave the token out and run:

/mcp reauth acme

omp opens the authorization flow and stores the credential in the active profile's auth storage (agent.db, or the configured auth broker), not in mcp.json. Use /mcp unauth acme to remove it. If the provider requires a registered client, add only the settings it requires:

{
  "mcpServers": {
    "acme": {
      "type": "http",
      "url": "https://mcp.example.com/mcp",
      "oauth": {
        "clientId": "${ACME_CLIENT_ID}",
        "clientSecret": "${ACME_CLIENT_SECRET}"
      }
    }
  }
}

OAuth credential scoping

OAuth credentials are bound to the active profile and server URL. An explicit Authorization header takes precedence over managed OAuth, so remove a stale header before reauthorizing. Because profiles may reuse credentials across checkouts pointing to identical URLs, isolate untrusted repositories in a dedicated profile.

Inspect and control servers

CommandWhat you see or change
/mcp listConfigured and discovered servers, source files, transports, and connection states
/mcp test <name>A temporary connection test, server version, tool count, and up to ten upstream tool names; press Esc to cancel
/mcp reloadRediscover config files and rebuild the current session's MCP connections and tools
/mcp reconnect <name>Reconnect one known server without rediscovering every config file
/mcp enable <name>Enable a server; for imported config, create a user-level override
/mcp disable <name>Disable a server by name, including one imported from another tool
/mcp reauth <name>Replace the active profile's managed OAuth credential
/mcp unauth <name>Remove that managed OAuth credential
/mcp resourcesList resources and resource templates exposed by connected servers
/mcp promptsList prompts exposed by connected servers and their slash-command names
/mcp notificationsShow notification support, subscriptions, and whether update injection is enabled
/mcp remove <name> [--scope project|user]Delete an omp-managed definition; project is the default scope
/mcp helpShow the current command reference

/tools shows every tool currently visible to omp. MCP tool names appear as mcp__<server>_<tool> after names are lowercased and normalized to underscores. omp may remove a repeated server prefix or shorten a very long name. These names help you identify where a capability came from; continue requesting work in natural language.

Connected servers may also publish prompts, resources, and notifications. /mcp prompts shows callable prompt commands in the form /server:prompt. Resource updates enter the conversation only when mcp.notifications is enabled; the default is off.

Safety

MCP servers run with elevated trust

Treat every MCP definition as executable, trusted configuration:

  • A stdio server runs its configured command with your user permissions. Review project MCP files before opening an unfamiliar repository.
  • Grant the smallest useful filesystem roots, OAuth scopes, database permissions, and API permissions.
  • A remote server receives the arguments and data needed for each requested operation. Use only endpoints and server packages you trust.
  • Disable an unwanted discovered server with /mcp disable <name> rather than editing another application's config.

Troubleshooting

Server field reference

FieldApplies toMeaning
enabledAllConnect unless false; user enable/disable overrides can supersede imported definitions
timeoutAllRequest timeout in milliseconds; 0 disables it
requestIdFormatAll"number" by default; use "string" only for a server that requires string JSON-RPC IDs
commandstdioExecutable to start
argsstdioArgument array passed without shell parsing
envstdioEnvironment variables passed to the process
cwdstdioWorking directory for the process
urlhttp, sseRemote MCP endpoint
headershttp, sseRequest headers, including token authentication
oauthhttp, sseOptional clientId, clientSecret, redirectUri, callbackPort, callbackPath, and prompt settings for authorization
authAllAdvanced stored-credential metadata; normally generated/resolved by managed OAuth rather than written by hand

User config may also contain disabledServers and enabledServers arrays. The denylist has highest precedence.

These related settings live in ~/.omp/agent/config.yml (or the active profile's config):

mcp:
  enableProjectConfig: true
  renderMarkdownResults: true
  notifications: false
  notificationDebounceMs: 500

Those are the defaults. notificationDebounceMs controls how long resource updates are grouped before they enter the conversation.


Source: omp.sh — MIT, Stencil Labs. Initially imported on 2026-10-03; updates via automatic sync.

OMP Docs· always in sync with upstream
oh-my-piomp.sh/docsContent MIT · Stencil Labs