Claude Code Plugins and Extensions Guide 2026: MCP Servers, Hooks, and Superpowers
How to extend Claude Code with MCP servers, hooks, custom skills, and third-party integrations. The complete guide to Claude Code's plugin ecosystem.
Disclosure: This post may contain affiliate links. We earn a commission if you purchase — at no extra cost to you. Our opinions are always our own.
review-2026" title="Claude Opus 4.6 Review 2026 — Is It Still the Best LLM for Serious Work?" class="internal-link">claude-code-complete-guide-2026" title="Claude Code in 2026: The Complete Guide to AI-Powered Coding (With Best Practices)" class="internal-link">Claude Code ships with strong out-of-the-box capabilities — it can read and write files, run bash commands, search codebases, and reason about complex multi-file changes. But its real power emerges when you start extending it. Through the Model Context Protocol, custom hooks, CLAUDE.md configuration, and the growing ecosystem of third-party MCP servers, Claude Code becomes a deeply integrated development environment that can talk to your databases, APIs, version control, internal tools, and more.
This guide covers everything you need to know to maximize Claude Code through its extension system. If you're new to Claude Code itself, start with our full Claude Code review before diving into extensions. For a direct comparison with Cursor's approach to AI-assisted coding, see Cursor vs Claude Code.
What Claude Code Can Do Out of the Box
Before extending, it's worth understanding the built-in capability surface so you know what you're adding vs. what's already there.
Out of the box, Claude Code can:
- Read and write any file on your filesystem (with permission)
- Execute shell commands and interpret their output
- Search for patterns across your codebase using ripgrep
- Navigate directory structures
- Run tests and iterate based on failures
- Use the web fetch tool to retrieve URLs
- Spawn sub-agents for parallelizable tasks
- Maintain memory across sessions via CLAUDE.md files
These capabilities cover a large percentage of day-to-day development work. Extensions become valuable when you need Claude Code to interact with systems beyond the local filesystem — your GitHub repos, Slack workspace, databases, APIs, CI/CD systems, and so on.
Get the Weekly TrendHarvest Pick
One email. The best tool, deal, or guide we found this week. No spam.
What is MCP (Model Context Protocol)?
Model Context Protocol is Anthropic's open standard for extending AI assistants with external tools and context sources. It defines how a host application (like Claude Code) communicates with external servers that provide additional capabilities.
Think of MCP servers like browser extensions or VS Code plugins — they're separate processes that expose functionality to Claude Code, which can then call them as tools during conversations.
The protocol has two core concepts:
Tools: Functions the MCP server exposes that Claude can call. Examples: query_database, create_github_issue, send_slack_message. Tools take structured inputs and return results.
Resources: Read-only data sources Claude can access for context. Examples: database schemas, file contents from remote systems, documentation. Resources provide information without side effects.
MCP uses a JSON-RPC protocol over stdio or HTTP. Claude Code discovers available tools and resources from connected MCP servers and can call them during any conversation.
Why MCP Matters
Before MCP, extending AI coding assistants required either: (a) building custom integrations into the host application, or (b) relying on the model's knowledge cutoff for information about your systems. MCP creates a standardized extension layer where:
- Third parties can publish MCP servers without Anthropic involvement
- You can write internal MCP servers for your proprietary systems
- The same MCP server works with any MCP-compatible host (Claude Code, Claude Desktop, and a growing number of third-party tools)
- Tools are composable — Claude can chain calls across multiple MCP servers
Installing MCP Servers
MCP servers are typically Node.js or Python packages you install separately, then register with Claude Code via your configuration.
Installing via Claude Code CLI
The simplest installation path:
# Install an MCP server globally
claude mcp add github -- npx -y @modelcontextprotocol/server-github
# Install with environment variables
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx -- npx -y @modelcontextprotocol/server-github
This registers the server in your global MCP configuration at ~/.claude/claude_code_config.json.
Installing Locally per Project
For project-specific MCP servers (e.g., a custom server for your company's internal API):
# Add to project-scoped config
claude mcp add my-internal-api --scope project -- node /path/to/internal-mcp-server.js
Project-scoped configs are stored in .claude/settings.json in your project root and can be committed to version control (omit any secrets).
Manual Configuration
You can also edit the config file directly:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}
Essential MCP Servers for Developers
Anthropic and the community have published a growing library of MCP servers. Here are the ones most valuable for development workflows:
Filesystem Server
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/directory
Expands Claude Code's file access beyond the current working directory. Useful for referencing shared libraries, documentation repos, or other projects during development.
GitHub Server
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx -- npx -y @modelcontextprotocol/server-github
Gives Claude Code direct access to GitHub's API. Use cases:
- Create and review pull requests from within a conversation
- Search issues and link to relevant discussions
- Read file contents from other repos (e.g., a shared library you don't have locally)
- Check CI/CD status and review build logs
- Manage GitHub Actions workflows
This is one of the highest-value MCP servers for professional developers. Pair it with GitHub Copilot if you use both tools — they serve different parts of the How to Use Claude for Content Writing (Without Sounding Like a Robot)" class="internal-link">workflow.
Databases (PostgreSQL, SQLite)
# PostgreSQL
claude mcp add postgres -e DATABASE_URL=postgresql://user:pass@host/db -- npx -y @modelcontextprotocol/server-postgres
# SQLite
claude mcp add sqlite -- npx -y @modelcontextprotocol/server-sqlite /path/to/database.db
With a database MCP server, Claude Code can:
- Query your database directly to understand current state
- Generate migrations based on actual schema inspection (not just code)
- Debug data issues by running exploratory queries
- Write and test SQL alongside application code
This is a significant capability upgrade. Instead of pasting schema dumps into every conversation, Claude can query the database itself.
Slack
claude mcp add slack -e SLACK_BOT_TOKEN=xoxb-xxx -e SLACK_TEAM_ID=T0xxx -- npx -y @modelcontextprotocol/server-slack
Enables Claude Code to read Slack channel history and post messages. Practical uses: check a discussion thread for context before making a change, or post a summary of what you built to your team channel.
Stripe
Stripe's official MCP server gives Claude Code access to your Stripe account data for building payment integrations. Query products, prices, subscription states, and webhook events without leaving the conversation.
Web Fetch
claude mcp add fetch -- npx -y @modelcontextprotocol/server-fetch
While Claude Code has a built-in web fetch capability, the dedicated MCP server often provides more robust behavior for retrieving documentation, API specs, and external resources.
Writing a Custom MCP Server
For proprietary systems — internal APIs, company-specific tools, custom data sources — you'll write your own MCP server. Here's a minimal example in Node.js:
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
const server = new Server(
{ name: "my-internal-api", version: "1.0.0" },
{ capabilities: { tools: {} } }
);
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "get_deployment_status",
description: "Get the current deployment status for a service",
inputSchema: {
type: "object",
properties: {
service_name: { type: "string", description: "The service to check" }
},
required: ["service_name"]
}
}
]
}));
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "get_deployment_status") {
const { service_name } = request.params.arguments;
// Call your internal API
const status = await fetchDeploymentStatus(service_name);
return {
content: [{ type: "text", text: JSON.stringify(status) }]
};
}
});
const transport = new StdioServerTransport();
await server.connect(transport);
Register this server with:
claude mcp add my-api -- node /path/to/my-mcp-server.js
Claude Code will now have access to get_deployment_status as a tool and can call it whenever relevant during conversations.
Claude Code Hooks
Hooks let you run custom scripts at specific points in Claude Code's tool execution lifecycle. This is powerful for:
- Enforcing security policies (block writes to certain paths)
- Automating permission grants for trusted operations
- Logging all tool calls for audit purposes
- Running custom validation before or after file writes
Hooks are configured in your project's .claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "node /path/to/validate-write.js"
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node /path/to/log-command.js"
}
]
}
]
}
}
Hook Types and Matchers
PreToolUse: Runs before a tool executes. If the hook exits with a non-zero status code, the tool call is blocked. This lets you implement safety policies.
PostToolUse: Runs after a tool executes. Receives the tool output. Useful for logging, triggering downstream actions, or modifying results.
Matcher patterns: Match on tool names (Write, Bash, Read), or use glob patterns for broader matching.
Practical Hook Examples
Auto-approve writes to test files:
// auto-approve-tests.js
const input = JSON.parse(process.stdin.read());
if (input.tool_input?.file_path?.includes('/test/')) {
process.stdout.write(JSON.stringify({ decision: "approve" }));
process.exit(0);
}
process.exit(0); // Fall through to normal permission flow
Log all bash commands:
// audit-log.js
const input = JSON.parse(process.stdin.read());
const fs = require('fs');
fs.appendFileSync('/var/log/claude-commands.log',
JSON.stringify({ ts: new Date().toISOString(), cmd: input.tool_input?.command }) + '\n'
);
process.exit(0);
CLAUDE.md: Configuration as Documentation
CLAUDE.md files are plain markdown files that Claude Code reads as context at the start of every conversation. They're the primary mechanism for project-specific configuration and instruction.
Where CLAUDE.md Files Live
Claude Code reads CLAUDE.md files from multiple locations, with more specific files taking precedence:
~/.claude/CLAUDE.md— global instructions that apply to all projects/path/to/project/CLAUDE.md— project-level instructions/path/to/project/src/CLAUDE.md— directory-specific instructions (read when working in that directory)
What to Put in CLAUDE.md
A well-crafted CLAUDE.md dramatically improves the quality of Claude Code's work on your project. Include:
Project architecture summary: How the codebase is organized, what the main components do, key design decisions. Claude can read code, but explicit context about why things are structured a certain way saves significant back-and-forth.
Tech stack and conventions: Framework versions, required coding patterns, naming conventions, where config lives.
Common commands: The exact commands to run tests, start dev server, build the project, deploy. Claude will use these rather than guessing.
Off-limits areas: Files or directories Claude should not modify without explicit instruction. Especially important for generated files, vendored code, or migration files.
External dependencies and APIs: Brief descriptions of external services the project uses, what they do, and any quirks to know.
Code style preferences: If you have opinions beyond what's in your linter config, document them here.
A minimal but effective CLAUDE.md:
# Project: Payment Processing Service
## Architecture
- Express.js API, PostgreSQL database, Redis for job queue
- `src/routes/` — HTTP handlers (thin, delegate to services)
- `src/services/` — Business logic
- `src/models/` — Knex query builders, no ORMs
- `src/jobs/` — Bull queue workers
## Commands
- `npm test` — Run all tests (Jest)
- `npm run test:watch` — Watch mode
- `npm run migrate` — Run pending migrations
- `npm run dev` — Start with nodemon
## Conventions
- Services return `{ data, error }` tuples, never throw
- All database queries go through models, not raw SQL in services
- New API endpoints need tests before committing
- DO NOT modify files in `src/generated/` — they're auto-generated
## Environment
- `.env.example` has all required vars
- Local dev uses Docker Compose: `docker-compose up -d`
Skills and Slash Commands
Claude Code supports custom slash commands — reusable workflows you can invoke with /command-name during a conversation. Skills are defined as markdown files in .claude/commands/.
Creating a Custom Skill
Create a file at .claude/commands/deploy-check.md:
Run pre-deployment checks for this project:
1. Run the full test suite: `npm test`
2. Check for TypeScript errors: `npx tsc --noEmit`
3. Run the linter: `npm run lint`
4. Check for any TODO comments in changed files
5. Summarize findings and flag any blockers before deployment
Now you can invoke this with /deploy-check in any Claude Code conversation within the project.
Useful Skills to Create
/review— Code review checklist for the current diff/security-check— Scan for common security issues in changed files/update-docs— Sync documentation with recent code changes/perf-audit— Check for obvious performance issues in the current file/test-coverage— Identify untested code paths in the current changes
Skills make Claude Code's behavior more consistent and predictable across your team, and they're version-controllable — commit your .claude/commands/ directory.
Where to Find MCP Servers
The ecosystem is growing rapidly. Current sources:
- github.com/modelcontextprotocol/servers: Anthropic's official reference implementations — filesystem, GitHub, Slack, PostgreSQL, SQLite, Brave Search, Google Maps, and more
- mcp.so: Community-curated directory of MCP servers
- npm: Search for
@modelcontextprotocol/ormcp-server-prefixes - GitHub: Search "MCP server" to find community implementations for specific services
For developers comparing Claude Code's plugin system to other AI coding tools, see our best AI coding assistants roundup. If you're evaluating Claude Pro vs Cursor Pro, both offer strong extension ecosystems with different philosophies — Claude Code's MCP approach is more open and composable, while Cursor's extensions integrate more tightly with the editor UI.
Tools We Recommend
- Claude Pro / Claude Code — Best AI coding assistant with MCP plugin support and 200K context ($20/mo)
- Cursor Pro — Best AI-native code editor with deep IDE integration ($20/mo)
- GitHub Copilot — Best inline AI code completion for VS Code users ($10/mo)
- Continue (free) — Best open-source AI coding extension for VS Code and JetBrains (free)
Frequently Asked Questions
Do MCP servers work in Claude Desktop too, or just Claude Code?
MCP is a shared standard, and Claude Desktop also supports MCP servers. Your configuration is separate (Claude Desktop uses its own config file), but the same MCP server packages work with both hosts. The growing cross-host compatibility is one of MCP's key design goals — your internal MCP servers for company tools can serve both the coding assistant and the chat interface.
Is it safe to give Claude Code access to my database via MCP?
With appropriate precautions, yes. Best practices: use a read-only database user for the MCP connection if you only need query access; use a separate database user with limited permissions rather than your admin credentials; and review what queries Claude is generating before execution in production environments. The PreToolUse hook can be used to add an approval step for any tool calls you want to gate.
How do I debug a broken MCP server connection?
Run claude mcp list to see registered servers and their status. Use claude --debug to start a session with verbose MCP logging. Most issues are: the server process failing to start (check node version, missing dependencies), missing environment variables, or JSON-RPC schema mismatches. You can test the MCP server independently by running it directly and sending JSON-RPC messages over stdin.
Can I use MCP servers with Claude Code in non-interactive (headless) mode?
Yes. When running claude with the --print flag or piping input, MCP servers registered in your config are still available. This enables marketing" title="How to Use AI for Email Marketing 2026 — A Practical Guide That Actually Works" class="internal-link">automation pipelines where Claude Code with MCP tools runs unattended as part of CI/CD or scheduled jobs. Be careful with permissions in automated contexts — consider using hooks to log all tool calls.
What's the difference between MCP tools and Claude Code's built-in tools?
Built-in tools (file read/write, bash, web fetch, etc.) are implemented directly in Claude Code and always available. MCP tools are provided by external server processes registered in your config. Functionally they work the same from Claude's perspective — it just has a larger tool palette. Built-in tools are generally faster (no IPC overhead) and more deeply integrated with Claude Code's permission system, while MCP tools can do anything your custom code can do.
How do CLAUDE.md files interact with each other when there are multiple?
Claude Code reads and concatenates CLAUDE.md files from most-general to most-specific: global (~/.claude/CLAUDE.md), project root, then any directory-level files as you navigate. More specific files don't override global ones — all content is included. This means you can put universal preferences (code style, personal workflows) in your global CLAUDE.md and project-specific overrides in the project-level file. Keep CLAUDE.md files focused and non-contradictory across levels.
Tools Mentioned in This Article
Recommended Resources
Curated prompt packs and tools to help you take action on what you just read.
8 battle-tested Claude prompts to automate busywork and 10x your output.
Get it on GumroadUse Claude to research, plan, and launch a profitable AI-powered side business.
Get it on GumroadA printable weekly planner with goal-setting pages designed for AI-augmented workflows.
Get it on GumroadRelated Articles
AI Browser Agents 2026: Page Agent, Browse AI, Bardeen, and Browserbase Compared
Compare the best AI browser agent tools in 2026. From no-code scraping to fully autonomous web agents — which tool fits your workflow?
AI Memory and Context in 2026: RAG vs Fine-Tuning vs Long Context Windows Explained
RAG vs fine-tuning vs long context windows: when to use each approach for giving AI models memory and access to your data.
Best GPU Cloud Providers 2026: RunPod, Vast.ai, Lambda Labs, and CoreWeave Compared
Compare the best GPU cloud providers for AI in 2026. RunPod, Vast.ai, Lambda Labs, and CoreWeave for training, inference, and fine-tuning.