mcp-sanitizer
Verified Safeby starman69
Overview
Provides a comprehensive security sanitization library and example implementations for Model Context Protocol (MCP) servers and general Node.js applications.
Installation
node examples/mcp-server-basic.jsSecurity Notes
The project is explicitly focused on security, demonstrating a strong defense-in-depth approach. It actively mitigates various injection types (SQL, Command, NoSQL, Template, Prototype Pollution), path traversal, XSS, and advanced Unicode attacks (homographs, directional overrides, null bytes, multi-encoding). The codebase includes explicit fixes for CVE-TBD-XXX issues, robust ReDoS protection, and a unified parser to prevent differential attacks. It leverages well-known security libraries like `sqlstring`, `shell-quote`, and `sanitize-filename`. While no system is perfectly impenetrable, the design and implementation show a high level of security awareness and best practices. Production policies enforce strict rules, including blocking sensitive protocols and private IPs. There are no obvious hardcoded secrets in the provided truncated source code examples, and `eval` or similar dangerous functions are used in patterns to *detect* attacks, not for internal execution.
Similar Servers
tiger-linear-mcp-server
This server acts as a wrapper for the Linear API, providing focused tools for LLMs to manage and query issue tracking and project data.
mcpd-proxy
Provides a network proxy for Minecraft Protocol connections, facilitating traffic management and potential modifications.
strawberry-mcp
This MCP server provides a tool for Large Language Models (LLMs) to count the occurrences of a specific letter within a given word, serving as a simple joke/learning example for building MCP tools.
mcp_server_ts
A Node.js Model Context Protocol (MCP) server designed to expose defined tools, currently featuring a placeholder 'create-user' capability, for interaction with external models or clients.