mcp-optimizer
Verified Safeby StacklokLabs
Overview
Acts as an intelligent intermediary MCP server, providing semantic tool discovery, caching, and unified access to multiple MCP servers for AI clients.
Installation
mcp-optimizerEnvironment Variables
- RUNTIME_MODE
- LOG_LEVEL
- COLORED_LOGS
- RICH_TRACEBACKS
- MCP_PORT
- RELOAD_SERVER
- TOOLHIVE_HOST
- TOOLHIVE_PORT
- TOOLHIVE_START_PORT_SCAN
- TOOLHIVE_END_PORT_SCAN
- K8S_API_SERVER_URL
- K8S_NAMESPACE
- K8S_ALL_NAMESPACES
- WORKLOAD_POLLING_INTERVAL
- REGISTRY_POLLING_INTERVAL
- STARTUP_POLLING_DELAY
- TARGETED_POLLING_MAX_ATTEMPTS
- TARGETED_POLLING_INTERVAL
- TOOLHIVE_TIMEOUT
- TOOLHIVE_MAX_RETRIES
- TOOLHIVE_INITIAL_BACKOFF
- TOOLHIVE_MAX_BACKOFF
- TOOLHIVE_SKIP_BACKOFF
- MCP_TIMEOUT
- ASYNC_DB_URL
- DB_URL
- EMBEDDING_MODEL_NAME
- EMBEDDING_THREADS
- ENCODING
- MAX_TOOLS_TO_RETURN
- TOOL_DISTANCE_THRESHOLD
- MAX_SERVERS_TO_RETURN
- HYBRID_SEARCH_SEMANTIC_RATIO
- ENABLE_EMBEDDING_CACHE
- REGISTRY_INGESTION_BATCH_SIZE
- WORKLOAD_INGESTION_BATCH_SIZE
- MAX_TOOL_RESPONSE_TOKENS
- ALLOWED_GROUPS
- SKIPPED_WORKLOADS
- ENABLE_DYNAMIC_INSTALL
- FASTEMBED_CACHE_PATH
- TIKTOKEN_CACHE_DIR
- SQLITE_TMPDIR
Security Notes
Uses f-strings for database table names, with internal warnings and controls to ensure they are not user-controlled. SQLite database file permissions are explicitly set to read/write for owner only. Relies on Kubernetes service account for in-cluster authentication. FTS queries are sanitized against common injection patterns. Binds to `0.0.0.0` for accessibility in containerized environments. No obvious 'eval' or malicious patterns found. Environment variables are used for sensitive configurations, preventing hardcoding.
Similar Servers
mcphub
An orchestration hub that aggregates, manages, and routes Model Context Protocol (MCP) servers and their tools, providing a centralized interface, user management, OAuth 2.0 authorization server capabilities, and AI-powered tool discovery and routing.
toolhive
ToolHive simplifies and secures the deployment, management, and orchestration of Model Context Protocol (MCP) servers, integrating them with AI clients and providing features like authentication, authorization, and observability.
aicode-toolkit
An MCP proxy server that aggregates multiple Model Context Protocol (MCP) servers, enabling on-demand tool discovery and execution, thereby significantly reducing AI agent token usage and improving context window efficiency by loading tools progressively.
mcpproxy-go
MCPProxy super-charges AI agents with intelligent tool discovery, massive token savings, and built-in security quarantine against malicious Model Context Protocol (MCP) servers.