Practical examples
Example: Connect to GitHub for code reviews
GitHub's remote MCP server authenticates with a GitHub personal access token passed as a header. To get one, open your GitHub token settings, generate a new fine-grained token with access to the repositories you want Claude to work with, then add the server:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"Replace YOUR_GITHUB_PAT with your personal access token. The claude mcp add command saves the configuration without validating credentials, so a placeholder value is accepted here but the server fails to connect later. To verify the connection, run /mcp and check that the server shows connected. A server with bad credentials shows failed, and the failure detail includes the HTTP status the server returned, such as a 401.
Then work with GitHub:
Review PR #456 and suggest improvementsCreate a new issue for the bug we just foundShow me all open PRs assigned to meExample: Query your PostgreSQL database
DBHub, the @bytebase/dbhub package, is an MCP server that connects Claude to a relational database through the connection string you pass in --dsn. Use a read-only database user in the connection string so the queries Claude runs can't modify data:
claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \
--dsn "postgresql://readonly:pass@prod.db.com:5432/analytics"To confirm the server starts, run /mcp and check that db shows connected.
Then query your database naturally:
What's our total revenue this month?Show me the schema for the orders tableFind customers who haven't made a purchase in 90 days