# mcp-pin

> mcp-pin is an open-source MCP server for security. Pins MCP tool definitions at approval and blocks the session when they change. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Website:** https://mcp-pin.gautamkhosla.com
- **Repository:** https://github.com/gautamtalksdev/mcp-pin
- **MCP Registry name:** io.github.GautamTalksDev/mcp-pin
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-pin -- npx -y mcp-pin
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-pin": {
      "command": "npx",
      "args": [
        "-y",
        "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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-pin
