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.
npx agentmods add instructions/hc-hyun/db-mcp/agents-mdgit clone --depth 1 https://github.com/hc-hyun/db-mcpWrote 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.
[](https://agentmods.dev/instructions/hc-hyun/db-mcp/agents-md)<a href="https://agentmods.dev/instructions/hc-hyun/db-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/hc-hyun/db-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02576 | $0.02576 |
| Opus 5 | $0.01288 | $0.01288 |
| Sonnet 5 | $0.00515 | $0.00515 |
| Haiku 4.5 | $0.00258 | $0.00258 |
Grade A, and why
db-mcp AGENTS.md 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 5d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Scope
This file applies to the entire repository. If a more specific AGENTS.md is
added under a subdirectory, its instructions supplement and take precedence
within that subtree.
Understand the Project First
postgres-mcp is a small text-to-SQL backend that exposes multiple PostgreSQL
data sources through one stateless Streamable HTTP MCP endpoint. The MCP host's
AI interprets natural language and generates SQL. This server exposes the real
database catalog and executes one parameterized PostgreSQL statement against
one selected data source inside a constrained transaction.
Before making changes, read the following in order as relevant to the task:
README.md: external contracts, configuration, and usagedocs/service-boundaries.md: what the service does and does not owndocs/architecture-v0.4.0.md: component responsibilities and operational invariantsdocs/code-story-ko.md: the end-to-end flow of one request- For deployment changes only:
docs/deployment.md,Dockerfile, anddeploy/k8s/postgres-mcp.yaml
Do not treat the local .env, generated dist/ artifacts, .runtime/ logs, or
cache directories as work targets.
Fixed Product Boundaries
The following are intentional product invariants. Do not add options or compatibility paths for them unless the requirements explicitly change.
- The public MCP surface consists of exactly two tools:
search_objectsandexecute_sql. - The server does not provide a separate MCP prompt, a general-purpose REST API, or a web UI.
- The executable is
postgres-mcp. The transport is stateless Streamable HTTP, the path is/mcp, and responses are JSON. - Database configuration comes only from the TOML file referenced by
POSTGRES_MCP_CONFIG. The process does not load.envimplicitly or fall back to CLI arguments or DSN environment variables. - TOML contains host, port, database, execution policies, and the names of credential environment variables. Usernames and passwords are read from the environment and must not appear in public results or representations.
- PostgreSQL is the only supported database. Do not introduce a common driver, adapter, or backend layer until a real second database requirement exists.
- One SQL statement runs against exactly one data source. Cross-source joins and transactions are outside this service's responsibility.
- Each source creates its pool lazily on first use. Concurrent first access to the same source is serialized by one lock. A connection that fails to initialize is not stored in the registry.
- MCP requests are stateless, but the process owns and reuses pools until shutdown.
/healthzreports process liveness./readyzreports that configuration has loaded and the server can accept requests. Readiness must not preconnect to every database.- Safe defaults include read-only transactions, prepared statements,
$1-style parameters, row limits, and statement and connection timeouts. - PostgreSQL permissions, TLS, and user authentication belong to PostgreSQL and the gateway or ingress. Application settings do not replace those controls.
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.
- 5d ago First seen · 251 lines · 2,576 tokens per session scan A 9db45cdd93de
db-mcp AGENTS.md is an instructions file published in the GitHub repository hc-hyun/db-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 2,576 tokens to every session, about $0.0129 per session on Opus 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-08-31.
Other instructions, from other repositories
lms-front AGENTS.md
AGENTS.md instructions for guillermoscript/lms-front, covering claude.md, project overview, commands, development and database (supabase).
lms-front CLAUDE.md
Claude Code instructions for guillermoscript/lms-front, covering claude.md, project overview, commands, architecture and multi-tenancy.
postgres-skills AGENTS.md
Instructions for neondatabase/postgres-skills, covering agents.md, repository overview, creating a new skill, directory structure and naming conventions.
rails_ai_agents AGENTS.md
AGENTS.md instructions for ThibautBaissac/rails_ai_agents, covering project configuration, tech stack, architecture, key commands and tests.
pgroles AGENTS.md
AGENTS.md instructions for thepartly/pgroles, covering agents.md, build & test commands, format + lint (always run before committing), unit tests (no database needed) and integration tests (requires live postgresql).
pg_exporter AGENTS.md
Instructions for nbari/pg_exporter, covering agents.md, project shape, first steps, devpod workflow (preferred) and local commands.