@the-next-ai/ai-gateway weekly downloads statistics
By the-next-ai · npm · MCP servers
TypeScript Fastify AI protocol gateway for OpenAI, Anthropic, Gemini, MCP and agent workflows.
@the-next-ai/ai-gateway has 4,381 recorded weekly downloads on npm.
About @the-next-ai/ai-gateway
Next AI Gateway
A TypeScript + Fastify AI protocol gateway for OpenAI, Anthropic, Gemini, MCP Gateway, and event-driven agent workflows.
Quick Start
npm install
npm run dev
Production:
npm run build
npm start
Docker Compose:
export AUTH_STATIC_API_KEYS='replace-with-gateway-client-key'
export MANAGER_API_KEY='replace-with-manager-admin-key'
export OPENAI_API_KEY='sk-...'
export MCP_REMOTE_KEY='replace-with-strong-mcp-key'
export TOOLHUB_MANAGEMENT_TOKEN='replace-with-toolhub-admin-key'
export MINIMAX_API_KEY='replace-with-minimax-api-key'
export ANTHROPIC_API_KEY='replace-with-tool-search-provider-key'
docker compose up --build
Production Docker Compose:
cp .env.production.example .env.production
# edit .env.production
docker compose --env-file .env.production -f docker-compose.prod.yml up -d --build
For multi-instance deployments, enable Redis-backed shared state by changing the
shared state backends in .env.production from memory to redis:
GATEWAY_IDEMPOTENCY_STORAGE_TYPE=redis
GATEWAY_UPSTREAM_CONCURRENCY_STORAGE_TYPE=redis
GATEWAY_UPSTREAM_CIRCUIT_BREAKER_STORAGE_TYPE=redis
GATEWAY_SCHEDULING_STORAGE_TYPE=redis
PROVIDER_HEALTH_CHECK_STORAGE_TYPE=redis
PRECHECK_STORAGE_TYPE=redis
Then start the Redis profile:
docker compose --env-file .env.production -f docker-compose.prod.yml --profile redis up -d --build
Features
- OpenAI
chat/completions,responses,embeddings,moderations,images/generations,images/edits,videos,videos/:id, andvideos/:id/content - xAI
videos/generationsandvideos/:id, with OpenAI ↔ xAI video request/response conversion - Authenticated, encrypted, expiring video IDs preserve routing/model/owner context without exposing it; configure a shared
media.videoIdSigningSecretfor multi-instance deployments - The gateway does not hard-code an OpenAI video model. OpenAI has announced removal of the Videos API,
sora-2, andsora-2-proon September 24, 2026, with no replacement; pin provider models explicitly and plan migrations accordingly (official deprecation notice) - Anthropic
messages - Gemini
generateContent/streamGenerateContent - Cross-protocol conversion, provider fallback, provider plugins, health checks, metrics, idempotency, concurrency isolation, circuit breaking, and retries
- MCP Gateway, MCP WebSocket RPC, and event-driven agents
- HTTP / WebSocket / gRPC / stdio external config sources and event delivery
Documentation
- Full usage guide
- External protocol integration
- Publishing and CI/CD
- MCP WebSocket deployment templates
npm Publishing
This repository includes .npmignore, prepack builds, GitHub Actions CI/CD, and a release command that publishes a specific npm version:
npm run release -- 1.2.3
See Publishing and CI/CD for more options.
Description from the npm listing.
- ai
- gateway
- openai
- anthropic
- gemini
- mcp
- fastify
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm MCP servers plugins
All 20 @the-next-ai/ai-gateway alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@the-next-ai/ai-gateway. First seen Oct 20, 2026; last successful collection Oct 20, 2026. See the methodology.