docs(readme): add MCP Server feature section#24
Conversation
Document the remote MCP server in the README Features list: the Streamable HTTP `/mcp` endpoint with Bearer-token auth, pure vs. delegated agents, the permission-shaped tool surface (list_connections / list_objects / describe_table / explain_query / query / write_data / run_ddl), and that MCP reuses the same IAM, per-statement permission detection, and audit path as the UI. Includes an [[agents]] + [[iam]] config snippet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds an MCP Server entry to the README Features section to document pgconsole’s remote MCP endpoint for external AI agents, including auth, agent types, tool surface, and an example [[agents]] / [[iam]] configuration snippet.
Changes:
- Documented the MCP server capability in the README Features list.
- Described agent authentication and the permission-shaped MCP tool surface.
- Added a TOML snippet showing how to configure a standalone agent and authorize it via IAM.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Two agent kinds** — a *pure* service account (authorized by `agent:<id>` IAM rules) or a *delegated* agent that acts on behalf of a user, optionally capped to fewer permissions or connections | ||
| - **Permission-shaped tools** — every agent can `list_connections`; catalog tools (`list_objects`, `describe_table`) appear once it has an accessible connection, and execution tools unlock per grant: `explain_query` (`explain`), `query` (`read`), `write_data` (`write`), `run_ddl` (`ddl`) | ||
| - **Same governance as the UI** — every statement runs through per-statement SQL permission detection, default-deny IAM, and the audit log |
There was a problem hiding this comment.
Good catch, and technically correct: resolvePermissions short-circuits to all permissions when auth is disabled or no [[iam]] rules are defined (IAM is opt-in), so "default-deny" and "authorized by agent:<id> IAM rules" describe the model only once auth + IAM are active.
I've left the wording as-is for now because it deliberately mirrors the framing already used in the README's existing Database Access Control section ("Default deny — users have no access unless a rule explicitly grants it"), which likewise describes the active-IAM model rather than the auth-off/no-rules shortcut. Qualifying it only in the MCP section would make the two inconsistent.
If we want to surface the opt-in shortcut, the better fix is a one-liner in the Database Access Control section (the canonical place for it) rather than the MCP blurb — happy to do that in a follow-up if you'd like.
What
Adds an MCP Server entry to the README Features section (right after AI Assistant), documenting pgconsole's remote MCP server for external AI agents.
The section covers:
/mcpwithAuthorization: Bearer <token>authagent:<id>IAM) vs. delegated (on_behalf_of, with optional permission/connection caps) agentslist_connections(always), catalog toolslist_objects/describe_table(once a connection is accessible), and execution toolsexplain_query(explain),query(read),write_data(write),run_ddl(ddl)[[agents]]+[[iam]]config snippetWhy
The MCP server is a shipped capability (
server/mcp.ts) but wasn't listed among the README features.Verification
Wording was checked against
server/mcp.ts,server/lib/config.ts,server/lib/iam.ts, andpgconsole.example.toml. Docs-only change — no code paths touched.🤖 Generated with Claude Code