Skip to main content
Glama

MCP Sentinel ๐Ÿ›ก๏ธ

CI License: MIT Version: v0.2.0 Python Version Protocol: MCP SARIF v2.1.0 PRs Welcome

MCP Sentinel is a high-performance Model Context Protocol (MCP) security server and CLI tool designed as an automated safety & secret guardrail for Claude Code, Claude Desktop, and autonomous AI coding agents.

As autonomous AI agents read, refactor, and commit large codebases, they risk accidentally persisting sensitive environment variables, hardcoded API keys (Anthropic, OpenAI, HuggingFace, Stripe, AWS, GitHub), or generating dangerous dynamic execution patterns (eval, exec, unescaped os.system). MCP Sentinel verifies every patch and workspace in real time before changes hit disk or production.


๐ŸŒŸ What's New in v0.2.0

  • ๐ŸŒ 25+ Secret & Cloud Providers: Full detection coverage for Anthropic, OpenAI, Hugging Face, GitHub Fine-Grained PATs, GitLab, AWS, Google Cloud, Azure Storage, Stripe, Slack, Discord, SendGrid, Supabase, and private key blocks.

  • ๐Ÿ“Š OASIS SARIF v2.1.0 Export: Direct integration with GitHub Code Scanning, allowing automated vulnerability tabs on GitHub Pull Requests.

  • โšก High-Speed Concurrent Scanner: Multi-threaded parallel file auditing capable of scanning thousands of files in milliseconds.

  • ๐Ÿช Pre-Commit Hook Integration: Ready-to-use .pre-commit-hooks.yaml for pre-commit and pre-push stages.

  • ๐Ÿ› ๏ธ 4 Native MCP Tools: Extended agent toolkit with scan_code_security, check_token_entropy, audit_repository_security, and generate_sarif_report.


Related MCP server: @arcwall/mcp-server

๐Ÿš€ Quick Start

Installation

Clone the repository and install in editable mode:

git clone https://github.com/businesscanva12-tech/mcp-sentinel.git
cd mcp-sentinel
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

๐Ÿค– Integration with Claude

1. Claude Desktop Setup

Add mcp-sentinel to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "sentinel": {
      "command": "python",
      "args": ["-m", "mcp_sentinel.cli", "serve"]
    }
  }
}

2. Claude Code CLI Setup

Register Sentinel directly into your Claude Code workspace:

claude mcp add sentinel python -m mcp_sentinel.cli serve

๐Ÿ’ป CLI Usage

Sentinel can be used directly from your terminal or CI/CD pipelines:

Standard Scan

# Scan current repository
mcp-sentinel scan .

# Scan with 16 parallel threads
mcp-sentinel scan . --workers 16

Export to SARIF for GitHub Code Scanning

# Generate SARIF report for GitHub Actions
mcp-sentinel scan . --format sarif -o report.sarif

Run as an MCP Server

mcp-sentinel serve

๐Ÿช Pre-Commit Hook Configuration

Add MCP Sentinel to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/businesscanva12-tech/mcp-sentinel
    rev: v0.2.0
    hooks:
      - id: mcp-sentinel

๐Ÿงช Running Tests

Sentinel includes a comprehensive test suite covering pattern recognition, Shannon entropy calculations, and AST node visitors:

python -m unittest discover -s tests

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Check out the Contributing Guidelines to get started.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Security scanning for AI coding tools (Claude Code, Cursor, Windsurf) including secrets detection, MCP config vulnerabilities, agent instruction checks, threat modeling, prompt injection testing, pre-commit security checks, and dependency vulnerability scanning.
      7
      47 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding tools to scan projects for security vulnerabilities, hardcoded secrets, injection flaws, and privacy violations with 699 rules and 76 MCP tools, all running locally with zero telemetry.
      24 npm
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP-compatible AI agents to scan code for leaked secrets, copyleft licenses, unprotected routes, missing privacy policies, and risky card handling before committing or shipping.
      86 npm
      MIT