开源网关需自行准备 tyk.conf 配置文件和 apps 目录,并搭配 Redis 运行;Tyk Operator 等部分能力需要商业许可证;完整 API 管理平台需申请 licence 并配置 .env
tyk
TykTechnologies活跃维护开源 API 与 AI 网关,统一代理 REST、GraphQL、TCP、gRPC 和 MCP 流量,帮你在微服务和 LLM 调用前做路由、鉴权与限流。
Open Source API and AI Gateway supporting REST, GraphQL, TCP, gRPC and MCP (Model Context Protocol)
docker compose up -d
curl localhost:8080/helloREADME 未说明具体硬件要求,仅提到单 CPU 即可支撑数千 RPS,可水平与垂直扩展
开源云原生 API 与 AI 网关,统一代理 REST、GraphQL、gRPC、TCP 和 MCP 流量
开源 API 与 AI 网关,统一代理 REST、GraphQL、TCP、gRPC 和 MCP 流量,帮你在微服务和 LLM 调用前做路由、鉴权与限流。
核心能力
- 解析 JSON-RPC 2.0,按工具、资源、提示词对 MCP 调用做策略控制
- 从 REST API 直接生成 MCP 代理,无需另建 MCP 服务器
- 支持 JWT、Bearer Token、Basic Auth、客户端证书等认证方式
- 导入 Swagger/OpenAPI 2.x 与 3.0.1 文档快速生成 API
- 支持热重载配置,重启不影响进行中的请求
容易踩的坑
- v5.8.20最新正式版2026-11-06 · 2026-11-06 20:46 UTC
What's Changed
- Merging to release-5.8.20: Fix release 5.8.15 FIPS plugin compiler (#8467) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8887
- [TT-19025][CVE-528] Bump github.com/andybalholm/brotli to v1.2.7 (release-5.8.20) by @mativm02 in https://github.com/TykTechnologies/tyk/pull/8888
Full Changelog: https://github.com/TykTechnologies/tyk/compare/v5.8.17...v5.8.20
- v5.8.172026-10-30 · 2026-10-30 13:22 UTC
查看更新说明
What's Changed
- [TT-18674] Bump x/net, go-jose/v4 and OpenTelemetry for CVE fixes (release-5.8.17) by @buger in https://github.com/TykTechnologies/tyk/pull/8844
- [TT-18920][TT-18674] Backport release-5.8.17: migrate from go-jose v3 to v4 with v3-compatible JWKS parsing by @buger in https://github.com/TykTechnologies/tyk/pull/8857
Full Changelog: https://github.com/TykTechnologies/tyk/compare/v5.8.16...v5.8.17
- v5.13.52026-10-30 · 2026-10-30 11:28 UTC
查看更新说明
What's Changed
- [TT-18804] Bump x/net and go-jose/v4 for CVE fixes (release-5.13.5) by @buger in https://github.com/TykTechnologies/tyk/pull/8845
- [TT-18920][TT-18804] Backport release-5.13.5: migrate from go-jose v3 to v4 with v3-compatible JWKS parsing by @buger in https://github.com/TykTechnologies/tyk/pull/8856
Full Changelog: https://github.com/TykTechnologies/tyk/compare/v5.13.4...v5.13.5
- v5.16.02026-10-27 · 2026-10-27 07:39 UTC
查看更新说明
What's Changed
- [releng master] gromit: sync templates by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8585
- TT-17795: bump golang.org/x/text and google.golang.org/grpc for CVE fixes by @edsonmichaque in https://github.com/TykTechnologies/tyk/pull/8582
- TT-17795: update version of Tyk/opentelemetry with fixed CVEs by @vladzabolotnyi in https://github.com/TykTechnologies/tyk/pull/8614
- TT-17641: [releng master] Add next-generation plugin compiler by @buger in https://github.com/TykTechnologies/tyk/pull/8379
- TT-17509: Update s1-cns-scans.yml workflow to use policy_id and production tag by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8546
- TT-17641: [releng master] gromit: sync templates by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8603
- [TT-17921] Improve header handling for GraphQL-based APIs by @pvormste in https://github.com/TykTechnologies/tyk/pull/8602
- TT-17795: Update path for avro's replace directive by @vladzabolotnyi in https://github.com/TykTechnologies/tyk/pull/8626
- [TT-431] Authorization token should not be recorded in detailed logs by @MaciekMis in https://github.com/TykTechnologies/tyk/pull/8500
- chore: update swagger info.version to 5.15 by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8646
- Fix docs generation issues from PR 2802 by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8649
- [TT-1860] Preserve rewritten URL path when stripping listen path by @andrei-tyk in https://github.com/TykTechnologies/tyk/pull/8515
- [TT-18136] Tolerate stale MCP selectors on catalogue reads by @andrei-tyk in https://github.com/TykTechnologies/tyk/pull/8653
- TT-17927: escape config literal that breaks generated docs by @olamilekan000 in https://github.com/TykTechnologies/tyk/pull/8660
- [TT-14684] The listen path recorded in analytics changes when an API response comes from cache by @shults in https://github.com/TykTechnologies/tyk/pull/8543
- [TT-17926] Bump pump dependency by @ilijabojanovic in https://github.com/TykTechnologies/tyk/pull/8666
- docs: escape MDX-breaking spans in doc comments synced to tyk-docs by @sharadregoti in https://github.com/TykTechnologies/tyk/pull/8669
- feat: add GetOASConfigData helper function by @dawidgoracl in https://github.com/TykTechnologies/tyk/pull/8665
- [TT-16132] Granular access control conditions on query parameters, headers and body by @mativm02 in https://github.com/TykTechnologies/tyk/pull/8652
- [DX-2218] docs: add /ready endpoint to swagger.yml by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/7906
- [releng master] gromit: sync templates by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8690
- [TT-17765] Prevent Dashboard recovery reload deadlock by @andrei-tyk in https://github.com/TykTechnologies/tyk/pull/8661
- [TT-14404] regression-gateway-always-generates-detailed-records-for-graphql-udg-requests by @dawidgoracl in https://github.com/TykTechnologies/tyk/pull/8671
- [TT-14684] The listen path recorded in analytics changes when an API response comes from cache by @shults in https://github.com/TykTechnologies/tyk/pull/8672
- TT-18373: fix point force-merge at github-actions@production by @olamilekan000 in https://github.com/TykTechnologies/tyk/pull/8709
- TT-16030: grant id-token for the jira-linter ECR pull by @kofoworola in https://github.com/TykTechnologies/tyk/pull/8711
- [TT-6555] [Zerocopter] Local File Read via Webhook endpoint by @shults in https://github.com/TykTechnologies/tyk/pull/8610
- docs: surface MCP Gateway and AI Studio in the README by @sharadregoti in https://github.com/TykTechnologies/tyk/pull/8714
- [TT-18283] upgrade kin-openapi by @pvormste in https://github.com/TykTechnologies/tyk/pull/8719
- [TT-17873] proxy_default_timeout overrides enforced timeout middleware but should only be applied when enforced timeout is unset by @shults in https://github.com/TykTechnologies/tyk/pull/8640
- docs:
- v5.15.12026-10-02 · 2026-10-02 21:58 UTC
查看更新说明
What's Changed
- [releng release-5.15] gromit: sync templates by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8612
- Merging to release-5.15: TT-17795: bump golang.org/x/text and google.golang.org/grpc for CVE fixes (#8582) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8606
- [releng release-5.15] gromit: sync templates by @buger in https://github.com/TykTechnologies/tyk/pull/8619
- Merging to release-5.15: TT-17795: update version of TykTechnologies/opentelemetry with fixed CVEs (#8614) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8615
- TT-17641: [releng release-5.15] gromit: sync templates by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8633
- Merging to release-5.15: TT-17795: Update path for avro's replace directive and fix new CVEs (#8626) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8635
- Merging to release-5.15: [TT-17921] Improve header handling for GraphQL-based APIs (#8602) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8644
- [releng release-5.15] gromit: sync templates by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8693
- Merging to release-5.15: [TT-18283] upgrade kin-openapi (#8719) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8720
- Merging to release-5.15: Fix/tt 18285/bump dependencies (#8736) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8739
- Merging to release-5.15.1: [TT-18285] Bump otlptrace exporters to v1.46.0 to fix CVE-2026-81870 (#8745) by @probelabs[bot] in https://github.com/TykTechnologies/tyk/pull/8746
Full Changelog: https://github.com/TykTechnologies/tyk/compare/v5.15.0...v5.15.1
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Documentation | MCP Gateway | AI Gateway | Forum | Blog | About
Tyk API Gateway
Tyk Gateway is the cloud-native, open source, enterprise-ready API and AI Gateway supporting REST, GraphQL, TCP, gRPC and MCP (Model Context Protocol).
Built from the ground up, as the fastest API Gateway on the planet since 2014.
Tyk Gateway is provided ‘Batteries-included’, with no feature lockout. Enabling your organization to rate limit, auth, gather analytics, apply microservice patterns and more with ease.
There are three different ways you can try Tyk:
Getting Started
Tyk Cloud is the easiest way to set up Tyk. Tyk hosts and manages the full stack for you, so you do not install anything. You can sign up for a free trial of Tyk Cloud and get started in minutes. If not, you can follow the instructions below to get started with Tyk on your own infrastructure.
Run the open source Tyk Gateway with Docker in under 2 minutes. You need Docker and Docker Compose.
Follow the Tyk Open Source Gateway quick start. It shows you how to:
- Create a Gateway configuration file (
tyk.conf). - On Linux, create an
appsfolder where the Gateway saves your APIs. - Create a Docker Compose file that runs Tyk Gateway and Redis.
- Start the Gateway with
docker compose up -d.
Confirm that the Gateway runs. Send a request to the hello endpoint:
curl localhost:8080/hello
Output:
{"status":"pass","version":"5.x.x","description":"Tyk GW"}
Next, create your first API with the Tyk Gateway API.
Try full API Management Lifecycle
To evaluate the enterprise API management platform on your infrastructure, use Tyk Install. It runs Tyk Gateway, Tyk Dashboard, the Developer Portal, Tyk Pump, Redis and PostgreSQL with Docker Compose, and preloads sample APIs and policies. You need a licence. To get one, request a Tyk Self-Managed trial.
git clone https://github.com/TykTechnologies/tyk-install
cd tyk-install/docker/self-managed
cp .env.example .env # add your licence keys to .env
cd ../getting-started
bash start.sh
For the full steps, see the Tyk Self-Managed quick start.
Other Installations are available:
- Docker
- Kubernetes with Helm (
tyk-osschart from Tyk Charts) - Ansible
- Red Hat and CentOS
- Ubuntu
- Compile Tyk from Source
Getting started with AI Gateway for LLM and MCP
Tyk Gateway governs MCP traffic from AI agents, applying authentication, rate limiting and per-tool access control to every JSON-RPC call. Tyk AI Studio handles LLM management, with model routing, budgets and guardrails across providers. Start at the AI management overview.
Open Source API Gateway Features
Use any protocol: REST (with native OpenAPI support), SOAP, GraphQL, gRPC, TCP, and MCP.
MCP Gateway: Put the gateway in front of remote Model Context Protocol servers so AI agent traffic is authenticated, rate limited and auditable. Tyk parses JSON-RPC 2.0 and applies policy per tool, resource and prompt rather than treating MCP as opaque HTTP.
API to MCP: Generate an MCP proxy directly from a REST API in Tyk Gateway, without building or hosting a separate MCP server.
Industry Standard Authentication: JWT, bearer Tokens, Basic Auth, Client Certificates and more.
Open API Standards: Import your Swagger and OpenAPI Documents (OAS 2.X and OAS 3.0.1) to scaffold APIs in Tyk.
Ultra performant: Low latency, and thousands of rps with just a single CPU, horizontally and vertically scalable.
Content mediation: Transform all the things, from request or response headers to converting between SOAP and GraphQL.
Extensible Plugin Architecture: Customize Tyk’s middleware chain by writing plugins in your language of choice - from Python to Javascript to Go, or any language which supports gRPC.
Rate Limiting & Quotas: Protect your upstreams from becoming overloaded and/or apply limits for each consumer.
API Versioning - API Versions can be easily set and sunset (deprecated) at a specific time and date.
Granular Access Control - Grant access to one or more APIs on a per version and operation basis.
Blocklist/Allowlist/Ignore endpoint access - Enforce strict security models on a version-by-version basis to your access points.
Analytics logging - Record detailed usage data on who is using your APIs (raw data only)
CORS - Enable CORS for certain APIs so users can make browser-based requests
Webhooks - Trigger webhooks against events such as Quota Violations and Authentication failures
IP AllowListing - Block access to non-trusted IP addresses for more secure interactions
Hitless reloads - Tyk configurations can be altered dynamically and the service restarted without affecting any active request
Kubernetes native declarative API: using Tyk Operator (requires a licence)
Tyk Technologies uses the same API Gateway for all it’s applications. Protecting, securing, and processing APIs for thousands of organizations and businesses around the world. Ideal for Open Banking, building software in the clouds as well as exposing APIs to teams, partners & consumers.
Tyk OSS Integrations
Tyk Technologies maintains other Open Source Software which can be used in conjunction with Tyk API Gateway:
Tyk AI Studio - Open source (AGPL-3.0) AI management platform for LLM traffic: model routing, budgets and cost controls, RAG data sources, tools and agents, with governance across providers including OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, Hugging Face and Ollama. Use it alongside Tyk Gateway when you need LLM and AI management rather than MCP proxying. Docs
Tyk Pump - Pluggable analytics purger to move Analytics generated by your Tyk nodes to any back-end.
Tyk Identity Broker - Tyk Authentication Proxy for third-party login
Tyk Mserv - Asset Server and gRPC host
Documentation
All the documentation for Tyk Gateway and other OSS-related topics can be found at https://tyk.io/docs/tyk-open-source
Community
- Tyk Community Board - Technical support from the Tyk Community
- Write a GitHub Issue - Feature requests & bug reports welcome
- Technical blog - Tyk announcements and updates
- Newsletter - Subscribe to the Tyk newsletter
- If you are using Tyk give us a star ⭐️
Licensing
Tyk is dual-licensed:
-
Open Source License: The code in the root directory and all subdirectories except the 'ee' folder is released under the MPL v2.0. Please see LICENSE for the full version of the open source license.
-
Commercial License: The code in the 'ee' folder is subject to a commercial license. For more information about obtaining a commercial license, please contact our sales team at [email protected].
Compiling Tyk Gateway
Compile from Source
git clone https://github.com/TykTechnologies/tyk
go build
Use the Go version in go.mod to build master, the current development version. Tyk is officially supported on Linux/amd64, Linux/i386 and Linux/arm64.
To run tests locally use the following command:
go test ./...
Note that tests require Redis to be running on the same machine (default port).
To write your own test please use this guide https://github.com/TykTechnologies/tyk/blob/master/TESTING.md
Contributing
For more information about contributing PRs and issues, see CONTRIBUTING.md.
—