Skip to main content
One command wires your AI coding agent through Portkey:
npx github:portkey-ai/agent-cli
The wizard asks which agent you’re setting up, validates your Portkey key, lets you pick a provider or Config, adds MCP servers, and syncs team skills. Requirements: Node.js 18+ · Portkey account with at least one provider in Model Catalog

What gets configured

Gateway routing

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.portkey.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_PORTKEY_API_KEY",
    "ANTHROPIC_CUSTOM_HEADERS": "x-portkey-provider: @your-provider"
  }
}
Every request appears in Portkey Logs with cost, latency, and full trace detail.
Claude Code and Codex requests logged in Portkey with cost and latency

MCP servers

Fetches your workspace’s MCP integrations and writes them to each agent’s config — your Portkey API key included in headers automatically.
MCP integrations requiring upstream OAuth (e.g. Linear, Slack) are flagged during setup. For Claude Code, run /mcp to complete the OAuth flow. For Codex, run codex mcp login <server-name>.

Team skills

Syncs Prompt Partials from Portkey as SKILL.md files to the agent’s skills directory. Every developer runs one command and gets the same instructions.
Team skills stored as versioned prompt partials in Portkey

Commands

CommandWhat it does
setupFull wizard — gateway, MCP, skills
statusShow current config and routing health
verifySend a live test request through Portkey
mcp add / list / removeManage MCP server entries
skills sync / listSync team skills from Portkey
uninstallRemove Portkey config from agent settings
# Examples
npx github:portkey-ai/agent-cli setup
npx github:portkey-ai/agent-cli status
npx github:portkey-ai/agent-cli skills sync
npx github:portkey-ai/agent-cli mcp add

Next steps

Model Catalog

Configure providers and model access in Portkey

Portkey Configs

Fallbacks, load balancing, and routing strategies

Agent Skills

Create and sync team skills to every developer’s machine

MCP Gateway

Centralized auth and observability for MCP tool access
Last modified on April 7, 2026