SkillAgentSearch skills...

mcp-gatehouse

Permission tiers, approval gates, and audit logging for MCP servers — enforced inside the server, built on the official Python SDK.

Install / Use

claude mcp add nickgeorgeseo -- npx -y github:nickgeorgeseo/mcp-gatehouse

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

74/100

Category

Security

Supported Platforms

Claude Code
Claude Desktop

Our assessment of mcp-gatehouse

mcp-gatehouse scores 74/100 on our quality scale, 1034th of 1,103 Security skills we index.

Its MCP Server is 55 KB long, well organised into 22 sections with 19 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
21/30
Structure
20/20
Description
15/15
Adoption
3/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 2 days ago, so mcp-gatehouse is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.

Automated pattern scan on 2026-11-25. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

mcp-gatehouse compared with similar skills

All 4 of these similar skills score higher than mcp-gatehouse; compare them before choosing.

SkillScoreStarsUpdatedFormat
mcp-gatehouse (this skill)by nickgeorgeseo7432d agoMCP Server
Agent-Reachby Panniantong100114.7k1d agoCLAUDE.md
hyperframesby heygen-com10090.0ktodayCLAUDE.md
rufloby ruvnet10082.4ktodayCLAUDE.md
headroomby headroomlabs-ai10080.8ktodayCLAUDE.md

Frequently asked questions

How do I install mcp-gatehouse?
Run claude mcp add nickgeorgeseo -- npx -y github:nickgeorgeseo/mcp-gatehouse. The install tabs above show the steps for each supported agent.
Which AI agents does mcp-gatehouse work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is mcp-gatehouse safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is mcp-gatehouse still maintained?
The repository was last updated 2 days ago, so mcp-gatehouse is actively maintained.

mcp-gatehouse

Project page & docs: nickgeorgeai.com/open-source/mcp-gatehouse · PyPI

<!-- mcp-name: io.github.nickgeorgeseo/gatehouse -->

CI PyPI Python License: MIT mcp-gatehouse MCP server

Gatehouse MCP server

Authorization as a runtime invariant for MCP servers. Every tool call needs a verified caller, an explicit policy, and a decision on the record it acts on, made by the server before the tool runs. If any of those is missing, the call doesn't run. Around that: permission tiers, approval gates, and an audit log of every call.

An agent wants to cancel order 4418. The gate asks three questions before any tool runs: who's asking (a verified caller), is it allowed (the policy says it's the caller's own order), and is it safe (a person approves). The approval card for cancel_order, marked destructive, is approved, and the call runs once and is logged. Everything else fails closed: no verified caller, someone else's order, a policy that hangs past 5 seconds, a change during approval. Every call writes one audit line. Ends on pip install mcp-gatehouse.

Most MCP servers hand the model every tool at full strength and keep no record of what it did. That's fine for a demo. It's not fine the day an agent has write access to your CRM, your books, or your order system. mcp-gatehouse is the missing gate, enforced inside the server — no proxy, no external policy service. It depends only on the official mcp SDK and opentelemetry-api, which the SDK already requires.

pip install mcp-gatehouse

Upgrading from 0.5? 0.6.0 fails closed. A tool without authorize= doesn't register, and over stdio a server without local_caller= denies every call. Pin mcp-gatehouse<0.6 until you've migrated; the migration steps are one short list.

Claude Code is asked to cancel order 4418; the server's approval form appears in Claude Code, naming who the call is for, the arguments, and the order as the server loaded it; ticking Approve lets it run. Asked to cancel order 4420, which belongs to someone else, the policy refuses it and no form appears. The audit log shows each call with its caller: pending, ok, then denied for someone else's order

The demo server in Claude Code: the model asks to cancel an order, the gate asks you in Claude Code's own UI, and the call runs. Then it tries an order that isn't yours, and the policy refuses it before anyone is asked. The audit log has a line for every call, with who it was for and why it was refused.

mcp-gatehouse demo on YouTube: the install, tiers, a cancel refused and one approved, and the audit log

The 1:21 demo runs the package's demo server in a terminal: the install, the one-decorator change, a cancel refused and one approved, and the audit log they left. No sound.

What you get

| | | |---|---| | Authorization on the record | Every tool names a policy. The gate loads the record the call is about from the model's arguments, your policy decides on it, and the tool gets that same object. The model can't describe a record into existence or reach one that isn't the caller's. | | No way around the gate | A tool without a policy doesn't register, the server refuses tools, resources, prompts, completions and SDK extension methods or interceptors registered around the gate, and a call with no verified caller is denied. Each opt-out is explicit and marked in the audit log. | | Check and write together | The policy's decision and the tool's write share one transaction you supply, or the write carries the checked state in its own condition. A record that changes after the check is never acted on. | | Lists filtered per item | A tool that returns records gets each one checked: what the caller may not see never reaches the model. | | Permission tiers | Every tool is declared READ, WRITE, or DESTRUCTIVE — and the tier also emits honest spec ToolAnnotations (readOnlyHint / destructiveHint), which the wrapper won't let you override to lie. | | Approval gates | Tiers you choose require a sign-off before the tool runs, asked right in the MCP client (Claude Code, Cursor, VS Code) or by any callable you write: a terminal prompt, a Slack ping, a ticket. Fails closed: a gated tool with no approver configured is denied, not waved through. | | Audit log | One record per call — allowed, denied, failed, or cancelled — with UTC timestamps and durations, who each call was for, and the policy's real reason for every refusal, in a documented schema. Append-only JSONL by default, or any sink you give it: a function, OpenTelemetry, your logging pipeline. The answer to "what did the AI actually do, and for whom?" six months later. | | Redaction | Argument keys you name (api_key, password, token, client_secret, … by default) are masked before they reach the log or the approver — however they're spelled: apiKey, API-Key and api_key are the same key. | | Denylist | Block a tool outright, whatever its tier. |

Quickstart

from typing import Annotated

from mcp.server.mcpserver import MCPServer
from pydantic import BaseModel

from mcp_gatehouse import (
    AccessTier, Allow, AuditLog, AuthorizationRequest, Caller, ConditionalWrite, Deny,
    ElicitationApprover, Gatehouse, Load, Policy, terminal_approver,
)

class Order(BaseModel):
    """Your record. Any Pydantic model, dataclass or mapping will do."""
    id: str
    owner: str
    status: str

mcp = MCPServer("order-desk")
gatehouse = Gatehouse(
    mcp,
    # Ask in the client's own UI; prompt on the terminal if it can't show a form.
    policy=Policy(approver=ElicitationApprover(fallback=terminal_approver)),
    audit=AuditLog(path="~/order-desk/audit.jsonl"),
    # Over stdio nobody signs in, so say who the calls are for.
    local_caller=Caller(client_id="local", subject="alice"),
)

def load_order(order_id: str) -> Order | None:
    """Your system of record. None means there's no such order."""
    ...

def owner_only(request: AuthorizationRequest) -> Allow | Deny:
    order = request.resources["order"]
    return Allow() if order.owner == request.caller.subject else Deny("not the owner")

@gatehouse.tool(tier=AccessTier.READ, authorize=owner_only)
def lookup_order(order_id: str, order: Annotated[Order, Load(load_order)]) -> str:
    """Look up an order's status."""
    return order.status

@gatehouse.tool(
    tier=AccessTier.DESTRUCTIVE,
    authorize=owner_only,
    consistency=ConditionalWrite(),  # the cancel's UPDATE checks the order's version
)
def cancel_order(order_id: str, order: Annotated[Order, Load(load_order)]) -> str:
    """Cancel an order. Runs only if it's the caller's and the approver says yes."""
    ...

mcp.run()

That's the whole integration: build your MCPServer exactly as the SDK docs show, but create the gatehouse first and register every tool through it. The model sees order_id and nothing else; the gate loads the order, your policy decides on it, and the tool gets the order the policy saw. Schema generation (including Annotated[..., Field(description=...)] parameter docs), transports, and everything else work unchanged. Sync tools still run in a worker thread, exactly as they would on a bare MCPServer.

Authorization: a runtime invariant

Most servers leave authorization to each tool, and nothing notices when one forgets. Here the server enforces it. Every call needs three things, checked in the server before the tool runs:

  1. A verified caller. That's the identity in the access token the SDK verified for the request. Over stdio, where nobody signs in, it's the local_caller you declare. An HTTP request with no verified token is nobody, even on a server that declares a local caller.
  2. An explicit policy. authorize= is required on every tool.
  3. A decision on the record itself. The gate loads each Load parameter from the model's arguments, gives the records to your policy, and hands the tool those same objects.

If any of the three is missing, the call is denied. Gatehouse doesn't know your business rules. What it guarantees is that they run at the right place, and that nothing gets around them:

  • A tool without authorize= raises at registration, so the server doesn't start.
  • The server refuses tools added around the gate. That covers @mcp.tool() and add_tool before or after the gate is created, MCPServer(tools=...), extension tools, and a tool slipped into the registry. A refused tool is hidden from tools/list and denied when called.
  • Resources, prompts and completions are other ways to the same data, and they have no policy: a template orders://{order_id} would read the record a tool checks, for anyone. So the server refuses them too, before or after the gate is created. Content that is the same for every caller (docs, a schema, a price list) goes through @gatehouse.open_resource(uri) or @gatehouse.open_prompt(), and a read without a verified caller is refused. These write no audit line. Anything that depends on who is asking belongs in a READ tool with a policy. Completions are refused outright: the SDK never tells the handler who is asking.
  • An SDK Extension gets the same treatment. Its tools and resources are refused with the rest, and so is a server whose extension serves request methods of its own (Extension.methods()) or overrides intercept_tool_call: both answer with no policy and no audit line. What the gate guards is the SDK's public registration surface. Code that writes into the SDK's private registries (a template put straight into _resource_manager._templates), adds a low-level request handler after the gate, or adds request middleware to the low-level server (server.middleware, provisional in the SDK, which wraps every request, tools/call included, and can answer before the gate does), runs with your server's trust, like any other code you install in it.
  • Nothing the gate fills can come from the model. A Load parameter never appears in the input schema, and registration fails if the SDK would put it there.

Each requirement has a way out, but only one you write down, and the audit log shows it:

| Requirement | Applies to | Declared with | Deliberate opt-out | Audit line shows | |---|---|---|---|---| | Verified caller | every call | the SDK's auth (token_verifier) | local_caller= (stdio only) | caller (local ones: "source": "local") | | Policy | every tool | authorize= | authorize=any_caller | authz: "open" | | Item filtering | tools returning a list of records | authorize_items= | authorize_items=any_item | items: "open" | | Check and write in one u

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3
CategorySecurity
Updated2d ago
Forks0

Languages

Python

Trust signals

92/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low