Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Sovereign Gateway

by mattijsmoensversion 0.3.0i★ 0iRuns on your computerRepository ↗
Registry nameio.github.mattijsmoens/sovereign-mcp-gateway

How to install

What it does

Gating proxy for MCP servers: policy, verification and one audit trail across upstreams.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Other

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness7/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score7/100

Quality: Passed 2/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Sovereign Gateway. Follow https://mcp.popnx.com/i/mattijsmoens-sovereign-mcp-gateway.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 2/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Sovereign Gateway for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "sovereign-gateway": { "command": "uvx", "args": [ "sovereign-mcp-gateway", "--config", "{config_path}" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Sovereign Gateway tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "sovereign-gateway": {
          "command": "uvx",
          "args": [
            "sovereign-mcp-gateway",
            "--config",
            "{config_path}"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Sovereign Gateway and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Sovereign Gateway or shows a Sovereign Gateway tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Sovereign Gateway yet

Sovereign Gateway runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Sovereign Gateway

  • Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)

B · Others in Other that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Sovereign Gateway for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user sovereign-gateway -- uvx sovereign-mcp-gateway --config '{config_path}' 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Sovereign Gateway tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user sovereign-gateway -- uvx sovereign-mcp-gateway --config '{config_path}'
  4. Type /mcp in Claude Code

    You should see Sovereign Gateway listed as connected

  5. Try it

    Use Sovereign Gateway and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Sovereign Gateway or shows a Sovereign Gateway tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Sovereign Gateway for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "sovereign-gateway": { "command": "uvx", "args": [ "sovereign-mcp-gateway", "--config", "{config_path}" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Sovereign Gateway tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Sovereign Gateway and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Sovereign Gateway or shows a Sovereign Gateway tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Sovereign Gateway for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "sovereign-gateway": { "type": "stdio", "command": "uvx", "args": [ "sovereign-mcp-gateway", "--config", "{config_path}" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Sovereign Gateway tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Sovereign Gateway and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Sovereign Gateway or shows a Sovereign Gateway tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Sovereign Gateway💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user sovereign-gateway -- uvx sovereign-mcp-gateway --config '{config_path}'

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "sovereign-gateway": {
      "command": "uvx",
      "args": [
        "sovereign-mcp-gateway",
        "--config",
        "{config_path}"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "sovereign-gateway": {
      "command": "uvx",
      "args": [
        "sovereign-mcp-gateway",
        "--config",
        "{config_path}"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "sovereign-gateway": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sovereign-mcp-gateway",
        "--config",
        "{config_path}"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
42/wk
Licencei
No licence stated
Connection
Runs on your computer
Latest versioni
0.3.0
Categoryi
Other
Published to registryi
Aug 23, 2026
Code last changedi
Aug 25, 2026
Maker
mattijsmoens
Packages
pypi: sovereign-mcp-gateway
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account mattijsmoens, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 3 months ago

  • ! Caution

    Has a licence

    GitHub could not identify the licence type; open the file to check

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for sovereign-mcp-gateway@0.3.0

Checks only this package version, not every dependency · checked Nov 16, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/mattijsmoens-sovereign-mcp-gateway.svg)](https://mcp.popnx.com/en/servers/mattijsmoens-sovereign-mcp-gateway)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Otheri

  • More stars than 0% of the other 20868 servers in this category
  • Published to the registry more recently than 24% of the other 20868 servers in this category
  • Basic checks equal to or better than 46% of the other 20868 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Sovereign Gateway safe?

It passed 2 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 3 months ago, and the latest version (0.3.0) reached the registry 3 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

by koala73Widely used★ 90.9KUpdated 4 days ago

Runs in the cloud✓ service owner · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

by openstatusHQWidely used★ 9.3KUpdated 2 months ago

Runs in the cloud✓ service owner · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

by JanDeDobbeleerWidely used★ 23.8K Stars for the whole repoUpdated 31 days ago

Runs in the cloud✓ service owner · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

by Klavis-AIGrowing★ 5.8KUpdated 14 months ago

Runs in the cloudRepo archived✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

by jitsucomWidely used★ 5.1KUpdated 4 months ago

Runs in the cloud✓ service owner · jitsu.com
Compared with similar ones
This one
Sovereign Gateway
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks2/34/44/44/41/44/4
LicenseNOASSERTIONAGPL-3.0AGPL-3.0MITApache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

sovereign-mcp-gateway

A gating proxy for Model Context Protocol servers. Point your MCP client at the gateway instead of at your servers. It connects to every upstream you list, merges their tool catalogues into one, and puts every call through a verification chain before it reaches the server that would execute it.

pip install sovereign-mcp-gateway

sovereign-mcp-gateway --init # writes gateway.json from the servers you already run sovereign-mcp-gateway --config gateway.json --check

--init reads the MCP configuration you already have (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) and writes a gateway.json that proxies those same servers, so the first run produces a working config rather than a configuration error. It will not import the gateway's own entry, because that would make it proxy itself.

The gateway is itself an MCP server, so any client that speaks MCP works with no changes.

That base install is a working gateway. Four optional extras add further layers on top — see Installing.


What it stops

An agent reads a GitHub issue whose body carries an instruction aimed at the model rather than at you. It is persuaded, and calls git_commit.

commits afterinjected commit present
straight to mcp-server-git2yes
through the gateway1no

Same tool, same arguments, same server. The difference is whether anything was in a position to refuse.

Read the walkthrough: [Your agent reads an issue](docs/your-agent-reads-an-issue.md) — or run it:

pip install "sovereign-mcp-gateway[all]" mcp-server-git

python examples/poisoned_issue.py

Why a proxy and not a library

A library has to be adopted by whoever wrote the server. A proxy protects servers you cannot modify — which is most of them, because the useful MCP servers are published packages someone else maintains.

It also gives you one place to hold policy and one audit trail across every server an agent can reach, rather than per-server configuration nobody keeps in sync.

Configure

Start from what you already run
$ sovereign-mcp-gateway --init

Wrote gateway.json

imported 3 servers from Claude Desktop /Users/you/Library/Application Support/Claude/claude_desktop_config.json imported 1 server from VS Code (project)

upstreams: fetch, git, sqlite, time

skipped: sovereign - this gateway - importing it would proxy itself notion - no command, probably a remote/SSE server git - already imported from another client

Four things it will not do: import itself, import a remote server it cannot launch as a subprocess, overwrite an existing file without --force, or write a deny_tools list you did not choose. It writes the file, tells you what it took and what it left, and stops.

Pass --config PATH alongside --init to write somewhere other than ./gateway.json.

After running it, replace those servers in your client with a single entry for the gateway. Leaving both means your agent talks to them directly as well as through the proxy, and the audit trail will only show half the traffic.

{

"servers": { "git": {"command": "mcp-server-git", "args": ["--repository", "/repo"]}, "sqlite": {"command": "mcp-server-sqlite", "args": ["--db-path", "/data.db"]} }, "policy": {"deny_tools": ["git__git_reset"], "pii_policy": "warn"}, "audit": {"path": "gateway-audit.jsonl"} }

Check the wiring before a client ever sees it:

sovereign-mcp-gateway --config gateway.json --check
SOVEREIGN GATEWAY - configuration check

upstreams: 2 layers: policy -> intent -> text-filter -> frozen-verify -> audit

EXPOSED AS UPSTREAM TOOL git__git_status git.git_status git__git_reset git.git_reset [DENIED] sqlite__read_query sqlite.read_query ... 18 tools exposed.

The chain

policy → intent → text-filter → frozen-verify → [ call executes ] → output-verify → logic-rules → audit
LayerPackageRefuses when
policy—the tool is on a deny list, or absent from an allow list
intentintentshieldthe call fails the behavioural floor
text-filtersovereign-shieldan argument carries injection, in any of 21 languages or seven encodings
frozen-verifysovereign-mcpthe call disagrees with the tool definition frozen at startup
output-verifysovereign-mcpthe result fails schema, deception, PII or content checks
logic-ruleslogicshieldthe result is inconsistent with rules you configured
auditsovereign-mcp— records every call, allowed or refused, in a hash-chained log

Installing

The base install is a working gateway, not a stub:

pip install sovereign-mcp-gateway

That gives you policy → frozen-verify → audit, which already refuses a tool no upstream exposes, an argument of the wrong type, an undeclared parameter, a tool on your deny list, and prompt injection in an argument. Nothing else needed.

Each extra adds a layer on top:

ExtraAddsWorth it when
[text]sovereign-shield — a deeper pass over string arguments: 21 languages, and seven-variant decoding for payloads hidden in base64, hex, ROT13, leetspeak or reversed textYour agents read text from anywhere you don't control. The base install catches IGNORE ALL PREVIOUS INSTRUCTIONS; it will not catch the same sentence base64-encoded, or written in Dutch
[intent]intentshield — a behavioural floor applied regardless of which tool was called: shell bans, delete bans, credential URLs, malware syntaxYou want a backstop that doesn't depend on getting every tool's schema right
[rules]logicshield — consistency rules you write for tool *output*You can express what a correct result looks like. Does nothing until you set output_rules
[consensus]requests — needed by Layer C's HTTP providersYou're enabling N-model consensus with a hosted provider

Combine what you want, or take everything:

pip install "sovereign-mcp-gateway[text]"             # one extra

pip install "sovereign-mcp-gateway[text,intent]" # several pip install "sovereign-mcp-gateway[all]" # every layer

All four extras are small pure-Python packages — [all] adds no compiled dependencies and no service to run.

A partial install degrades visibly. The gateway prints its active layers at startup, so you can always see what is actually running:

layers:   policy -> frozen-verify -> audit                                  # base

layers: policy -> intent -> text-filter -> frozen-verify -> audit # [all]

If a layer isn't on that line, it isn't running — whatever you think you installed.

Verified end to end

Against mcp-server-git and mcp-server-sqlite running as real upstreams, driven by a real MCP client:

CallResult
git__git_status, git__git_logallowed
sqlite__create_table, __write_query, __read_queryallowed — the row is really in the database
git__git_resetrefused: on the deny list
git__git_push_forcerefused: no upstream exposes it
git__git_status(repo_path=12345)refused: wrong type for the frozen schema
git__git_commit("IGNORE ALL PREVIOUS INSTRUCTIONS…")refused: text filter
sqlite__git_commit(...)refused: a tool cannot be reached through another upstream's namespace

Afterwards the repository still holds one commit and the database holds exactly the row it should — checked by opening them directly, not by trusting the gateway's own report. Eleven audit records for ten calls; editing any one of them breaks the chain.

Those cases are the test suite, not a screenshot: pytest tests/ -v.

Layer C: N-model consensus

Every other layer is deterministic and local. Layer C is the exception: it asks several independent models to extract the same structured document from a tool's result, canonicalises each answer, and compares the SHA-256 hashes. Agreement is decided by hash, not by prose.

It is off unless configured, because it is the only layer that costs money and latency per call, and the only one that sends tool output to a model.

{

"servers": { "...": {} }, "consensus": { "providers": [ {"type": "local", "model": "llama3.1:8b"}, {"type": "local", "model": "qwen2.5:7b", "base_url": "http://localhost:11434/v1"}, {"type": "openrouter", "model": "anthropic/claude-3.5-sonnet", "api_key_env": "OPENROUTER_API_KEY"} ] } }

Two provider types: `local` (any OpenAI-compatible endpoint — Ollama, vLLM, LM Studio; base_url defaults to http://localhost:11434/v1) and `openrouter` (the key is read from the named environment variable, never written in the config).

Three rules the gateway enforces at startup rather than discovering at runtime:

  • At least two providers. One model cannot disagree with itself; a consensus of one reports agreement on every call, which is worse than no layer because it looks like verification.
  • No duplicate models. Two instances of the same model agreeing is not independent verification.
  • A missing API key refuses to start. It does not fall back to running without the layer.

All providers run at temperature = 0, enforced in the constructor.

Check your models agree before you trust the layer

--check runs one real consensus call against your configured models and tells you what happened. This matters more than it sounds:

LAYER C  - probing the configured models with one real call

OK. The configured models produced identical documents. Layer C will pass ordinary output rather than refusing it.

Consensus compares canonical hashes, so two models that are both *semantically* right but structurally different never agree. A weaker model that echoes the schema back —

{"branch": {"type": "string", "value": "main"}}   instead of   {"branch": "main"}

— mismatches on every call, forever, and the gateway refuses everything with a reason that correctly reads "the models disagreed". Because they did.

The probe distinguishes the three outcomes:

means
OKthe models produced identical documents; the layer is usable
MISMATCHthey disagree on a trivial document and will refuse every call — replace a model, or drop the section
provider unreachablenothing was verified; a key, a model ID or an endpoint is wrong

Install sovereign-mcp-gateway[consensus] or [all] — the HTTP providers need requests, which the core library deliberately does not depend on.

--check also lists the active layers, so you can confirm at a glance:

layers:   policy -> intent -> text-filter -> frozen-verify -> consensus -> audit

If consensus is absent from that line, it is not running, whatever the config says.

Namespacing

With namespace on (the default) a tool is exposed as git__git_status. Two upstreams offering the same tool name cannot collide, shadow each other, or be reached through the wrong namespace. Turn it off only when you have a single upstream.

Policy

"policy": {

"deny_tools": ["git__git_reset", "write_query"], "allow_tools": null, "pii_policy": "warn", "fail_closed": true, "rate_limit_interval": 0 }

  • `deny_tools` matches either the exposed name (git__git_reset) or the upstream tool name (git_reset, on every upstream that has it).
  • `allow_tools`, when set, refuses everything not listed.
  • **`

Only the beginning is shown; read the rest in the repo