Skip to content
MCP server

mcp-pin

Pins MCP tool definitions at approval and blocks the session when they change

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
Version
0.2.4
Listing updated
3 days ago

About mcp-pin

mcp-pin is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

The problem mcp-pin targets is quiet drift: you approve a server once, and its tool descriptions can change later while the approval still stands. Those descriptions reach the model as instructions, and most clients never ask again.

On first connect the proxy records a SHA-256 fingerprint of every tool, prompt and server instruction in canonical form, so formatting changes never count but one altered character does. Every later tools/list, prompts/list and instruction set is compared before delivery. If something changed or was added, nothing queued is forwarded, the session is blocked, and a labelled diff appears in the terminal for you to accept or refuse. No model is involved.

A second part is a signed, append-only public log from crawling public MCP servers. The site reports that 34 servers had changed when the crawler resumed on 12 November 2026. For teams there are JSON lock files for pull requests, a CI gate and generated admin settings, and one command wraps the local servers it finds in your AI apps.

Install

Run in a terminal

claude mcp add mcp-pin -- npx -y mcp-pin

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-pin": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-pin"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-pin": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-pin"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-pin": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-pin"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-pin": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-pin"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-pin": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-pin"
      ]
    }
  }
}

What it does

Fingerprint on approval
Hashes every tool, prompt and instruction when a server first connects.
Blocks on change
Stops the session and shows a diff before anything reaches the model.
Public drift log
Signed, hash-linked history of public servers' definitions.
Lock files
Readable JSON committed so reviews show exactly what changed.
CI gate
Fails a build when definitions drift.
One-command setup
Finds servers in your AI apps and fronts local ones.

Good for

  • Catch a rug pull after a trusted server updates its tools
  • Review a tool-description diff in a pull request
  • Enforce one policy across several MCP clients
  • Check a server's public change history
  • Pin the version you reviewed instead of the newest

Pricing

Open source

Free and open source

Prices change. Check mcp-pin.gautamkhosla.com before you buy.

mcp-pin FAQ

Does it use a model to judge changes?

No. It compares fingerprints on your machine with no model in the loop.

What happens on a change?

The session is blocked and you decide whether to accept a labelled diff.

Does formatting trigger a block?

No. Fingerprints use canonical form, so only content changes count.

Can I verify the public log?

Yes. You can download it and check every hash yourself.

Is mcp-pin free?

Yes. mcp-pin is open source, so you can use and self-host it for free.

How do I add mcp-pin to Claude Code?

Run this command in your terminal: claude mcp add mcp-pin -- npx -y mcp-pin

What are the best alternatives to mcp-pin?

The closest alternatives to mcp-pin are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to mcp-pin

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools