local-mcpserver
by majidraza1228
Overview
Converts various document types (PDF, DOCX, XLSX, images, etc.) and URLs to Markdown format, offering AI assistant integration, a web interface, and file system automation.
Installation
./markitdown_server/start_http_streaming.shEnvironment Variables
- DB_DSN
- DB_READONLY
- DB_MAX_ROWS
- PORT
- LOG_LEVEL
- MAX_FILE_SIZE
- ALLOWED_ORIGINS
- UPLOAD_DIR
Security Notes
CRITICAL VULNERABILITIES IDENTIFIED: 1. Local File Disclosure/Arbitrary File Read: The `convert_file` and `convert_batch` MCP tools (exposed via both STDIO and HTTP APIs) accept an arbitrary `path: str` argument. A malicious actor could specify paths like `/etc/passwd` to read sensitive server files, or other system files, leading to unauthorized information disclosure. 2. SQL Injection: The `db_preview` tool in `db_server/server.py` constructs SQL queries via f-strings with a user-controlled `table` name (`f"SELECT * FROM {table} LIMIT {limit}"`). This is vulnerable to SQL injection if `table` contains malicious input. Other Concerns: - CORS policy set to `allow_origins=['*']` is overly permissive for production environments. - Hardcoded API key example (`'your-secret-token'`) in `MCP_HTTP_GUIDE.md` might be overlooked and used as-is in deployments. - File uploads are saved to `tempfile.NamedTemporaryFile` before processing, which is standard, but the overall lack of input validation on file paths for conversion tools remains a severe risk.
Similar Servers
context-portal
Manages structured project context for AI assistants and developer tools, enabling Retrieval Augmented Generation (RAG) and prompt caching within IDEs.
sqlite-mcp
A Model Context Protocol (MCP) server that enables LLMs to interact with SQLite databases by providing tools and resources for querying and managing data.
simple-memory-mcp
A Model Context Protocol (MCP) server for persistent memory storage, providing intelligent tagging and full-text search for AI assistants to remember context across conversations.
sqlite-mcp
Integrates Model Context Protocol (MCP) servers, enabling SQLite databases to call their AI tools directly from SQL queries.