PostgreSQL MCP Server — Give AI Agents Live SQL Access
Install the PostgreSQL MCP server to let Claude Code, Cursor, and Windsurf query your live database. Read schemas, run SELECTs, inspect query plans, and debug slow queries — all without copy-pasting SQL back and forth with the AI.
Install PostgreSQL MCP Server
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:password@localhost:5432/dbname"
]
}
}
}PostgreSQL MCP Server — Database Queries for AI
MCP server for PostgreSQL database access. Run read-only SQL queries, inspect schemas, list tables, and analyze data directly from Claude Code or Cursor.
Jina Reader — AI-Friendly Web Content Extraction
Convert any URL to clean markdown for AI consumption. Free API at r.jina.ai strips ads, navigation, and clutter. Used by AI agents for web research and RAG.
Claude Code Templates — 600+ Agents, Commands & MCPs
Ready-to-use Claude Code configurations: 600+ agents, 200+ commands, 55+ MCPs, and project templates. Install any template with one command.
Google Stitch MCP — AI Design via Model Context Protocol
Connect Claude Code, Cursor, Gemini CLI, or VS Code to Google Stitch for AI-driven UI design. Create projects, generate screens from text, edit designs, manage design systems — all via MCP.
Pal MCP Server — Multi-Model AI Gateway for Claude Code
MCP server that lets Claude Code use Gemini, OpenAI, Grok, and Ollama as a unified AI dev team. Features model routing, CLI-to-CLI bridge, and conversation continuity across 7+ providers.
Chrome MCP Background Proxy — Fix Popups, Focus Stealing & Multi-Agent Conflicts
Drop-in proxy for Chrome MCP. Solves Chrome 146+ debugging popups, focus stealing, and multi-agent conflicts with persistent CDP connection, request ID remapping, and sessionId-based event routing.
Neon — Serverless Postgres with Database Branching
Serverless PostgreSQL with instant database branching, autoscaling, and a generous free tier. Branch your database like git branches — test schema changes without touching production. 16,000+ stars.
Appwrite — Open-Source Backend for AI Apps
Complete cloud backend with auth, database, storage, functions, and messaging in one platform. Self-hostable. 55K+ GitHub stars.
Codebase Memory MCP — Code Knowledge Graph Server
High-performance MCP server that indexes codebases into persistent knowledge graphs. Supports 66 languages, sub-millisecond queries, and claims 99% fewer tokens than raw file context. 1,100+ stars.
Neon MCP — Serverless Postgres via AI Agents
MCP server for Neon serverless Postgres. Create projects, branch databases, run SQL, optimize queries via natural language. Safe migration workflow with branching. MIT, 574+ stars.
Codebase Memory MCP — Code Intelligence for AI Agents
High-performance code intelligence MCP server. Indexes repos in milliseconds via tree-sitter AST, supports 66 languages, sub-ms graph queries. MIT, 1,300+ stars.
MCPHub — Centralized MCP Server Management Hub
Manage multiple MCP servers from one dashboard. Smart routing, hot-swap config, OAuth 2.0 auth. Deploy via Docker in one command. Apache-2.0, 2,000+ stars.
LMDeploy — High-Performance LLM Deployment Toolkit
Deploy and serve LLMs with 1.8x higher throughput than vLLM. 4-bit quantization, OpenAI-compatible API. By InternLM. 7.7K+ stars.
Smithery CLI — MCP Server Registry & Installer
Search, install, and manage MCP servers from Smithery's registry of 6,000+ servers. One command to connect any MCP server to Claude, Cursor, or other AI tools. AGPL-3.0.
Wrangler MCP — Cloudflare Workers for AI Agents
MCP server for managing Cloudflare Workers, KV, R2, and D1 from AI agents. Deploy serverless functions, manage storage, and query databases through Claude Code tool calls.
Docker MCP — Container Management for AI Agents
MCP server that gives AI agents Docker container management capabilities. Build, run, stop, and inspect containers through tool calls for automated DevOps workflows.
Firecrawl MCP — Web Scraping Server for AI Agents
Official Firecrawl MCP server for AI agents to scrape, crawl, and extract structured data from any website. Supports batch scraping, search, and markdown extraction. 15,000+ stars.
MCP Inspector — Debug MCP Servers Visually
Official MCP Inspector for testing and debugging MCP servers. 9.3K+ stars. Web UI, tool/resource/prompt inspection, request testing.
Haystack MCP — Connect AI Pipelines to MCP Clients
Expose Haystack RAG pipelines as MCP servers. Let Claude Code and other AI tools query your document search, QA, and retrieval pipelines through the MCP protocol.
Browser Use — AI Agent Browser Automation
Let AI agents control web browsers with natural language. Browser Use provides vision-based element detection, multi-tab support, and works with any LLM provider.
Context7 — Live Library Docs for LLMs, 51K Stars
MCP server fetching up-to-date, version-specific library documentation into LLM context. Eliminates hallucinated APIs across 30+ AI coding tools.
Unstructured — Document ETL for LLM Pipelines
Extract clean data from PDFs, DOCX, HTML, images, and emails for RAG and LLM ingestion. 14K+ GitHub stars.
Serena — Semantic Code Agent via MCP
Serena is a coding agent MCP server with semantic code retrieval and editing. 22K+ stars. Understands classes, functions, symbols for precise context-aware edits. MIT.
Uptime Kuma — Self-Hosted Uptime Monitoring
Monitor HTTP, TCP, DNS, Docker services with notifications to 90+ channels. Beautiful dashboard. 84K+ GitHub stars.
Context7 — Up-to-Date Docs MCP for AI Editors
MCP server that provides AI code editors with up-to-date library documentation. Eliminates hallucinations from outdated training data. Supports 1000+ libraries. 51K+ stars.
Glama — MCP Server Discovery and Management
Directory and management platform for MCP servers. Discover, install, and monitor Model Context Protocol servers for Claude Code, Cline, and other AI coding tools.
DBHub — Universal Database MCP Server, Zero Dependencies
Token-efficient database MCP server supporting Postgres, MySQL, MariaDB, SQL Server, and SQLite. Just two MCP tools, zero dependencies, read-only safe.
Chrome DevTools MCP — Browser Debugging for AI Agents
Give your AI coding agent full access to Chrome DevTools for browser automation, debugging, and performance analysis. Works with Claude, Cursor, Copilot, and 15+ AI tools.
mcp-agent — Build AI Agents with MCP Patterns
mcp-agent is a Python framework for building AI agents using the Model Context Protocol. 8.2K+ GitHub stars. Implements composable workflow patterns (orchestrator, map-reduce, evaluator-optimizer, rou
Claude Code MCP — Run Claude as Agent-in-Agent
MCP server that runs Claude Code CLI in one-shot mode inside other AI tools. Enables Cursor, Windsurf, and Claude Desktop to delegate complex tasks to Claude Code. 1.2K+ stars, MIT.
Live database context for AI agents
The PostgreSQL MCP server solves the most frustrating failure mode in AI-assisted development: the model writes perfect-looking SQL against a schema that doesn't exist. With the MCP server installed, Claude Code and Cursor can inspect your real tables, read live column types, check actual indexes, and test queries before suggesting them. No more "hallucinated table names" — the model is grounded in what's actually in your database.
The official reference implementation ships in read-only mode by default, which is exactly what you want for a production connection. The AI can SELECT, run EXPLAIN ANALYZE, and explore pg_catalog — but it can't accidentally DROP TABLE users. For write access, point it at a separate dev database or create a bounded role with explicit grants. Both modes are production-safe when configured correctly.
Where this gets transformative is pairing the PostgreSQL MCP server with a GitHub MCP server. An agent can now: read a failing migration from a PR, check the current schema in staging, detect the conflict, rewrite the migration, and open a follow-up PR — all in one conversation. For broader database tooling including MySQL, MongoDB, and Supabase, browse the TokRepo database directory. For agent frameworks that chain these tools together, see our agent building tools.
The moment your AI stops hallucinating table names is the moment it starts shipping real migrations.
Preguntas frecuentes
What is the PostgreSQL MCP server?+
The PostgreSQL MCP server is an open-source implementation of the Model Context Protocol that lets AI agents query a Postgres database. It exposes a set of structured tools — list tables, describe schema, run query, explain query — and handles connection pooling and error handling. The reference implementation is read-only by default and ships under @modelcontextprotocol/server-postgres on npm.
How do I install the Postgres MCP server in Claude Code?+
Run `claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@host:5432/db` in your terminal, then restart Claude Code. Verify with `claude mcp list`. For production databases, we strongly recommend creating a dedicated read-only Postgres role and putting its credentials in the connection string — never use a superuser account.
Is it safe to connect the MCP server to a production database?+
Yes, if you use a read-only role and enable statement timeouts. Create a Postgres role with only SELECT permissions on the schemas the AI needs, set `statement_timeout` on the role to prevent runaway queries, and consider putting the connection through pgbouncer with a capped pool size. Never give the AI an account with DROP or TRUNCATE privileges on production data.
Can the MCP server write to the database?+
The official reference implementation is read-only. For write access you have two options: (1) Use a fork that supports INSERT/UPDATE with approval workflows, or (2) Run a second instance of the server against a separate dev/staging database where write access is safe. Many teams keep a read-only production connection AND a writable staging connection configured simultaneously.
Does it work with Supabase, Neon, and other hosted Postgres?+
Yes. Anything that speaks the Postgres wire protocol works — Supabase, Neon, Railway, AWS RDS, Azure Database for PostgreSQL, Google Cloud SQL, and self-hosted clusters. Just point the connection string at the host. For Supabase specifically, check the TokRepo database directory — there's a dedicated Supabase MCP server that also exposes auth and storage APIs.
What PostgreSQL versions are supported?+
The reference server uses the node-postgres driver, which supports PostgreSQL 9.4 through 17. For query-plan inspection features (EXPLAIN ANALYZE with JSON output), you need PostgreSQL 9.6+. For the best experience with modern AI workflows, we recommend PostgreSQL 15 or 16 since they expose richer pg_stat views the AI can use for performance diagnosis.