@dici1435/db-mcp
v0.1.2
Published
Database query and schema inspection MCP server for dici-spec projects.
Maintainers
Readme
@dici1435/db-mcp
Database query and schema inspection MCP server for dici-spec projects. Read-only PostgreSQL access for AI agents to inspect data and schema.
Installation
npm install -g @dici1435/db-mcp
# or run directly
npx @dici1435/db-mcpTypically added to a project via dici-spec add db, which configures the MCP server and prompts for your database connection string.
Tools
| Tool | Description |
|---|---|
| db_query | Execute a read-only SQL query (SELECT only). Mutations are rejected. Supports parameterized values. |
| db_describe_table | Get full schema for a table: columns, types, nullability, defaults, indexes, foreign keys, constraints, row count |
| db_sample_rows | Fetch sample rows (1-100) from a table for data exploration |
| db_compare_entity | Compare a spec data-model entity against the actual DB schema. Reports drift: missing/extra columns, type mismatches |
| db_refresh_schema | Refresh cached schema metadata for all tables. Use after running migrations. |
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
| DATABASE_URL | Yes | — | PostgreSQL connection string (e.g. postgresql://user:pass@localhost:5432/mydb) |
Transport
Stdio (stdin/stdout). Designed to be launched by AI agent IDEs as a child process.
License
MIT
