Overview
Claude Code is a command-line tool for agentic coding that supports MCP (Model Context Protocol) for enhanced development capabilities. Through Portkey’s MCP Gateway, you can seamlessly connect any MCP server to Claude Code without managing infrastructure or authentication.Key Benefits
- Secure Authentication: Portkey handles OAuth flows and token management
- Unified Authentication: Single OAuth token to rule them all
- Team Collaboration: Share MCP server configurations, manage access permissions, and ensure everyone on your team has the tools they need—configured correctly, every time
- Complete Observability: See every request, track latency, monitor errors, and understand usage patterns
Prerequisites
Before you begin, ensure you have:- Claude Code CLI installed
- Portkey account with workspace access
- MCP server registered in Portkey’s MCP Hub
Quick Setup
Step 1: Get Your MCP Server URL
- Log in to Portkey Dashboard
- Navigate to MCP Hub → Your Servers
- Copy your server URL:
Step 2: Add Remote Server
Add your Portkey MCP server using the HTTP transport:Step 3: Verify Connection
List your configured MCP servers:Step 4: Authentication
Portkey handles all authentication flows automatically:-
First Connection: Run the authentication command in Claude Code:
-
Browser Authentication:
- Your browser will open for OAuth authorization (if required)
- Complete the authentication flow
- Tokens are stored securely and refreshed automatically
- Team Access: Workspace members share the same authentication scope based on your Portkey settings
Configuration Examples
Single Server Setup
Multiple Servers Setup
With Custom Headers (if needed)
Managing Servers
List All Servers
Remove a Server
Clear Authentication
To revoke access and clear stored tokens:Tips
- Authentication tokens are stored securely and refreshed automatically
- If your browser doesn’t open automatically during auth, copy the provided URL
- OAuth authentication works with both SSE and HTTP transports
- Use descriptive names when adding servers for easier management
Support
Need help? We’re here for you:- 📧 Email: [email protected]
- 💬 Discord: Join our community