Valorant MCP服务器
模型上下文协议(MCP)服务器,通过与Henrik API集成,提供全面的Valorant球员统计数据和比赛数据。该服务器允许Claude Desktop获取球员信息、比赛历史、排名数据,并对Valorant球员进行性能分析。
特性
- 玩家帐户信息:获取玩家详细信息,包括PUUID、显示名称、标签和帐户级别
- 排名和MMR数据:获取当前竞争排名和峰值排名信息
- 比赛历史:使用详细统计信息检索最近的比赛数据
- 性能分析:使用胜率、K/D比率和平均值分析多场比赛中的球员表现
- 灵活过滤:按游戏模式筛选比赛(竞技、无等级、死亡竞赛、扣球)
先决条件
- Python 3.8或更高版本
- Henrik API密钥(从 Henrik Dev API)
- Claude桌面应用程序
安装
1.克隆或下载服务器
保存 valorant.py 文件到您想要的位置。
2.安装依赖项
pip install aiohttp pydantic mcp或者使用虚拟环境:
python -m venv valorant_env
source valorant_env/bin/activate # On Windows: valorant_env\Scripts\activate
pip install aiohttp pydantic mcp3.获取Henrik API密钥
- 访问 Henrik Dev API文档
- 按照他们的说明获取API密钥
- 请确保此密钥的安全——您需要它进行配置
配置
Claude桌面设置
将以下内容添加到您的 claude_desktop_config.json 文件:
{
"mcpServers": {
"valorant": {
"command": "python",
"args": ["/absolute/path/to/valorant.py"],
"env": {
"VAL_API_KEY": "your_henrik_api_key_here"
}
}
}
}配置选项
使用完整的Python路径 (推荐):
{
"mcpServers": {
"valorant": {
"command": "/full/path/to/python",
"args": ["/absolute/path/to/valorant.py"],
"env": {
"VAL_API_KEY": "your_henrik_api_key_here"
}
}
}
}使用紫外线:
{
"mcpServers": {
"valorant": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/valorant.py", "run", "valorant.py"],
"env": {
"VAL_API_KEY": "HDEV-a65abbc4-eac1-4bce-9206-98ef16e2d535"
}
}
}
}环境变量
| 变量 | 描述 | 必填 |
|---|---|---|
VAL_API_KEY | 您的Henrik API密钥 | 是 |
可用工具
get_player_account
获取Valorant玩家的基本帐户信息。
参数:
name(string):玩家的显示名称tag(string):玩家的标签行
例子: 获取玩家“TenZ#NA1”的帐户信息
get_player_rank
获取当前竞争排名和峰值排名信息。
参数:
name(string):玩家的显示名称tag(string):玩家的标签行
退货: 当前层、峰值层和PUUID
get_match_history
使用详细统计信息检索最近的比赛历史记录。
参数:
name(string):玩家的显示名称tag(string):玩家的标签行match_count(int,可选):要检索的匹配数(最大20,默认5)mode(字符串,可选):按游戏模式筛选(竞技、无等级、死亡竞赛、扣球)
退货: 最近与K/D/A、地图、模式和匹配结果的匹配列表
analyze_player_performance
分析球员在最近多场比赛中的表现。
参数:
name(string):玩家的显示名称tag(string):玩家的标签行matches_to_analyze(int,可选):要分析的最近匹配数(默认值5)
退货: 综合性能分析包括:
- 胜率百分比
- 平均杀人、死亡、助攻
- K/D比率
- 统计总数
可用资源
玩家简介
valorant://player/{name}/{tag}/profile
获取完整的玩家资料,包括帐户信息和排名数据。
比赛历史
valorant://player/{name}/{tag}/matches/{count}
获取格式化的比赛历史记录,便于阅读。
使用示例
基本玩家查找
Get account information for player "Shroud#NA1"性能分析
Analyze the recent performance of player "TenZ#TSM" over the last 10 matches将历史记录与筛选相匹配
Get the last 15 competitive matches for player "Ninja#USA"比较分析
Compare the performance of "Player1#TAG1" and "Player2#TAG2"