Token导航 LogoToken导航TokenDH.com
MCP Auth Proxy logo
开发工具未说明官方级别未说明来源级核验

MCP Auth Proxy

MCP Server

mcp-auth-proxy是一个用于处理与非兼容MCP服务器认证的代理服务,支持HMAC头部注入、静态会话头、SSE保持活动端点等功能,适用于MCP客户端与上游服务的认证转发。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
开发工具GoClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

go-core-stack

提供方

go-core-stack

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

mcp-auth-proxy

Auth Proxy for handling authentication with non compatible mcp servers.

Features

  • Injects HMAC headers (x-api-key-id, x-signature, x-timestamp) compatible with the upstream auth-gateway implementation.
  • Supports optional static session headers (MCP_SESSION_HEADER, MCP_SESSION_VALUE) so upstreams that expect pre-issued session IDs continue to work.
  • Provides a local Server-Sent Events (SSE) keepalive endpoint for GET /mcp when the upstream does not offer streaming, allowing MCP clients (Codex, Claude, etc.) to complete their handshake.
  • Short-circuits OAuth discovery probes (/.well-known/oauth-authorization-server) with local 404s to avoid noisy upstream errors.
  • Structured JSON logging, including upstream error bodies (truncated to 64 KiB) for easier debugging.
  • Table-driven unit tests covering signer behaviour, proxy forwarding, SSE fallback, discovery handling, and error propagation.

Documentation

  • See IMPLEMENTATION_PLAN.md for the current implementation roadmap.
  • See AGENTS.md for coding conventions and commit guidelines.

Usage

Set the required environment variables, then launch the proxy:

export MCP_UPSTREAM_URL="https://remote-mcp.example.com"
export MCP_API_KEY="your-api-key"
export MCP_API_SECRET="your-api-secret"
# optional static session header if upstream requires it:
# export MCP_SESSION_HEADER="x-session-id"
# export MCP_SESSION_VALUE="session-token"
# optional overrides:
# export MCP_LISTEN_ADDR="127.0.0.1:8080"
# export MCP_REQUEST_TIMEOUT="20s"

go run .

Point your local MCP-capable agent (Codex, Claude, etc.) at http://127.0.0.1:8080; the proxy will sign requests with HMAC headers before forwarding them to the upstream service.

Testing

Run the full suite with:

GOCACHE=$(pwd)/.cache go test ./...

The tests exercise the signer, configuration, and proxy layers (including SSE fallback and error propagation) without requiring live network access.

目录标签

目录标签

开发工具GoClaude认证代理本地部署MCP兼容HMAC签名SSE支持

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP