使用说明
🎮 GRID.gg电竞MCP服务器
AI代理直接访问专业电子竞技数据的“大脑扩展”。
此模型上下文协议(MCP)服务器弥合了大型语言模型(如Claude、Gemini或JetBrains AI)与 GRID.gg API电子竞技。它允许人工智能助手自主搜索球队,查找比赛回放文件,并理解专业人士的复杂数据模式 英雄联盟 和 无畏契约 比赛。
为 Cloud9 x JetBrains“天空的极限”黑客马拉松.
✨ 特征
此服务器向您的AI代理提供了4个强大的工具:
explore_graphql_schema:“图书馆员”。它内省GRID中央数据API,以随时了解可用字段(球队、球员、锦标赛),确保在编写查询时零幻觉。execute_central_query:“Scout.”执行实时GraphQL查询以查找团队ID、比赛ID(系列)和锦标赛详细信息。list_match_files:查找特定JSONL重放文件的“Analyst.”检索工具(series-events)对于给定的比赛。get_event_definition:“词典”。为复杂的游戏内事件提供硬编码模式(如ward-placed或player-moved)这是通过GraphQL自省无法获得的。
🚀 入门指南
先决条件
- Node.js(v18或更高版本)
- A. GRID.gg API密钥 (来自黑客马拉松门户)
安装
- 克隆存储库:
git clone [https://github.com/resilientbeast/grid-esports-mcp.git](https://github.com/resilientbeast/grid-esports-mcp.git)
cd grid-esports-mcp
```
2. **Install dependencies:**
```bash
npm install
```
3. **Build the server:**
```bash
npm run build
```
## ⚙️ Configuration
To use this with an MCP Client (like **Claude Desktop** or **JetBrains AI**), add the following configuration to your config file (e.g., `claude_desktop_config.json`):
```json
{
"mcpServers": {
"grid-gg": {
"command": "node",
"args": [
"/absolute/path/to/grid-esports-mcp/dist/index.js"
],
"env": {
"GRID_API_KEY": "YOUR_ACTUAL_API_KEY_HERE"
}
}
}
}````