Course navigation
Claude CodeLesson 20 of 25

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 CodeMCP Protocol
GitHubDatabaseNotionStripe
CategoryWhat you can do
Issue trackersRead tickets from GitHub, Jira, or Linear — then write code that fixes them.
DatabasesQuery PostgreSQL, MySQL, or SQLite in natural language — no raw SQL needed.
MonitoringPull errors from Sentry and ask Claude to find the root cause and suggest a fix.
APIs & SaaSStripe, 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 — Remote HTTP server (recommended)

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 2 — Local 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
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

Token name

claude-code-access

Expiration

90 days

Repository access

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.

ToolUse caseAdd command
GitHubRead 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"
SentryFetch error reports, inspect stack traces, link errors to recent deployments.claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
NotionRead and write Notion pages, databases, and blocks from your terminal.claude mcp add --transport http notion https://mcp.notion.com/mcp
StripeQuery payment data, inspect transactions, and manage products or prices.claude mcp add --transport http stripe https://mcp.stripe.com
PostgreSQLRun 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"
VercelInspect 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.

CommandWhat it does
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.
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
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>

Before you continue

  • MCP connects Claude Code to GitHub, databases, SaaS APIs, and local tools.
  • Use HTTP for cloud servers and stdio for local tools.
  • Manage servers with claude mcp in the terminal and /mcp inside a session.
  • Project scope shares config via .mcp.json; local scope keeps keys private.
  • Next lesson: Skills in Claude Code — reusable, namespaced instructions for your codebase.

What's Next

External tools are connected. Next: use Skills inside Claude Code to give it reusable, namespaced instructions for your codebase.