Back to Home
vgunti1982 icon

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

Run Command
source venv/bin/activate && python server.py

Environment 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

Stats

Interest Score0
Security Score1
Cost ClassLow
Stars0
Forks0
Last Update2025-12-14

Tags

LoggingObservabilitySemantic SearchVector SearchLocal AI