2026 Agent Wrapped is here! Check out yours

Allowed MCP servers

A tool name such as mcp__github__create_issue carries only the label someone gave the server. Any server can be labelled github. mcp_servers allows servers by what they run or connect to, and refuses every other one:

version: "1.0"
settings:
  mcp_servers:
    allow:
      - url: https://mcp.linear.app/*            # a final /* is the only wildcard
      - url: https://api.githubcopilot.com/mcp
      - npm: "@modelcontextprotocol/server-filesystem"
      - npm: "@playwright/[email protected]"             # this version only
      - pypi: mcp-server-fetch
      - command: ["/usr/local/bin/acme-mcp", "serve"]
      - connector: claude.ai Gmail               # no config on this machine
rules:
  - id: mcp-server-not-allowed
    mode: enforce

Put it in ~/.prismor/policy.yaml for your own machine, in a project's .prismor/policy.yaml, or in the organization policy.

Without the setting, any server is allowed. An empty list allows none. An invalid value counts as a list that allows none until it is fixed; prismor policy validate shows the problem. Start with mode: observe to see which servers your agents use before you block.

What each entry matches

EntryMatches
urlScheme, host, port and path. The query string is ignored. Also matches npx mcp-remote <url>.
npmnpx [-y] <package>. Without a version, any published version or tag.
pypiuvx <package>, the same way.
commandThe exact program and arguments. Use it for docker run, bunx, pnpm dlx, uvx --from and cmd /c npx.
connectorThe name only, and only when no definition of that name is on this machine: hosted connectors and servers built into the agent's app.

A package name counts only when it is a plain registry name. An npm alias (x@npm:y), a Git, URL or file source, --registry, --package, or a path to another npx does not match. A server is also refused when its env sets a variable that can change what runs, such as PATH, NODE_OPTIONS, LD_PRELOAD, npm_config_* or UV_*.

Arguments after an allowed package are not checked. Do not allow a package whose job is to start or connect to other servers (@smithery/cli, supergateway, mcp-proxy): its arguments choose the server. Allow the exact command instead.

Where it is checked

  • MCP gateway. It checks a server before it starts the process or connects, and again on each call. A refused server never runs.
  • Hooks. They check each MCP tool call. The agent has already started the server by then, so a hook stops the calls and not the process. Prismor looks the name up in the config files of the agent that made the call. If several definitions have that name, each must be allowed.

Hooks identify MCP servers for Claude Code, Codex, Cursor, Windsurf, Copilot, Gemini CLI, Antigravity, OpenCode, Qwen Code and Continue (servers in ~/.continue/config.json). Prismor does not read Grok's MCP config, so only connector entries match there.

Kiro, Crush, OpenHands, Goose, Hermes and OpenClaw calls do not name the server in a form Prismor reads, so hooks do not cover them. Route their servers through the gateway. The LLM proxy does not run this check.

Which policy file wins

A repository's .prismor/policy.yaml cannot replace a list set in ~/.prismor/policy.yaml or by the machine's admin, change the rule's mode, or add an exception to it. The signed organization policy replaces both, and the same protection then applies against every local policy file.

Known limits

  • Hooks cannot see servers passed on the command line (claude --mcp-config). Such a server can reuse the name of an allowed one.
  • Hooks read the config as it is at the time of the call. A server started before an edit keeps running the old command.
  • A package entry says which package is asked for. npx can still take it from a local node_modules, or from the registry in the project's .npmrc.

Related