mcp-bd-service
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_ROWS | No | Maximum number of rows returned by queries. | |
| CATALOG_PATH | No | Path to the optional semantic catalog YAML file. | metadata/catalog.yaml |
| DATABASE_URL | Yes | Database connection URL in SQLAlchemy format, e.g. sqlite:////absolute/path/data.db or postgresql+psycopg://readonly:password@host/db. | |
| DENIED_TABLES | No | Comma-separated list of tables that must not be accessed. | |
| ALLOWED_TABLES | No | Comma-separated list of tables that may be accessed. | |
| MASKED_COLUMNS | No | Columns whose values should be masked in query results. | |
| MCP_AUTH_TOKENS | No | Bearer token(s) required for HTTP transport authentication. Several comma-separated tokens are accepted, allowing rotation. | |
| MCP_CORS_ORIGINS | No | Optional CORS origins for HTTP transport. | |
| MCP_ALLOWED_HOSTS | No | Allowed hosts for DNS-rebinding protection. | |
| MCP_ALLOW_NO_AUTH | No | Set to true to allow binding a non-local address without an authentication token. Only use behind your own auth proxy. | false |
| QUERY_TIMEOUT_SECONDS | No | Query timeout in seconds. | |
| MCP_RATE_LIMIT_PER_MINUTE | No | Per-client rate limit for HTTP requests. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only access to a SQL database whose content is not known in advance. Recommended workflow:
list_tables (or search_schema with a keyword from the question) to find relevant tables.
describe_table on those tables to learn columns, keys, relationships and example rows. Use profile_column to see the real values of a column (categories, ranges) before filtering on it.
run_query with a single SELECT. Compute counts, sums, averages and rankings in SQL (COUNT/SUM/AVG/GROUP BY); never count rows by hand. Only use table and column names returned by these tools. Never invent data: if a result is truncated, it is not the complete set.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tablesB | List all tables and views with their description, column count and row count. |
| describe_tableC | Columns (type, nullability, keys, description), foreign keys, tables that reference it, synonyms and a few example rows of one table. |
| get_relationshipsA | All foreign-key relationships between tables (how to JOIN them). |
| search_schemaA | Find tables and columns whose name, description or synonyms match a keyword (accent-insensitive, any language used in the catalog). |
| sample_rowsB | Return the first rows of a table to see what the data looks like. |
| profile_columnB | Statistics of a column: nulls, distinct values, min/max/avg and the most frequent values. Use it to learn valid filter values. |
| run_queryA | Run ONE read-only SQL query (SELECT or WITH ... SELECT) in the database's SQL dialect. Results are limited in rows and execution time. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explore_database | Prompt template to answer a question about the database step by step. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| schema_overview | Compact overview of every table, its columns and relationships. |
TDQS
Scored across 7 tools
Each tool has a clearly distinct role in the discovery-to-query workflow. Minor overlap: describe_table returns example rows, which duplicates sample_rows, and profile_column vs sample_rows both touch per-column/per-table data inspection.
All tools follow a consistent snake_case verb_noun pattern (list_tables, describe_table, profile_column, run_query). No mixing of conventions.
Seven tools is well-scoped for a read-only database exploration service, with each tool earning its place across discovery, understanding, and querying.
Strong coverage of the read-only lifecycle: discovery (list/search), understanding (describe, relationships, profile, sample), and execution (run_query). Minor gaps like schema-level listing or query explanation are easy workarounds; write operations are reasonably out of scope.