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.

GitHubDatabasesNotionStripeSentrySlack

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
🔌
MCP Protocol
🐙GitHub
🗄️Database
📄Notion
💳Stripe

Claude Code talks to any MCP-compatible tool through a single standard protocol

🐙
Issue trackers
Read tickets from GitHub, Jira, or Linear — then write code that fixes them.
🗄️
Databases
Query PostgreSQL, MySQL, or SQLite in natural language — no raw SQL needed.
🚨
Monitoring
Pull errors from Sentry and ask Claude to find the root cause and suggest a fix.
⚙️
APIs & SaaS
Stripe, Notion, Slack, Vercel — connect once and interact with them in chat.

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).

OPTION 1 — RecommendedRemote HTTP server

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/mcp
OPTION 2Local stdio server

Use 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-server
⚠️ Warning:Only install MCP servers from sources you trust. A malicious server could expose sensitive information or manipulate Claude's responses.

Practical 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.

1
Generate a GitHub Personal Access Token

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.

github.com/settings/personal-access-tokens
New fine-grained personal access token
claude-code-access
90 days
Only selected repositories
Permissions
ContentsRead and write
IssuesRead and write
Pull requestsRead and write
2
Add the GitHub MCP server

Run this command in your terminal. Replace YOUR_TOKEN with the token you just copied.

Terminal
# Add GitHub as an MCP server
$ claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \ --header "Authorization: Bearer YOUR_TOKEN"
✓ Added MCP server github
3
Start Claude and use GitHub naturally

Open a project with claude and start giving instructions. Claude will call the GitHub API automatically when needed.

Terminal
$ cd my-project && claude
> Claude Code is ready. MCP: github ✓
> Review the open PRs and summarise what each one does
Fetching open pull requests from GitHub...
Found 3 open PRs:
PR #42 — Adds pagination to the /users endpoint (ready to merge)
PR #45 — Refactors auth middleware, needs review
PR #47 — Fixes null pointer in checkout flow (draft)
> Fix the issue described in PR #45 and push a commit
Reading PR #45 diff...
Editing src/middleware/auth.ts...
✓ Fix applied and committed: 'Refactor auth middleware token validation'

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.

🐙GitHub

Read issues and PRs, create branches, review code, merge pull requests.

$ claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer TOKEN"
🚨Sentry

Fetch error reports, inspect stack traces, link errors to recent deployments.

$ claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
📄Notion

Read and write Notion pages, databases, and blocks from your terminal.

$ claude mcp add --transport http notion https://mcp.notion.com/mcp
💳Stripe

Query payment data, inspect transactions, and manage products or prices.

$ claude mcp add --transport http stripe https://mcp.stripe.com
🗄️PostgreSQL

Run natural-language queries against a local or remote PostgreSQL database.

$ claude mcp add --transport stdio db -- npx -y @bytebase/dbhub --dsn "postgresql://user:pass@host/db"
Vercel

Inspect deployments, check build logs, manage environment variables.

$ claude mcp add --transport http vercel https://mcp.vercel.com

Managing Your Connections

A handful of commands cover everything you need to inspect and manage connected tools.

claude mcp list

Show 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.

/mcp

Inside Claude Code — check server status and authenticate OAuth servers.

Terminal
$ claude mcp list
✓ github (HTTP) https://api.githubcopilot.com/mcp/
✓ sentry (HTTP) https://mcp.sentry.dev/mcp
✓ db (stdio) npx @bytebase/dbhub
$ claude mcp remove sentry
✓ Removed MCP server: sentry

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.

ScopeFlagStored inShared?
local (default)~/.claude.json (project section)No — only you, current project
project--scope project.mcp.json in repo rootYes — 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/mcp
Tip:Use project scope for team tools (Sentry, GitHub, Notion) so everyone gets them automatically when they check out the repo. Use local scope for personal API keys or experimental servers.

Quick Reference

TaskCommand
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 teamclaude mcp add ... --scope project ...
List all connected toolsclaude mcp list
Check tool status inside Claude/mcp
Authenticate an OAuth tool/mcp → follow browser prompt
Remove a toolclaude mcp remove <name>
Inspect a tool configclaude 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.