Claude Code · Lesson 20
Connect Your Tools
Claude Code can plug in to GitHub, databases, Notion, Stripe, Sentry, and hundreds more tools through MCP — the Model Context Protocol. Once connected, Claude reads and acts on those systems directly, so you stop copy-pasting data into chat.
What is MCP?
MCP (Model Context Protocol) is an open standard that lets AI assistants talk to external tools and data sources. Think of it as a universal plug socket: any tool that supports MCP can connect to Claude Code using the same interface, regardless of whether that tool is a cloud API, a local database, or a script on your machine.
The moment a tool is connected, Claude can read from it and in many cases act on it — all from plain-English instructions inside your terminal session.
Claude Code talks to any MCP-compatible tool through a single standard protocol
How to Add a Tool
Every tool is added with one claude mcp add command. The format depends on whether the tool runs in the cloud (HTTP) or locally on your machine (stdio).
Use this for cloud-based services like GitHub, Notion, Stripe, and Sentry. The tool runs on the provider's servers — you just point Claude at the URL.
# Syntax
claude mcp add --transport http <name> <url>
# Example: connect Notion
claude mcp add --transport http notion https://mcp.notion.com/mcp
# Example: connect Sentry
claude mcp add --transport http sentry https://mcp.sentry.dev/mcpUse this for tools that run on your own machine — local databases, custom scripts, or npm packages that act as MCP servers.
# Syntax
claude mcp add --transport stdio <name> -- <command> [args]
# Example: connect a local PostgreSQL database
claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \
--dsn "postgresql://user:pass@localhost:5432/mydb"
# Example: connect Airtable via npm
claude mcp add --transport stdio --env AIRTABLE_API_KEY=YOUR_KEY airtable \
-- npx -y airtable-mcp-serverPractical Example: Connect GitHub
Here is a complete walkthrough of connecting GitHub so Claude can read pull requests, create issues, and review code directly from your terminal.
Go to GitHub → Settings → Developer settings → Personal access tokens. Create a fine-grained token with read/write access to the repositories you want Claude to work with. Copy the token — you will use it in the next step.
Run this command in your terminal. Replace YOUR_TOKEN with the token you just copied.
Open a project with claude and start giving instructions. Claude will call the GitHub API automatically when needed.
Popular Tools to Connect
These are the tools developers connect most often. All of them support the HTTP transport and take under two minutes to add.
Read issues and PRs, create branches, review code, merge pull requests.
Fetch error reports, inspect stack traces, link errors to recent deployments.
Read and write Notion pages, databases, and blocks from your terminal.
Query payment data, inspect transactions, and manage products or prices.
Run natural-language queries against a local or remote PostgreSQL database.
Inspect deployments, check build logs, manage environment variables.
Managing Your Connections
A handful of commands cover everything you need to inspect and manage connected tools.
claude mcp listShow all connected MCP servers and their status.
claude mcp get <name>Inspect the full config of one server.
claude mcp remove <name>Disconnect and delete a server config.
/mcpInside Claude Code — check server status and authenticate OAuth servers.
Scopes: Where the Config Is Stored
Each MCP server is stored at one of three scopes. Use --scope when adding a server to control who and what can see it.
| Scope | Flag | Stored in | Shared? |
|---|---|---|---|
| local (default) | — | ~/.claude.json (project section) | No — only you, current project |
| project | --scope project | .mcp.json in repo root | Yes — everyone who checks out the repo |
| user | --scope user | ~/.claude.json (global section) | No — only you, all projects |
# Add a server only for this project (default — private to you)
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
# Share the server with your whole team via .mcp.json (commit this file)
claude mcp add --transport http sentry --scope project https://mcp.sentry.dev/mcp
# Add a server you want in every project on your machine
claude mcp add --transport http notion --scope user https://mcp.notion.com/mcpQuick Reference
| Task | Command |
|---|---|
| Add a cloud tool (HTTP) | claude mcp add --transport http <name> <url> |
| Add a local tool (stdio) | claude mcp add --transport stdio <name> -- <cmd> |
| Share tool with team | claude mcp add ... --scope project ... |
| List all connected tools | claude mcp list |
| Check tool status inside Claude | /mcp |
| Authenticate an OAuth tool | /mcp → follow browser prompt |
| Remove a tool | claude mcp remove <name> |
| Inspect a tool config | claude mcp get <name> |
What's Next
External tools are connected. Next: use Skills inside Claude Code to give it reusable, namespaced instructions for your codebase.