MCP客户端: @pinax/mcp
用于连接MCP服务器兼容服务的MCP客户端https://thegraph.market.
用法
Usage: @pinax/mcp [options]
A bridge client for connecting Claude Desktop and other MCP-compatible clients to remote MCP servers.
Options:
-V, --version output the version number
--remote-url Remote MCP server URL (env: REMOTE_URL)
--sse-url [DEPRECATED] Use --remote-url instead (env: SSE_URL)
--access-token JWT Access Token (env: ACCESS_TOKEN)
-v, --verbose Enable verbose logging (choices: "true", "false", default: false, env: VERBOSE)
-h, --help display help for command文档:https://thegraph.com/docs/en/ai-suite/token-api-mcp/introduction/
端点
此MCP允许LLMS访问由提供的数据 图形令牌API.
有两种MCP可供选择:
- 使用
https://token-api.mcp.thegraph.com/mcp对于基于REST的MCP(所有层) - 使用
https://token-api.mcp.thegraph.com/sse基于SQL的MCP(付费层)
认证
- 在以下网址创建免费帐户https://thegraph.market使用您的GitHub凭据
- 首选 仪表盘
- 点击 创建新密钥
- 点击 生成访问令牌
配置
环境变量(.env)
ACCESS_TOKEN=
REMOTE_URL=https://token-api.mcp.thegraph.com/mcpClaude桌面配置
添加到您的Claude Desktop配置文件中:
地点:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%/Claude/claude_desktop_config.json - Linux:
~/.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"
}
}
}
}与Bun一起使用(开发)
{
"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正确且可访问
身份验证失败:
- 在以下位置生成新的访问令牌https://thegraph.market
- 确保令牌未过期
服务器已断开连接:
- 检查Claude Desktop日志以获取详细的错误消息
- 验证与远程服务器的网络连接
发展
再进行
npm install
# or
bun install在本地运行
bun run index.ts --remote-url http://localhost:8080/mcp --access-token YOUR_TOKEN -v true构建
npm run build
# or
bun run build建筑
┌─────────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Claude Desktop │◄──stdio─►│ MCP Bridge │◄──HTTP──►│ Remote MCP │
│ (or other │ │ Client │ or │ Server │
│ MCP client) │ └──────────────┘◄──SSE───►└─────────────────┘
└─────────────────┘