env.dev

Claude Code MCP Servers

Extend Claude Code with MCP servers, hooks, and slash commands. Build custom LLM-powered dev workflows.

Quick Install

claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres

Overview

Claude Code supports MCP (Model Context Protocol) servers that extend its capabilities with custom tools. Combined with hooks and slash commands, you can build sophisticated LLM-powered development workflows tailored to your team and project. MCP turns Claude Code from a coding assistant into a customizable development platform.

MCP Server Configuration

.claude/settings.json
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "DATABASE_URL": "postgresql://localhost:5432/mydb"
      }
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Popular MCP Servers

PostgreSQL

Query your database, inspect schemas, and generate migrations directly from Claude Code.

GitHub

Create issues, manage PRs, search code, and interact with the GitHub API.

Filesystem

Extended file operations — search, batch edits, and directory analysis beyond built-in tools.

Puppeteer

Browser automation — take screenshots, run E2E tests, and debug UI issues.

Hooks Example

.claude/settings.json
{
  "hooks": {
    "afterEdit": ["pnpm biome format --write"],
    "afterCommit": ["pnpm check"],
    "beforePush": ["pnpm test"]
  }
}

Key Customization Points

  • MCP servers — connect external tools and data sources
  • Hooks — run commands on file edits, commits, pushes
  • CLAUDE.md — project-specific instructions and conventions
  • Slash commands — custom workflows triggered by /name
  • Permission modes — control what Claude Code can do autonomously

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that lets AI tools like Claude Code connect to external data sources and tools — databases, APIs, file systems, and more.

How do I add an MCP server to Claude Code?

Add it to your project's .claude/settings.json or globally in ~/.claude/settings.json. Claude Code will connect to the server and make its tools available.

What are Claude Code hooks?

Hooks are shell commands that run on specific events — before/after file edits, commits, or tool calls. They let you automate formatting, linting, testing, and deployment.