MCP身份验证管理器
用于管理MCP服务器身份验证的Web UI。提供一个仪表板,用于查看、配置和验证MCP服务器以供使用 麦克波特.
特性
- 仪表盘 --从mcporter配置中查看所有具有身份验证状态的MCP服务器
- OAuth 2.0流程 --完全支持OAuth,包括发现、动态客户端注册和PKCE
- 许可证管理 -手动添加、编辑和删除API令牌
- 组态管理 --添加、编辑和删除MCP服务器配置
- Docker支持 --在已装载配置卷的容器中运行
快速开始
本地开发
# Clone the repo
git clone https://github.com/intelligenttools-ai/mcp-auth-manager.git
cd mcp-auth-manager
# Run (no npm install needed - zero dependencies!)
npm start
# Or with auto-reload
npm run dev打开http://localhost:9876
码头工人
# Using docker-compose (recommended)
docker-compose up -d
# Or build and run manually
docker build -t mcp-auth-manager .
docker run -d \
-p 9876:9876 \
-v ~/clawd/config:/config \
-v ~/.mcporter:/credentials \
mcp-auth-manager配置
环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
PORT | 9876 | 服务器端口 |
MCPORTER_CONFIG | ~/clawd/config/mcporter.json | mcporter配置路径 |
MCPORTER_CREDENTIALS | ~/.mcporter/credentials.json | 凭据文件的路径 |
mcporter配置格式
{
"mcpServers": {
"notion-workspace": {
"description": "Notion workspace: My Workspace",
"baseUrl": "https://mcp.notion.com/mcp",
"auth": "oauth"
},
"custom-api": {
"description": "Custom API server",
"command": "node",
"args": ["server.js"],
"auth": "token"
}
}
}凭证格式
凭据以mcporter兼容的格式存储:
{
"version": 1,
"entries": {
"server-name|hash": {
"tokens": {
"access_token": "...",
"token_type": "Bearer",
"refresh_token": "...",
"expires_at": "2025-01-01T00:00:00Z"
},
"client": {
"client_id": "..."
}
}
}
}OAuth流
对于具有以下功能的服务器 "auth": "oauth":
- 点击仪表板上的“身份验证”
- 应用程序通过以下方式发现OAuth端点
.well-known/oauth-authorization-server - 在OAuth服务器上动态注册客户端
- 使用PKCE质询重定向到授权端点
- 用户授权访问
- 回调交换令牌代码
- 保存到凭据文件的令牌
运输类型
- HTTP/SSE (
baseUrl)--用于通过HTTP的远程MCP服务器 - 标准 (
command)--对于作为子进程运行的本地MCP服务器
身份验证类型
- OAuth --具有发现功能的完整OAuth 2.0流程
- 令牌 -手动输入API密钥/令牌
- 无 --无需身份验证
发展
# Run with auto-reload
npm run dev
# The server has zero external dependencies
# Just Node.js 18+ required许可证
麻省理工学院
