OpenWork MCP Gateway
Your OpenWork org's skills, plugins, workflows, and connections through one OAuth MCP URL.
DIdifferent-ai/openwork25k近 7 天新增 51 个 star
Unified large model proxy gateway, providing load balancing, fault transfer, current limiting, budget management, content auditing, caching, and MCP gateway capabilities.
OpenAI & Anthropic Compatible LLM API Gateway
A unified proxy with bidirectional protocol translation, error-classified failover, an MCP gateway with per-tool RBAC, pluggable guardrails, and a built-in admin dashboard, for OpenAI, Anthropic, Azure, DeepSeek, Qwen, Ollama, and any OpenAI-compatible provider.
Get Started · Highlights · Architecture · Docs · Sponsor
Every LLM provider has a different API format, auth mechanism, and feature set. Adapting your code for each one is tedious, error-prone, and locks you in.
CrossLink is a universal adapter between your application and any LLM provider:
x-crosslink-fallback-* headers, and a
routing-stats API shows configured-vs-actual traffic distribution so you can see driftRegisterEngine. Actions: block / log / mask. Per-model config, fail-open or
fail-closed. → Architecturex-crosslink-fallback-model / x-crosslink-fallback-count
headers on every response, plus a routing-distribution API showing configured-vs-actual
weight, deviation, error rate, and latency per provider.
The admin dashboard: request volume, cost, token usage, latency, error rate, and model distribution at a glance.
MCP server management: registry with transport types (HTTP/SSE/stdio), health status, and per-server configuration.
Provider & model configuration: weight, priority, pricing, and routing strategy per model.
Database support: PostgreSQL 14+ and KingbaseES are first-class, fully migrated backends. MySQL and SQLite are experimental — their migration sets stop at the initial schema and are suitable for evaluation only.
Frontend (CrossLink-UI-Standard) and backend are built together. One command starts everything:
git clone https://github.com/HotRiceNoodles/CrossLink.git
cd CrossLink
docker compose -f deployments/docker-compose.dev.yaml up --build
The dashboard and the API gateway share one entry point at http://localhost
(port 80) — all examples below use it as-is.
China network? Use
docker compose -f deployments/docker-compose.cn.yaml up --buildwith Go and npm mirrors pre-configured.
git clone https://github.com/HotRiceNoodles/CrossLink.git
cd CrossLink
cp configs/config.example.yaml configs/config.yaml
# Edit config.yaml with your database and Redis settings
make build
./bin/crosslink
Running from source, the gateway listens on
:8080— swaphttp://localhost:8080into the examples below.
Create an API key in the admin dashboard (http://localhost), then:
curl http://localhost/v1/chat/completions \
-H "Authorization: Bearer cl-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role": "user", "content": "Hello!"}]
}'
No provider key yet? Enable zero-cost demo mode (
demo.enabled: trueinconfig.yaml) — a mock provider plus an embedded demo key power a public/demotry page, so you can exercise the gateway without any upstream account.
OpenAI SDK (Python)
from openai import OpenAI
client = OpenAI(
base_url="http://localhost/v1",
api_key="cl-your-api-key"
)
response = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
Anthropic SDK (Python) — note the deepseek-chat model on the Anthropic endpoint:
that's CrossLink translating Anthropic → OpenAI → DeepSeek behind the scenes.
import anthropic
client = anthropic.Anthropic(
base_url="http://localhost",
api_key="cl-your-api-key"
)
message = client.messages.create(
model="deepseek-chat",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}]
)
print(message.content[0].text)
Client → Auth/RBAC/RateLimit → Route Resolver → FallbackEngine → Provider Adapter → Upstream LLM
See Architecture for the request flow, the streaming translator state machine, the fallback engine's timeout budgeting, and the 5-phase graceful shutdown.
/v1/chat/completions (OpenAI) and /v1/messages (Anthropic) with
automatic bidirectional translation, streaming includedPOST /v1/videos with status polling and content download,
routed through the same fallback chain as chat/admin/api/templates;
key holders discover them via GET /v1/templates (metadata + ready-to-use curl examples)RegisterEngine registry;
block / log / mask actions, admin CRUD, per-model config/openapi.json served out of the box for Postman import and
SDK codegen/demo try page with no upstream spendThe gateway exposes OpenAI-compatible (/v1/chat/completions, /v1/models) and
Anthropic-compatible (/v1/messages) endpoints, video generation at
/v1/videos, and the MCP gateway at /mcp/:server. A bundled, importable
OpenAPI spec is served at /openapi.json — import it into Postman or generate
an SDK from it. The full reference, including request/response shapes, error
codes, and the x-crosslink-fallback-* response headers, is in
docs/api-reference.md.
All configuration lives in configs/config.yaml (see
configs/config.example.yaml for every key).
Every value can be overridden with environment variables using the CL_ prefix
(e.g., CL_DATABASE_HOST, CL_REDIS_PORT). The essentials:
database: # PostgreSQL / KingbaseES
host: localhost
port: 5432
user: crosslink
password: crosslink
dbname: crosslink
redis:
host: localhost
port: 6379
admin:
username: admin
password: changeme
jwt_secret: "change-me-to-a-random-secret"
crypto:
mode: standard # standard (SHA-256/RSA/AES) or gm (SM3/SM2/SM4)
Providers are seeded from configs/providers.yaml on first run:
providers:
- name: deepseek
adapter_type: openai_compatible
base_url: https://api.deepseek.com/v1
api_key: ${DEEPSEEK_API_KEY}
models:
- name: deepseek-chat
provider_model: deepseek-chat
docker compose -f deployments/docker-compose.prod.yaml up -d --build # Production
docker compose -f deployments/docker-compose.cn.yaml up --build # China network (Go/npm mirrors)
Also included: production-ready Nginx config (TLS, security headers, SSE streaming)
at deployments/nginx/, a Caddyfile for automatic HTTPS, a systemd unit, and a
dedicated GM (SM2/SM3/SM4) deployment with GmSSL/Nginx + TLCP at deployments/gm/.
→ See Deployment for all options and multi-instance scaling notes.
CrossLink is under active development. Current focus:
/admin/api/routing/stats)/v1/responses route ships with commercial editions/demo page)/openapi.jsonHave a request? Open a Discussion or a feature request.
CrossLink is an independent, volunteer-built open-source project. Sponsorships fund CI runner time, a public demo instance, documentation translations, and security reviews.
Using CrossLink in production? Your company logo can appear here, alongside priority access to the maintainers. Reach out via Discussions or sponsor directly — every sponsor is listed in this section.
We welcome contributions of all sizes — bug fixes, features, docs, or ideas.
git checkout -b feature/my-feature)git commit -m 'Add some feature')git push origin feature/my-feature)See CONTRIBUTING.md for detailed guidelines.
Thanks to everyone who has contributed to CrossLink!
make build # Build binary (bin/crosslink)
make run # Run the server
make test # Run all tests
make lint # Run golangci-lint
make clean # Remove build artifacts
See SECURITY.md for our security policy and vulnerability reporting instructions.
Your OpenWork org's skills, plugins, workflows, and connections through one OAuth MCP URL.
DIdifferent-ai/openwork25k近 7 天新增 51 个 star
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
TAtadata-org/fastapi_mcp12k
USDC-gated Base JSON-RPC: free 10 req/min, $0.50 per 10k. Failover, cache, /mcp, ledger.
COConway-Research/automaton8k近 7 天新增 56 个 star
Next Generation Agentic Proxy for AI Agents and MCP servers
AGagentgateway/agentgateway6.5k近 7 天新增 160 个 star