</>MCP Agents Market
Agent

copilot-api

by caozhiyuan986TypeScriptUpdated 2026-08-25

GitHub Copilot, OpenAI Codex, OpenCode Go, and third-party AI provider gateway with OpenAI and Anthropic API compatibility.

Claude CodeCodexOpenCode

copilot-api is a universal AI gateway that provides OpenAI and Anthropic API-compatible endpoints for connecting AI coding assistants to GitHub Copilot, OpenAI Codex, and third-party AI providers. It translates between different AI protocols (Chat Completions, Responses API, Messages API) so tools like Claude Code, OpenCode, and Codex can access multiple AI backends through a single local endpoint. The gateway handles authentication, protocol conversion, token usage tracking, and advanced features like context management, prompt caching, and web search, making it especially useful for developers who want to use GitHub Copilot with Claude Code or route multiple AI clients through one unified interface.

Key Features

Unified API gateway serving OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages from one local endpoint
Multi-provider routing: GitHub Copilot, built-in Codex provider, and third-party providers (DeepSeek, DashScope, Kimi, OpenRouter, OpenCode Go)
Protocol translation between Chat Completions, Responses API, and Messages API with automatic adapter selection
First-class Claude Code integration with interactive launcher, model tier auto-detection, and marketplace plugins
Electron desktop app with GUI for authentication, provider configuration, usage monitoring, and server control
Token usage tracking with SQLite storage, web dashboard, per-model cost estimation, and quota monitoring
Advanced context management with compaction, prompt caching, model mappings, and per-model configuration
WebSocket and SSE streaming support with configurable transport timeouts and buffering limits

Use Cases

  • 01Running Claude Code with GitHub Copilot models instead of Anthropic's native API
  • 02Connecting Codex to third-party AI providers like DeepSeek or DashScope alongside GitHub Copilot
  • 03Routing multiple AI coding assistants (Claude Code, OpenCode, Codex) through a single local gateway
  • 04Tracking token usage and costs across different AI models and providers in one dashboard
  • 05Using GitHub Copilot's Messages API with tools that only support OpenAI Chat Completions
  • 06Managing multiple Codex accounts and switching between them for different projects

Related Agents

View more

copilot-api — FAQ

What is copilot-api?+

copilot-api is a local AI gateway that provides OpenAI and Anthropic compatible APIs for connecting AI coding assistants to GitHub Copilot, Codex, and third-party AI providers. It translates between different AI protocols so tools like Claude Code, OpenCode, and Codex can access multiple backends through one endpoint.

How do I install and start copilot-api?+

Run 'npx @jeffreycao/copilot-api@latest start' to start the gateway on http://localhost:4141. Optionally authenticate with 'npx @jeffreycao/copilot-api@latest auth login' to enable GitHub Copilot, or configure a third-party provider with 'npx @jeffreycao/copilot-api@latest auth login --provider deepseek' (or dashscope, kimi, openrouter, custom).

Which AI clients work with copilot-api?+

copilot-api works with Claude Code, OpenCode, Codex, and any OpenAI or Anthropic API-compatible client. Each client connects to the same local endpoint (http://localhost:4141) and the gateway handles protocol translation automatically.

Do I need a GitHub Copilot subscription?+

GitHub Copilot is optional. You can run copilot-api with only third-party providers (DeepSeek, DashScope, Kimi, OpenRouter, OpenCode Go) by configuring at least one provider with an API key. For GitHub Copilot access, you need an active Copilot subscription and GitHub account.

What are the prerequisites?+

Node.js >= 22.13.0 or Bun >= 1.2.x for running the CLI. Token usage storage requires Node.js >= 22.13.0 (where node:sqlite works without flags) or Bun. You'll need API keys for any third-party providers you want to use, and a GitHub Copilot subscription if accessing Copilot models.

Is copilot-api free and open source?+

Yes, copilot-api is open source under the MIT license. The gateway itself is free, but you'll need paid subscriptions or API keys for the AI providers you want to access (GitHub Copilot, DeepSeek, DashScope, etc.).

How do I install copilot-api?+

Open the source repository on GitHub and follow its README. copilot-api is a agent — MCP Agents Market links you directly to the official repo.

Is copilot-api free?+

copilot-api is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches