observability-mcp-server
by vgunti1982
Overview
Provides log search capabilities, including regex-based keyword search and natural language semantic search, for local log files.
Installation
source venv/bin/activate && python server.pyEnvironment Variables
- LOG_DIRECTORY
- INDEX_PATH
- MAX_SEARCH_RESULTS
- DEFAULT_TAIL_LINES
- EMBEDDING_MODEL
- VECTOR_TOP_K
Security Notes
CRITICAL VULNERABILITY: The `read_resource` function, which calls `log_resource.tail_log`, is susceptible to path traversal. The `uri.replace("log:///", "")` sanitization is insufficient to prevent an attacker from using `../` sequences in the URI (e.g., `log:///../../../../etc/passwd`) to read arbitrary files outside the designated log directory. This allows unauthorized access to sensitive system files. Additionally, the `LogSearchTool` uses `re.compile` directly on user-provided regex patterns, which could potentially expose the server to a Regular Expression Denial of Service (ReDoS) attack, although this is less critical than the path traversal.
Similar Servers
logfire-mcp
Enables LLMs to retrieve and analyze application telemetry data (OpenTelemetry traces and metrics) from Pydantic Logfire, including executing arbitrary SQL queries.
ai-sessions-mcp
Allows AI agents to search, list, and read your previous local coding sessions from multiple CLI coding agents.
semantic-code-search-mcp-server
This MCP server exposes indexed code data to AI coding agents, enabling structured interaction for codebase understanding, code discovery, symbol analysis, and file content reconstruction.
search-mcp
A local-first Model Context Protocol (MCP) server providing semantic search and indexing capabilities for codebases, enabling AI assistants to understand and interact with project code and documentation.