db-explorer

db-explorer is a skill for Claude Code, Codex from AYUSH-148/DB-Explorer-MCP. It costs 85 tokens per session (893 once invoked), scanned A, original, MIT.

A read-only tool for examining SQL databases. It can show tables and relationships, run limited read-only SELECT queries, explain slow queries, suggest indexes, and check migration scripts without applying them.

In plain words
What is it for?
Use it to inspect schemas, retrieve data, investigate slow SQL, review indexes, check database health, and validate migrations before they run.
Why use it?
It lets developers inspect data and database structure without write access or accidentally running a migration. Read limits and timeouts help keep exploratory queries controlled.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect schemas, retrieve data, investigate slow SQL, review indexes, check database health, and validate migrations before they run.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ayush-148/db-explorer-mcp/db-explorer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AYUSH-148/DB-Explorer-MCP --skill db-explorer
Clone the repo
git clone --depth 1 https://github.com/AYUSH-148/DB-Explorer-MCP

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for db-explorer

README.md
[![agentmods](https://agentmods.dev/badge/skills/ayush-148/db-explorer-mcp/db-explorer/github.svg)](https://agentmods.dev/skills/ayush-148/db-explorer-mcp/db-explorer)
Your own site
<a href="https://agentmods.dev/skills/ayush-148/db-explorer-mcp/db-explorer"><img src="https://agentmods.dev/badge/skills/ayush-148/db-explorer-mcp/db-explorer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for db-explorer

Your own site · 80×15
<a href="https://agentmods.dev/skills/ayush-148/db-explorer-mcp/db-explorer"><img src="https://agentmods.dev/badge/skills/ayush-148/db-explorer-mcp/db-explorer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 893 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.00893
Opus 5.5 $0.00034 $0.00357
Sonnet 5.5 $0.00017 $0.00179
Haiku 4.5 $0.00009 $0.00089

Measured today against content hash 5f46525c8f5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

db-explorer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/db-explorer/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DB Explorer

Answer database questions with the db-explorer MCP server. Every tool is read-only: queries must be one SELECT, run inside a read-only transaction with a timeout and a row cap, and migration scripts are checked, never executed.

Setup (once)

The server is open source (MIT): https://github.com/AYUSH-148/DB-Explorer-MCP. It needs Python 3 and uv.

git clone https://github.com/AYUSH-148/DB-Explorer-MCP
claude mcp add -s user db-explorer --env DATABASE_URL="postgresql+psycopg2://user:pass@host:5432/db" -- uv --directory "/path/to/DB-Explorer-MCP" run server.py

Then run /mcp and confirm 7 tools are listed. Other clients: see the repo README. Point DATABASE_URL at a database user with read-only grants.

The server may be registered under any name, so its tools can appear as mcp__<server>__explore_schema. Look for the tool names (explore_schema, execute_query, explain_query, validate_schema, suggest_index, migration_context, validate_migration) under any server. Only if none are available, tell the user to set the server up. Don't write SQL for them to run by hand.

Workflow

  1. Find the tables. explore_schema() lists tables, views and the SQL dialect. Skip it if you already know the table names.
  2. Read the columns. Call explore_schema(detail=true) once to cover every table the question touches. Add name_pattern only when those tables share a name fragment. On a big schema, page with offset=next_offset.
  3. Query. execute_query with SQL in the reported dialect. If the result says truncated: true, say so. The rows shown are not the full result.
  4. Slow query? explain_query for the plan. suggest_index(query=...) reports full table scans in the plan but writes no SQL, so write the CREATE INDEX yourself from the WHERE/JOIN columns. suggest_index(table_name=...) returns CREATE INDEX statements for unindexed foreign keys.
  5. Schema audit? validate_schema reports missing primary keys, unindexed foreign keys, wide tables and tables with no indexes.
  6. Migration? Read migration_context, draft up/down SQL, then check it with validate_migration before the user runs it. It checks statement types, not syntax, so don't call the script verified. Pass up_sql/down_sql with no SQL comments. The user runs it, not you.

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 63 lines · 85 tokens per session scan A 5f46525c8f5f

Subscribe to this mod's changes

db-explorer is a skill published in the GitHub repository AYUSH-148/DB-Explorer-MCP (8 stars, last pushed yesterday), licensed MIT. It adds 85 tokens to every session and 893 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-17.

Related

Other skills, from other repositories

servicenow-cmdb

Auditing the CMDB as a data model: CI class hierarchy, raw relationships, CMDB health scorecards, data quality (duplicates, orphans, staleness, missing fields) and CSDM 5 conformance. Use when the user mentions CMDB health, CMDB audit, data quality, duplicates, orphaned or stale CIs, CI classes, relationships in…

jschuller/mcp-server-servicenow · 110 tokens

exploring-tables

Exploring any ServiceNow table: schema, field types, sample records, relationships, and data patterns. Use when the user mentions tables, schemas, fields, data dictionary, sysdictionary, sysdbobject, table structure, 'what fields does X have', or wants to understand a ServiceNow table they haven't worked with before.

jschuller/mcp-server-servicenow · 71 tokens

amazon aurora dsql

Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.

awslabs/mcp · 46 tokens

dv-query

Bulk reads, multi-page iteration, and analytics over Dataverse data. Use when the user wants to read, list, filter, aggregate, group, join, or analyze records — including pandas DataFrame workflows and notebook exploration. Also covers ERP (Finance and Operations / F&O) business-data reads and runtime entity, schema…

microsoft/Dataverse-skills · 82 tokens

solr-schema

To design and audit Solr schemas: field types, analyzers, docValues, solrconfig.

griddynamics/rosetta · 25 tokens

dv-connect

One-step setup and connection diagnostics for a Dataverse environment — installs tools, authenticates, registers MCP, writes .env, and verifies active profiles and linked ERP endpoints. Use when starting a new project, switching environments, fixing authentication, troubleshooting MCP, or checking existing Dataverse /…

microsoft/Dataverse-skills · 66 tokens