@pinax/mcp连接到兼容MCP服务器服务的客户端,地址为 https://thegraph.market。
使用方法: @pinax/mcp [选项]
一个桥接客户端,用于连接Claude Desktop和其他兼容MCP的客户端到远程MCP服务器。
选项:
-V, --version 输出版本号
--remote-url <字符串> 远程MCP服务器URL(环境变量: REMOTE_URL)
--sse-url <字符串> [已废弃] 使用--remote-url代替(环境变量: SSE_URL)
--access-token <字符串> JWT访问令牌(环境变量: ACCESS_TOKEN)
-v, --verbose <布尔值> 启用详细日志记录(可选值: "true", "false",默认: false,环境变量: VERBOSE)
-h, --help 显示命令帮助
文档: https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/
此MCP允许LLMS访问由The Graph Token API提供的数据。
有两个可用的MCP:
https://token-api.mcp.thegraph.com/mcp 对于基于REST的MCP(所有层级)https://token-api.mcp.thegraph.com/sse 对于基于SQL的MCP(付费层级).env)ACCESS_TOKEN=<从thegraph.market获取的JWT令牌>
REMOTE_URL=https://token-api.mcp.thegraph.com/mcp
添加到你的Claude Desktop配置文件中:
位置:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.json配置:
{
"mcpServers": {
"pinax": {
"command": "npx",
"args": [
"@pinax/mcp",
"--remote-url",
"https://token-api.mcp.thegraph.com/mcp",
"--access-token",
"YOUR_ACCESS_TOKEN_HERE"
]
}
}
}
或使用环境变量:
{
"mcpServers": {
"pinax": {
"command": "npx",
"args": ["@pinax/mcp"],
"env": {
"REMOTE_URL": "https://token-api.mcp.thegraph.com/mcp",
"ACCESS_TOKEN": "YOUR_ACCESS_TOKEN_HERE"
}
}
}
}
{
"mcpServers": {
"pinax": {
"command": "/path/to/bun",
"args": [
"run",
"/path/to/pinax-mcp/index.ts",
"--remote-url",
"http://localhost:8080/mcp",
"--access-token",
"YOUR_ACCESS_TOKEN_HERE",
"-v",
"true"
]
}
}
}
此桥接适用于支持stdio传输的任何MCP客户端:
在命令中添加 -v true 或设置 VERBOSE=true 在环境变量中:
npx @pinax/mcp --remote-url https://example.com/mcp --access-token YOUR_TOKEN -v true
连接超时:
ACCESS_TOKEN 是否有效REMOTE_URL 是否正确且可访问认证失败:
服务器断开连接:
npm install
# 或
bun install
bun run index.ts --remote-url http://localhost:8080/mcp --access-token YOUR_TOKEN -v true
npm run build
# 或
bun run build
┌─────────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Claude Desktop │◄──stdio─►│ MCP Bridge │◄──HTTP──►│ Remote MCP │
│ (或其他 │ │ Client │ 或 │ Server │
│ MCP客户端) │ └──────────────┘◄──SSE───►└─────────────────┘
└─────────────────┘