Skip to main content
ClaudeWave
ES, Spanish
Portkey-AI / MCP Servers

gateway

A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.

  • 13.3k estrellas
  • 1.4k forks
  • 307 issues abiertos
  • Lenguaje: TypeScript
  • Licencia: MIT
  • actualizado

Instalación

local · npx
Claude Code CLI
claude mcp add gateway -- npx -y @portkey-ai/gateway
  1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
  2. Replace any <placeholder> values with your API keys or paths.
  3. Restart Claude. The MCP server and its tools appear automatically.

Nota editorial

Portkey AI Gateway is an open-source TypeScript routing layer that sits between applications and over 250 LLM providers, exposing a single OpenAI-compatible API endpoint so developers can swap models without rewriting client code. It supports automatic retries, fallbacks, and load balancing across providers to reduce downtime, and includes more than 50 configurable guardrails for content safety and compliance. The gateway runs locally via a single npx command, weighs 122kb, and adds under one millisecond of latency. Its MCP Gateway feature adds enterprise-grade authentication and observability specifically for MCP server management, making it relevant to teams building Claude-powered agents through the Model Context Protocol. It also integrates with LangChain, LlamaIndex, and Autogen. The project claims to process over 10 billion tokens daily, which gives a sense of its production scale. Platform engineers, AI product teams, and developers who need provider redundancy or policy enforcement across multiple models are the primary beneficiaries.

README

Resumen de MCP Servers

README completo en GitHub

English | 中文 | 日本語

Important

:rocket: Gateway 2.0 (Pre-Release) Portkey's core enterprise gateway is merging into open-source with our 2.0 release. You can try the pre-release branch here. Read more about what's next for Portkey in our Series A announcement.

🆕 Portkey Models - Open-source LLM pricing for 2,300+ models across 40+ providers. Explore →

AI Gateway

Route to 250+ LLMs with 1 fast & friendly API

Docs | Enterprise | Hosted Gateway | Changelog | API Reference

License Discord Twitter npm version Better Stack Badge

Ask DeepWiki

The AI Gateway is designed for fast, reliable & secure routing to 1600+ language, vision, audio, and image models. It is a lightweight, open-source, and enterprise-ready solution that allows you to integrate with any language model in under 2 minutes.

  • [x] Blazing fast (<1ms latency) with a tiny footprint (122kb)

  • [x] Battle tested, with over 10B tokens processed everyday

  • [x] Enterprise-ready with enhanced security, scale, and custom deployments

What can you do with the AI Gateway?

Tip

Starring this repo helps more developers discover the AI Gateway 🙏🏻

star-2

Quickstart (2 mins)

1. Setup your AI Gateway
# Run the gateway locally (needs Node.js and npm)
npx @portkey-ai/gateway

The Gateway is running on http://localhost:8787/v1

The Gateway Console is running on http://localhost:8787/public/

Deployment guides:   Portkey Cloud (Recommended)   Docker   Node.js   Cloudflare   Replit   Others...

2. Make your first request
# pip install -qU portkey-ai

from portkey_ai import Portkey

# OpenAI compatible client
client = Portkey(
    provider="openai", # or 'anthropic', 'bedrock', 'groq', etc
    Authorization="sk-***" # the provider API key
)

# Make a request through your AI Gateway
client.chat.completions.create(
    messages=[{"role": "user", "content": "What's the weather like?"}],
    model="gpt-4o-mini"
)

Supported Libraries:   JS   Python   REST   OpenAI SDKs   Langchain   LlamaIndex   Autogen   CrewAI   More..

On the Gateway Console (http://localhost:8787/public/) you can see all of your local logs in one place.

3. Routing & Guardrails

Configs in the LLM gateway allow you to create routing rules, add reliability and setup guardrails.

config = {
  "retry": {"attempts": 5},

  "output_guardrails": [{
    "default.contains": {"operator": "none", "words": ["Apple"]},
    "deny": True
  }]
}

# Attach the config to the client
client = client.with_options(config=config)

client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Reply randomly with Apple or Bat"}]
)

# This would always response with "Bat" as the guardrail denies all replies containing "Apple". The retry config would retry 5 times before giving up.

You can do a lot more stuff with configs in your AI gateway. Jump to examples →

Enterprise Version (Private deployments)

AWS   Azure   GCP   OpenShift   Kubernetes

The LLM Gateway's enterprise version offers advanced capabilities for org management, governance, security and more out of the box. View Feature Comparison →

The enterprise deployment architecture for supported platforms is available here - Enterprise Private Cloud Deployments

MCP Gateway

MCP Gateway provides a centralized control plane for managing MCP (Model Context Protocol) servers across your organization.

  • Authentication — Single auth layer at the gateway. Users authenticate once; your MCP servers receive verified requests

  • Access Control — Control which teams and users can access which servers and tools. Revoke access instantly

  • Observability — Every tool call logged with full context: who called what, parameters, response, latency

  • Identity Forwarding — Forward user identity (email, team, roles) to MCP servers automatically

Works with Claude Desktop, Cursor, VS Code, and any MCP-compatible client. Get started →

Core Features

Reliable Routing
  • Fallbacks: Fallback to another provider or model on failed requests using the LLM gateway. You can specify the errors on which to trigger the fallback. Improves reliability of your application.

  • Automatic Retries: Automatically retry failed requests up to 5 times. An exponential backoff strategy spaces out retry attempts to prevent network overload.

Topics
ai-gatewaygatewaygenerative-aihacktoberfestlangchainllmllm-gatewayllmopsllmsmcpmcp-clientmcp-gatewaymcp-serversmodel-routeropenai
Preguntas frecuentes

Lo que la gente pregunta sobre gateway

¿Qué es Portkey-AI/gateway?

Portkey-AI/gateway es mcp servers para el ecosistema de Claude AI. A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API. Tiene 13.3k estrellas en GitHub y su última actualización registrada es del 2026-05-25.

¿Cómo se instala gateway?

Puedes instalar gateway clonando el repositorio (https://github.com/Portkey-AI/gateway) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar Portkey-AI/gateway?

Nuestro agente de seguridad ha analizado Portkey-AI/gateway y le ha asignado un Trust Score de 100/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene Portkey-AI/gateway?

Portkey-AI/gateway es mantenido por Portkey-AI. La última actividad registrada en GitHub es del 2026-05-25, con 307 issues abiertos.

¿Hay alternativas a gateway?

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Deploy en 1 click

Despliega gateway en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Muestra su Trust Score en tu README

La insignia muestra el Trust Score y el veredicto actuales de este repositorio y enlaza a esta página. Sigue los datos del catálogo: nadie puede comprar ni editar la puntuación que enseña.

ClaudeWave Trust Score for Portkey-AI/gateway
Markdown (README)
[![ClaudeWave Trust Score for Portkey-AI/gateway](https://claudewave.com/api/badge/portkey-ai-gateway)](https://claudewave.com/en/repo/portkey-ai-gateway)
HTML
<a href="https://claudewave.com/en/repo/portkey-ai-gateway"><img src="https://claudewave.com/api/badge/portkey-ai-gateway" alt="ClaudeWave Trust Score for Portkey-AI/gateway" width="320" height="64"></a>

Qué significa la insignia y cómo se calcula la puntuación

Alternativas

Ver todas