How hydrolix/mcp-hydrolix works
Hydrolix MCP Server exposes Hydrolix database operations as MCP tools. A client connects over stdio, HTTP, or SSE; the server handles database/table discovery and SQL queries, then returns results. Query handling also covers SQL text processing, table-column analysis, attribution, and result limits. Authentication and runtime configuration support the server, with optional HTTP serving and Prometheus metrics. The graph uses README capabilities and the supplied source excerpts and index; unsampled implementation details are represented only where documented.
Main entry points: mcp_server.py MCP server · main.py Server launcher · webapp.py HTTP app · column_analysis.py Column analysis
Components 19
Server runtime
- Server launcher
mcp_hydrolix/main.py - HTTP app
mcp_hydrolix/webapp.py - MCP server
mcp_hydrolix/mcp_server.py - HTTP middleware
mcp_hydrolix/middleware.py
Database operations
- Database discovery
mcp_hydrolix/mcp_server.py - Table metadata
mcp_hydrolix/mcp_server.py - Select query tool
mcp_hydrolix/mcp_server.py
Query processing
- SQL normalization
mcp_hydrolix/statement.py - Column analysis
mcp_hydrolix/column_analysis.py - Result models
mcp_hydrolix/models.py
Identity and observability
- Runtime config
mcp_hydrolix/mcp_env.py - Authentication
mcp_hydrolix/auth/mcp_providers.py - Credential resolution
mcp_hydrolix/auth/__init__.py - Query attribution
mcp_hydrolix/attribution.py - Request attribution
mcp_hydrolix/middlewares/request_attribution.py - Prometheus metrics
mcp_hydrolix/metrics.py - Structured logging
mcp_hydrolix/log/log.py
Other components
- MCP client
- Hydrolix cluster
Connections 21
- MCP client → MCP server: calls tools
README.md - Server launcher → HTTP app: starts HTTP
mcp_hydrolix/main.py - Server launcher → MCP server: runs stdio
mcp_hydrolix/main.py - Server launcher → Runtime config: reads config
mcp_hydrolix/main.py - MCP server → Hydrolix cluster: queries cluster
README.md - MCP server → Database discovery: dispatches
README.md - MCP server → Table metadata: dispatches
README.md - MCP server → Select query tool: dispatches
README.md - Select query tool → SQL normalization: normalizes SQL
mcp_hydrolix/mcp_server.py - Select query tool → Column analysis: analyzes columns
mcp_hydrolix/mcp_server.py - Column analysis → Result models: classifies columns
mcp_hydrolix/column_analysis.py - Select query tool → Result models: returns results
mcp_hydrolix/mcp_server.py - MCP server → Credential resolution: resolves credentials
mcp_hydrolix/mcp_server.py - Credential resolution → Authentication: uses providers
mcp_hydrolix/auth/__init__.py - MCP server → Request attribution: registers middleware
mcp_hydrolix/mcp_server.py - Request attribution → Query attribution: resolves fields
mcp_hydrolix/middlewares/request_attribution.py - MCP server → Query attribution: adds query comment
mcp_hydrolix/mcp_server.py - MCP server → Prometheus metrics: records metrics
mcp_hydrolix/mcp_server.py - HTTP app → HTTP middleware: configures middleware
mcp_hydrolix/webapp.py - Server launcher → Structured logging: sets up logging
mcp_hydrolix/main.py - Prometheus metrics → Runtime config: reads settings
mcp_hydrolix/metrics.py