MCP测试服务器
一个简单的MCP服务器 API密钥, OAuth 2.0客户端凭据,以及 OAuth 2.0授权码 用于测试Appian MCP连接系统插件的身份验证。
实时服务器
基本URL: https://web-production-80ec7.up.railway.app
身份验证选项
1.API密钥认证
| 设置 |
值 |
| SSE URL |
https://web-production-80ec7.up.railway.app/sse |
| API密钥 |
test-api-key-12345 |
头球 X-API-Key 或 Authorization: Bearer |
|
2.OAuth 2.0客户端凭据
| 设置 |
值 |
| SSE URL |
https://web-production-80ec7.up.railway.app/sse |
| 令牌URL |
https://web-production-80ec7.up.railway.app/oauth/token |
| 客户端ID |
test-client-id |
| 客户端密码 |
test-client-secret |
| 资助类型 |
client_credentials |
3.OAuth 2.0授权码
| 设置 |
值 |
| SSE URL |
https://web-production-80ec7.up.railway.app/sse |
| 授权URL |
https://web-production-80ec7.up.railway.app/oauth/authorize |
| 令牌URL |
https://web-production-80ec7.up.railway.app/oauth/token |
| 客户端ID |
test-client-id |
| 客户端密码 |
test-client-secret |
| 测试用户名 |
testuser |
| 测试密码 |
testpass |
本地开发
本地服务器运行在 http://localhost:3000
测试
健康检查
curl https://web-production-80ec7.up.railway.app/health
API密钥认证
curl -N https://web-production-80ec7.up.railway.app/sse \
-H "X-API-Key: test-api-key-12345"
OAuth客户端凭据
# Get token
curl -X POST https://web-production-80ec7.up.railway.app/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=test-client-id&client_secret=test-client-secret"
# Connect to SSE
curl -N https://web-production-80ec7.up.railway.app/sse \
-H "Authorization: Bearer <TOKEN>"
OAuth授权码
- 在浏览器中打开:
https://web-production-80ec7.up.railway.app/oauth/authorize?client_id=test-client-id&redirect_uri=YOUR_REDIRECT_URI&response_type=code
- 使用...登录
testuser / testpass
- 在以下位置将代码兑换为令牌
/oauth/token 随着 grant_type=authorization_code
环境变量
| 变量 |
默认值 |
描述 |
PORT |
3000 |
服务器端口 |
OAUTH_CLIENT_ID |
test-client-id |
OAuth客户端ID |
OAUTH_CLIENT_SECRET |
test-client-secret |
OAuth客户端密钥 |
特性
- ✅ API密钥验证
- ✅ OAuth 2.0客户端凭据授予
- ✅ OAuth 2.0授权码授予
- ✅ 刷新令牌支持
- ✅ SSE上的MCP协议
- ✅ 示例工具:
echo
- ✅ 样本资源:
test://example
- ✅ 健康检查端点