
Achetronic/MCP-Forge 是从 https://github.com/achetronic/mcp-forge. 导入的 MCP 服务器候选
概览
Achetronic/MCP-Forge 是从 https://github.com/achetronic/mcp-forge. 导入的 MCP 服务器候选
概述(AI 翻译)
一个基于Go内置的生产准备MCP(模型上下文协议)服务器模板(包含OAUTH授权),可与主要AI提供商兼容。
动机
MCP规范相对较新,缺乏关于在Go中构建完整服务器的全面文档。 该模板提供了一个完全合规的MCP服务器,能够无缝集成远程供应商如Claude Web和OpenAI, 但也包括本地供应商,比如Claude Desktop。
特色
-
🔐 **OAuth RFC 8414 和 RFC 9728 兼容 **
-
支持
.well-known/oauth-protected-resource和.well-known/oauth-authorization-server端点 -
两个端点均可配置
-
🛡️ 多种JWT验证方法
-
委派给外部系统,如 Istio
-
基于JWKS URI和CEL表达式进行本地验证的索赔
-
📋 访问日志可以排除或遮蔽字段
-
🚀 生产准备:包含完整示例、Dockerfile、Helm Chart 和 GitHub Actions for CI
-
⚡ 极易扩展:将生产维生素添加到优质果汁中:mcp-go
部署
制作 🚀
通过位于chart/目录中的Helm图表部署到Kubernetes。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Forge
A production-ready MCP (Model Context Protocol) server template (oauth authorization included) built in Go that works with major AI providers.
Motivation
The MCP specification is relatively new and lacks comprehensive documentation for building complete servers in Go. This template provides a fully compliant MCP server that integrates seamlessly with remote providers like Claude Web, and OpenAI, but with local providers like Claude Desktop too.
Features
-
🔐 OAuth RFC 8414 and RFC 9728 compliant
- Support for
.well-known/oauth-protected-resourceand.well-known/oauth-authorization-serverendpoints - Both endpoints are configurable
- Support for
-
🛡️ Several JWT validation methods
- Delegated to external systems like Istio
- Locally validated based on JWKS URI and CEL expressions for claims
-
📋 Access logs can exclude or redact fields
-
🚀 Production-ready: Included full examples, Dockerfile, Helm Chart and GitHub Actions for CI
-
⚡ Super easy to extend: Production vitamins added to a good juice: mcp-go
Deployment
Production 🚀
Deploy to Kubernetes using the Helm chart located in the chart/ directory.
Our recommendations for remote servers in production:
-
Use a consistent hashring HTTP proxy in front of your MCP server when using MCP Sessions
-
Use an HTTP proxy that performs JWT validation in front of the MCP instead of using the included middleware:
- Protect your MCP exactly in the same way our middleware does, but with a super tested and scalable proxy instead
- Improve your development experience as you don’t have to do anything, just develop your MCP tools
-
Use an OIDP that:
- Cover Oauth Dynamic Client Registration
- Is able to custom your JWT claims.
👉 Keycloak covers everything you need in the Oauth2 side
👉 Istio covers all you need to validate the JWT in front of your MCP
👉 Hashrouter uses a configurable and truly consistent hashring to route the traffic, so your sessions are safe with it. It has been tested under heavy load in production scenarios
How to develop your MCP
Prerequisites
- Go 1.24+
Modify the code and run
安装
npx mcp-remote http://localhost:8080/mcp --transport http-only --header Authorization: Bearer ${JWT} --header X-Validated-Jwt: ${JWT}配置
// file: claude_desktop_config.json
{
"mcpServers": {
"stdio": {
"command": "/home/example/mcp-forge/bin/mcp-forge-linux-amd64",
"args": [
"--config",
"/home/example/mcp-forge/docs/config-stdio.yaml"
]
}
}
}