内容
<p align="center">
<img src="https://img.shields.io/badge/python-3.12+-blue?logo=python" alt="Python">
<img src="https://img.shields.io/badge/fastmcp-3.2+-purple" alt="FastMCP">
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
<img src="https://img.shields.io/badge/version-0.3.1-blue" alt="Version">
</p>
<p align="center">
<img src="https://img.shields.io/badge/Port_Backend-11020-blueviolet" alt="Backend Port">
<img src="https://img.shields.io/badge/Port_Frontend-11021-blueviolet" alt="Frontend Port">
<img src="https://img.shields.io/badge/MCP_HTTP-%2Fmcp-ff69b4" alt="MCP Path">
</p>
# Steam-MCP
**FastMCP 3.2 服务器,用于 Valve Steam** — 个人资料、图书馆、统计数据、商店、Workshop、SteamCMD 状态。React 仪表盘,带有混合 Ollama 聊天、预制卡片、舰队发现(`/.well-known/mcp/manifest.json`)、MCPB 包和 Tauri 原生外壳。
---
## Fleet SOTA (v0.3.1)
| 项目 | 状态 |
|------|--------|
| Portmanteau + Prefab + 智能代理 | ✅ |
| `manifest.json` + `just mcpb-pack` | ✅ |
| `assets/prompts/` (MCPB 3-4-100) | ✅ |
| `install-mcp.ps1` | ✅ |
| `/.well-known/mcp/manifest.json` | ✅ |
| `GET /api/capabilities` | ✅ |
| `llms.txt` + 生成的 `llms-full.txt` | ✅ |
| Tauri 脚手架 + 发布 CI | ✅ |
---
## Portmanteau 工具
| 工具 | 操作 |
|------|------------|
| `steam_profile` | `own`, `summaries`, `friends`, `resolve_vanity` |
| `steam_library` | `owned`, `recent`, `details`, `wishlist` |
| `steam_stats` | `achievements`, `global_percentages`, `players`, `leaderboards` |
| `steam_store` | `news`, `search`, `reviews` |
| `steam_workshop` | `query`, `item_details` |
| `steam_system` | `status`, `steamcmd_status` |
还包括:`steam_help`、`agentic_steam_workflow`、预制 `show_*` 卡片。
无需 API 密钥:商店搜索、应用详情、新闻、玩家数量、全局成就百分比。
---
## 快速开始
```powershell
git clone https://github.com/sandraschi/steam-mcp.git
cd steam-mcp
uv sync
$env:STEAM_API_KEY = "your-key" # https://steamcommunity.com/dev/apikey
$env:STEAM_ID = "7656119xxxxxxxxxx"
just serve # 后端 :11020
.\start.ps1 # 后端 + 前端 :11021
```
MCP:`http://localhost:11020/mcp` · REST:`/api/status`、`/api/capabilities`、`/api/tools/{name}/call`
发现:`http://localhost:11020/.well-known/mcp/manifest.json`
安装 MCP 客户端:`.\install-mcp.ps1 print` · MCPB:`just mcpb-pack`
---
## MCP 客户端配置
```json
{
"mcpServers": {
"steam": {
"command": "uv",
"args": ["--directory", "D:/Dev/repos/steam-mcp", "run", "steam-mcp"],
"env": {
"STEAM_API_KEY": "...",
"STEAM_ID": "..."
}
}
}
}
```
HTTP:
```json
{
"mcpServers": {
"steam": { "url": "http://localhost:11020/mcp" }
}
}
```
---
## 示例调用
```json
{"operation": "search", "query": "Godot", "count": 5}
```
→ `steam_store`
```json
{"operation": "players", "app_id": 440}
```
→ `steam_stats` (无需密钥)
```json
{"operation": "owned"}
```
→ `steam_library` (密钥 + STEAM_ID)
---
## 架构
```
src/steam_mcp/
services/ # Steam API 逻辑(共享 httpx 客户端)
mcp/tools/ # portmanteau, prefab, prompts, resources, agentic
skills/steam-mcp/ # MCP 技能,用于主机
server.py # FastAPI + /mcp 挂载
web.py # REST 桥接
webapp/ # Vite React 仪表盘(聊天工具控制台)
```
---
## 开发
```powershell
just install
just test
just smoke
just lint
just e2e
```
舰队文档:`mcp-central-docs/projects/steam-mcp/README.md`
---
## 许可证
MIT