Back to Home
StacklokLabs icon

mcp-optimizer

Verified Safe

by 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

Run Command
mcp-optimizer

Environment 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

Stats

Interest Score38
Security Score8
Cost ClassMedium
Avg Tokens1500
Stars8
Forks0
Last Update2026-01-19

Tags

Semantic Tool DiscoveryUnified AccessTool ManagementGroup FilteringKubernetes Integration