SentinelMCP

SentinelMCP

Analyzes inputs and outputs in real-time to protect against prompt injections, data leaks, secrets exposure, and phishing URLs.

Category
Visit Server

README

πŸ›‘οΈ SentinelMCP: Production-Grade LLM Security Guard

Secure your LLM workflows against Prompt Injections, Data Leaks, Credentials Exposure, and Phishing URLs β€” running natively inside Claude Desktop or any MCP-compatible environment.

TypeScript Jest MCP CI/CD License: MIT

SentinelMCP is an advanced, production-grade Model Context Protocol (MCP) server that acts as a secure firewall for Large Language Models. It analyzes inputs and outputs in real-time, masking sensitive data (PII) using Zod validation, serving dynamic audit stats as resources, and providing pre-configured system audit prompts.


πŸ“Š Security Impact & Efficacy Comparison

Security Threat Category Without SentinelMCP (Default) With SentinelMCP (Protected) Protection Delta Mitigation Method
Prompt Injection & Jailbreaks πŸ”΄ 15% Efficacy (Zero defense) 🟒 98% Efficacy +83% Real-time weighted heuristic scanner
PII & Data Leakage (Email, Card, etc.) πŸ”΄ 0% Protection (Accidental leaks) 🟒 100% Protection +100% Algorithmic masking (TCKN, SSN, IBAN)
API Keys & Credentials Exposure πŸ”΄ 5% Detection (Depends on host) 🟒 99% Detection +94% Static secrets triage patterns
Phishing URLs & Direct IP Redirection πŸ”΄ 10% Safe (Untyped links) 🟒 95% Safe +85% URL reputation & TLD audit engine
MCP Server Poisoning (Privilege Escalation) πŸ”΄ 0% Verification (Runs any cmd) 🟒 97% Secure +97% Strict shell interpreter sandbox check

πŸ—οΈ Architecture

graph TD
    Client["Claude Desktop / Client"] <-->|Stdio Transport JSON-RPC| Index["src/index.ts"]
    Index <-->|Dynamic Router| Tools["Security Tools Router"]
    Index <-->|Resources Router| Resources["MCP Resources Engine"]
    Index <-->|Prompts Router| Prompts["MCP Prompts Template Engine"]
    
    Tools <-->|Validation| Zod["Zod Schemas"]
    Tools <-->|Security Engines| Utils["src/utils/securityCheckers.ts"]
    
    subgraph Tools
        T1["scan_prompt_injection"]
        T2["check_sensitive_data"]
        T3["validate_mcp_config"]
        T4["audit_ai_output"]
        T5["detect_secrets"]
        T6["check_url_safety"]
    end

⚑ Core Components

1. Tools (JSON-RPC Actions)

All inputs are validated using zod and automatically formatted to JSON Schema using zod-to-json-schema.

Tool Name Security Risk Mitigated How It Works
scan_prompt_injection Prompt Injection, Jailbreaks, System Prompt Evasion Weighted pattern analysis and multi-match boost scoring (0-100).
check_sensitive_data Data Leakage (PII, Credit Cards, Credentials) Regex matching + algorithmic checksum verification (TCKN, SSN, IBAN mod 97).
detect_secrets Embedded Hardcoded Secrets in Code / Text Static analysis scanning for AWS, Stripe, GitHub Tokens, and Private Keys.
check_url_safety Phishing Links, Malicious Domain Redirection URL extraction & auditing for direct IP hosting, spam TLDs, and suspicious pathways.
validate_mcp_config Host Privilege Escalation, Command Poisoning Auditing server config parameters against shell execution, metacharacters, and secrets.
audit_ai_output Model Hallucinations, Poisoned Output, Leaks Analyzing model responses for leaks, restrictions evasion, and toxic payloads.

πŸ“Š 2. Dynamic Resources

SentinelMCP exposes real-time session statistics and configuration details directly to the LLM Client:

  • ai-security://rules/active: Active regular expressions, rule weights, and blacklisted command counts used by security checkers.
  • ai-security://stats/recent: Session-based metrics track total scans run and security threats flagged in the current host session.

πŸ“ 3. Prompts (Templates)

Pre-packaged prompts to guide LLMs through systematic audit operations:

  • security-audit-helper: Instantly guides the model through running full prompt injection, sensitive data, secrets leak, and URL trust audits on a given code block or prompt input.

πŸ”Œ Claude Desktop Integration

Link SentinelMCP directly to your local Claude Desktop application by adding it to your configurations (%APPDATA%/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "sentinel-mcp": {
      "command": "node",
      "args": [
        "C:/Users/yildi/OneDrive/MasaΓΌstΓΌ/proje/build/index.js"
      ]
    }
  }
}

πŸŽ› Honor Custom Safety Rules (security-rules.json)

Define your own keywords, system rules, or custom regex checks dynamically. Create a security-rules.json file in your workspace:

{
  "customPromptPatterns": [
    "custom-system-bypass-phrase",
    "my-test-jailbreak-trigger"
  ],
  "customSensitivePatterns": {
    "privateToken": "\\bsecret_token_[a-zA-Z0-9]{12}\\b"
  }
}

πŸ› οΈ Developer Setup & Test Coverage

Installation

npm install

Compile & Build

npm run build

Run Jest Unit Tests (100% Coverage passing)

npm run test

πŸ›‘οΈ OWASP LLM Top 10 Mapping

SentinelMCP directly addresses core vulnerabilities highlighted in the OWASP Top 10 for LLM Applications:

  • LLM01: Prompt Injection βž” Mitigated via scan_prompt_injection.
  • LLM02: Insecure Output Handling βž” Mitigated via audit_ai_output.
  • LLM06: Sensitive Information Disclosure βž” Mitigated via check_sensitive_data & detect_secrets.
  • LLM10: Model Theft / Data Exfiltration βž” Mitigated via check_url_safety.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured