Back to Home
alopez3006 icon

snipara-mcp-server

Verified Safe

by alopez3006

Overview

Optimizes and delivers relevant context from documentation to LLMs via the Model Context Protocol (MCP), aiming to reduce token cost and extend context windows.

Installation

Run Command
uvicorn src.server:app --host 0.0.0.0 --port 8000

Environment Variables

  • DATABASE_URL
  • OPENAI_API_KEY
  • REDIS_URL
  • LOG_LEVEL

Security Notes

The server implements several security measures: - **ReDoS Mitigation:** For the `rlm_search` tool using regex, it includes a maximum pattern length, checks for dangerous regex patterns (e.g., nested quantifiers), and runs regex searches with a timeout in a separate thread to prevent Regular Expression Denial of Service (ReDoS) attacks. It also truncates lines before regex processing. - **API Key Handling:** API keys are hashed using SHA-256 for storage and validation, enhancing security against direct key compromise. - **SQL Injection Prevention:** It primarily uses Prisma ORM for database interactions, which is generally robust against SQL injection. Raw SQL queries are parameterized, preventing injection vulnerabilities. - **Error Handling:** Error messages are sanitized before being returned to clients to prevent sensitive information disclosure. - **CORS Configuration:** CORS settings are configurable and issue a warning if a wildcard origin is used in non-debug environments. Overall, the code demonstrates a good understanding of common web security risks and implements appropriate mitigations.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassMedium
Avg Tokens5000
Stars0
Forks0
Last Update2026-01-19

Tags

LLM Context OptimizationModel Context ProtocolDocumentation SearchAPIKnowledge Retrieval