cwtools-mcp

cwtools-mcp

Read-only MCP server exposing CWTools Paradox/Stellaris semantic tools (syntax checking, scope queries, definitions, references, diagnostics, scripted triggers/effects/enums, and shader queries) to AI agents like Codex and Claude Code, bridging into VS Code-compatible hosts or running standalone.

Category
访问服务器

README

cwtools-mcp

English | 中文

<a id="english"></a>

English

Read-only Model Context Protocol server that exposes the CWTools Paradox/Stellaris semantic tools (project knowledge pack, bounded project graph, syntax check, scope queries, definitions, references, diagnostics, scripted triggers/effects/enums, and seven Shader queries) to external agents such as Codex and Claude Code.

This repository was split out of cwtools-vscode, which vendors it back as the submodules/cwtools-mcp submodule. The VS Code extension no longer bundles the MCP server — install it standalone:

  • npm: npx -y cwtools-mcp --stdio
  • Single file: download cwtools-mcp.cjs from Releases and point your MCP client at node cwtools-mcp.cjs --stdio

By default the proxy bridges into the active VS Code-compatible host (VS Code, Insiders, VSCodium, Cursor, Antigravity) through the bridge-manifest.json the extension writes under its globalStorage, auto-discovered across all supported hosts — reusing the IDE's CWTools language client and diagnostics instead of starting a second server. A legacy self-hosted LSP mode is available with --standalone.

Setup

# Codex
codex mcp add cwtools -- npx -y cwtools-mcp --stdio

# Claude Code
claude mcp add cwtools --scope user -- npx -y cwtools-mcp --stdio

For hand-written ~/.codex/config.toml, --standalone / --rules / --cache / --game-path advanced options, and Antigravity setup, see packages/cwtools-mcp/README.md.

Development

git submodule update --init   # pulls submodules/cwtools-stellaris-config (CWT rules for tests/dev)
npm install
npm run build            # build both packages (cwtools-shared, cwtools-mcp)
npm run test:contracts   # contract tests (schema drift, read-only, routing)
npm run bundle           # single-file dist/cwtools-mcp.cjs via esbuild

The MCP tool schema is generated, not handwritten: it is produced by tools/generate-mcp-schema.cjs in the cwtools-vscode repository from the extension's tool definitions, and committed here under packages/cwtools-shared/src/generated/mcpTools.ts.

Publishing

Both packages are published to npm (cwtools-shared first, then cwtools-mcp). Tags (v*) trigger a GitHub Release with the single-file cwtools-mcp.cjs attached.

<a id="zh-cn"></a>

中文

只读的 Model Context Protocol 服务,把 CWTools 的 Paradox/Stellaris 语义工具(项目知识包、有界项目语义图、语法检查、 作用域查询、定义/引用、诊断、scripted triggers/effects/enums 和七个 Shader 查询)开放给 Codex、Claude Code 等外部 Agent。

本仓库从 cwtools-vscode 拆出, 主仓库以 submodules/cwtools-mcp submodule 形式挂回。VS Code 扩展不再随包 携带 MCP 服务——请独立安装:

  • npm:npx -y cwtools-mcp --stdio
  • 单文件:从 Releases 下载 cwtools-mcp.cjs,MCP 客户端配置 node cwtools-mcp.cjs --stdio

默认模式下代理会通过扩展写入 globalStorage 的 bridge-manifest.json (在所有受支持宿主中自动发现:VS Code / Insiders / VSCodium / Cursor / Antigravity)桥接进已激活的 VS Code 兼容宿主,复用 IDE 已有的 CWTools 语言 客户端与诊断,不启动第二个服务。旧的自托管 LSP 模式可用 --standalone 显式启用。

接入

# Codex
codex mcp add cwtools -- npx -y cwtools-mcp --stdio

# Claude Code
claude mcp add cwtools --scope user -- npx -y cwtools-mcp --stdio

~/.codex/config.toml 手写配置、--standalone / --rules / --cache / --game-path 高级选项与 Antigravity 接入方式见 packages/cwtools-mcp/README.md。

开发

git submodule update --init   # 拉取 submodules/cwtools-stellaris-config(测试/开发用 CWT 规则)
npm install
npm run build            # 构建两个包(cwtools-shared、cwtools-mcp)
npm run test:contracts   # 合约测试(schema 漂移、只读、路由)
npm run bundle           # esbuild 产出单文件 dist/cwtools-mcp.cjs

MCP 工具 schema 为生成物,不手写:由 cwtools-vscode 仓库的 tools/generate-mcp-schema.cjs 从扩展工具定义生成,提交在本仓库 packages/cwtools-shared/src/generated/mcpTools.ts。

发布

两个包都发布到 npm(先 cwtools-shared,再 cwtools-mcp)。打 v* 标签会 触发 GitHub Release 并附带单文件 cwtools-mcp.cjs。

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选