关于 Game Industry Library
gil-mcp-bridge 是 Game Industry Library 的 stdio 桥接程序,面向无法通过 HTTP 连接远程服务的 MCP 客户端。它转发请求至该服务,后者提供游戏行业报告搜索和研究工具;调用工具需要 Pro 订阅。
主要功能
- 01stdio 到 HTTP 的请求转发
- 02OAuth 登录或 API 密钥认证
- 03搜索和获取报告
- 04访问引文、图表和表格
- 05研究提示词与文档资源
适用场景
- 01让仅支持 stdio 的 MCP 客户端连接 Game Industry Library
- 02在游戏行业报告中查找证据
- 03获取引文、图表和文档页面
- 04比较出版商或概述报告
MCP 相关
该桥接程序将 Game Industry Library 的远程 MCP 端点提供给本地 stdio MCP 客户端,并转发 JSON-RPC 请求和响应。支持远程 HTTP MCP 的客户端可直接连接 https://gameindustrylibrary.com/api/mcp。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://gameindustrylibrary.com/api/mcpclaude mcp add --transport http com-gameindustrylibrary-gil https://gameindustrylibrary.com/api/mcp{"mcpServers":{"com-gameindustrylibrary-gil":{"type":"http","url":"https://gameindustrylibrary.com/api/mcp"}}}在 Cursor 中打开{"servers":{"com-gameindustrylibrary-gil":{"type":"http","url":"https://gameindustrylibrary.com/api/mcp"}}}在 VS Code 中打开{"mcpServers":{"com-gameindustrylibrary-gil":{"type":"http","url":"https://gameindustrylibrary.com/api/mcp"}}}{"mcpServers":{"com-gameindustrylibrary-gil":{"serverUrl":"https://gameindustrylibrary.com/api/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
gil-mcp-bridge
游戏行业资料库 MCP 服务的 Stdio 桥接工具。它将远程 /api/mcp 端点提供给只能运行本地命令(stdio)的 MCP 客户端:较旧版本的 Claude Desktop、Cline、Continue、较旧版本的 Cursor,以及自定义集成。
如果你的客户端支持填写服务地址(通过 HTTP 连接远程 MCP——Claude 应用和 claude.ai、ChatGPT、Claude Code、Cursor),请直接连接到 https://gameindustrylibrary.com/api/mcp:它会通过 OAuth 登录,无需桥接工具。/help/mcp-server 中的引导式设置会介绍每个客户端的配置方法。
需要 Game Industry Library Pro。 任何人都可以登录,但没有有效订阅时,工具调用会返回相应错误。订阅。
安装
通过 npx 直接从 GitHub 运行——无需安装:
npx --yes --allow-git=root github:DerpBicycle/gil-mcp-bridge
npm 12 及更高版本需要 --allow-git=root,否则会拒绝安装从 git 获取的软件包(EALLOWGIT)。较旧的 npm 版本也接受此参数,因此请在每条命令和配置中保留它。--yes 会跳过安装提示。
也可以固定到特定的提交 / 标签:
npx --yes --allow-git=root github:DerpBicycle/gil-mcp-bridge#v0.2.0
或者克隆并安装:
git clone https://github.com/DerpBicycle/gil-mcp-bridge
cd gil-mcp-bridge
npm install # runs prepare → tsc, then dist/ is ready
node dist/index.js
身份验证
有两种方式:
OAuth(推荐)
npx --yes --allow-git=root github:DerpBicycle/gil-mcp-bridge login
此操作会打开浏览器,通过 DCR 注册客户端,引导你完成授权页面,并将令牌保存到 ~/.gil/credentials.json(权限模式为 0600,仅限用户访问)。访问令牌有效期为一小时,并会自动刷新;除非你在 /account → Connected Apps 中撤销会话,或运行 logout,否则会话会保持有效 30 天。
API 密钥
GIL_API_KEY=gil_xxx npx --yes --allow-git=root github:DerpBicycle/gil-mcp-bridge
登录并开通 Pro 后,可在 /help/mcp-server 创建密钥。密钥不会过期,但你可以在同一页面撤销密钥。
在 MCP 客户端中使用
Claude Desktop
打开 Settings → Developer → Edit Config(claude_desktop_config.json),并添加:
{
"mcpServers": {
"game-industry-library": {
"command": "npx",
"args": ["--yes", "--allow-git=root", "github:DerpBicycle/gil-mcp-bridge"]
}
}
}
重启 Claude Desktop。首次运行时,桥接工具会输出“无凭据”错误——在终端中运行一次 npx --yes --allow-git=root github:DerpBicycle/gil-mcp-bridge login,即可登录。
Cline / Continue / 其他 stdio 客户端
配置相同——将客户端指向 npx --yes --allow-git=root github:DerpBicycle/gil-mcp-bridge,并将其设为命令。
自定义
通过 stdin 发送以换行符分隔的 JSON-RPC 2.0 数据(单条消息或最多包含 20 个请求的批次);响应会逐行写入 stdout。错误和状态消息会写入 stderr。
你将获得
服务器名称和徽标会随研究说明一起出现在 initialize 响应中,供模型使用。
- 工具:
search、fetch、search_in_document、get_document、get_pages、list_documents、list_recent、list_popular、list_tags、get_facets、get_figures、get_tables、get_entities、get_citation、get_similar、get_related、list_collections、list_writers、get_glossary_term - 资源:
gil://documents/{slug}、gil://documents/{slug}/page/{page}、gil://documents/{slug}/figures、gil://collections/{slug}、gil://writers/{slug}、gil://glossary/{term} - 提示词:
summarize_document、compare_publishers、find_evidence、catch_up
公平使用限制:每位用户每天最多调用工具 2,000 次(于 UTC 午夜重置),每分钟最多 30 次,所有密钥和令牌共用限额。每个工具结果都会在 _meta.usage 中报告剩余限额。
命令
gil-mcp Start the bridge (default — use this in client config)
gil-mcp login Interactive OAuth login (stores ~/.gil/credentials.json)
gil-mcp logout Revoke and remove stored credentials
gil-mcp status Show current credential state
gil-mcp help Show help
环境变量
| 变量 | 用途 | 默认值 |
|---|---|---|
GIL_API_KEY | API 密钥(gil_…)。优先于 OAuth。 | — |
GIL_BASE_URL | 覆盖服务 URL。可用于针对 staging 或本地开发环境进行测试。 | https://gameindustrylibrary.com |
工作原理
该桥接器是一个轻量级传输协议转换器。它从 stdin 读取 JSON-RPC 帧,并将每个帧作为 POST /api/mcp(Streamable HTTP,协议版本 2025-03-26)转发,同时附带 Authorization: Bearer 标头,并回显服务器在 initialize 时发出的 Mcp-Session-Id。无论服务器返回 JSON 还是 SSE 流,响应都会逐行写回 stdout。不缓存、不转换:所有工作都由服务器完成。
- 令牌按请求解析。OAuth 令牌若将在 60s 内过期,则会先刷新;如果服务器以 401 拒绝令牌,则会刷新一次并重试请求。并发请求共用同一次刷新,因为服务器每次使用都会轮换刷新令牌。如果刷新失败,请求会收到错误提示,要求你再次运行
login。 - 服务器返回的错误——没有 Pro 时的 403、公平使用限制下的 429——会作为服务器写入的 JSON-RPC 错误直接传递。任何非 JSON-RPC 内容(代理的 HTML 错误页面、网络故障)都会针对帧中的每个请求转换为 JSON-RPC 错误,因此客户端不会一直等待,也不会读取乱码。
- 关闭: stdin 关闭时,桥接器会先响应仍在处理中的请求,然后退出。
从源代码构建
git clone https://github.com/DerpBicycle/gil-mcp-bridge
cd gil-mcp-bridge
npm install
npm run build
node dist/index.js
文件
src/index.ts— CLI 入口、命令分发src/bridge.ts— stdio ↔ HTTP 转发src/login.ts— OAuth 交互流程(DCR + PKCE + loopback)src/credentials.ts— 读取、写入、刷新和撤销~/.gil/credentials.jsonassets/— Game Industry Library 徽标(SVG、512 和 192 px PNG)
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。