MCP Catalog
The MCP Catalog is a local SQLite database (mcp_catalog.db) where ProxySQL stores all metadata discovered from backend servers. This metadata is essential for providing LLMs with the context they need to generate accurate SQL queries.
Catalog Tables
Core Structure
- schemas: Stores discovered database schemas.
- objects: Stores tables and views.
- columns: Detailed column metadata (type, nullable, etc.).
- indexes: Index definitions.
- index_columns: Mapping of columns to indexes.
- foreign_keys: Foreign key relationships.
- view_dependencies: Tracks which tables a view depends on.
AI & Agent Context
- runs: Tracks every execution of the discovery process.
- agent_runs: Tracks individual LLM agent sessions.
- agent_events: Log of actions performed by an agent during a run.
- llm_object_summaries: Stores natural language summaries of tables/views generated by LLMs.
- llm_notes: Miscellaneous observations about the schema.
- llm_search_log: Tracks semantic searches performed by agents.
Advanced Relationships
- inferred_relationships: Relationships not explicitly defined by foreign keys but detected by ProxySQL.
- llm_domains: Logical groupings of tables (e.g., "Finance", "Users").
- llm_domain_members: Mapping of tables to logical domains.
Location
The catalog file is stored in the ProxySQL data directory, defined by the datadir variable. A common location on Linux systems is:
/var/lib/proxysql/mcp_catalog.db
Management
The catalog is managed via MCP Tools like catalog.init and catalog.search, or by directly querying the ProxySQL Admin interface.