sfml3-ref
SFML 3.1.0 Documentation MCP Server (sfml3-ref)
一个官方的 Model Context Protocol (MCP) 服务器,为 AI 助手(Claude Desktop、Cursor、Claude Code、Cline 等)提供对完整 SFML 3.1.0 C++ 参考文档的直接离线访问。
🌟 功能
简洁的 Markdown API 参考:将 Doxygen HTML 文档解析并清理为格式化的 GitHub Markdown,包含语法高亮的 C++ 代码块。
完整的 C++20 签名:包含说明符(
[[nodiscard]]、constexpr、explicit、delete、默认参数)的完整方法原型。按模块分类:所有 155+ 个符号分布在 5 个 SFML 模块中:
System、Window、Graphics、Audio和Network。快速内存搜索:在符号名称、成员函数、参数和描述中进行亚毫秒级查找。
智能别名:直接解析常见的 SFML typedef 和辅助类型(例如
Vector2f➔sf::Vector2<T>、IntRect➔sf::Rect<T>、seconds➔sf::Time)。
Related MCP server: Garmin Documentation MCP Server
🛠️ MCP 工具
工具 | 参数 | 描述 |
| 无 | 列出 5 个主要的 SFML 3.1.0 模块及其描述和符号数量。 |
|
| 返回模块的目录(类、结构体、枚举、命名空间、函数)。 |
|
| 搜索给定术语的符号和成员方法(例如 |
|
| 返回特定符号的完整 Markdown 文档和 C++ 原型(例如 |
🚀 快速开始
前提条件
Node.js(推荐 v18.0.0 或更高版本)
npm
安装与构建
# 1. Clone the repository
git clone https://github.com/Floxius/sfml3-ref.git
cd sfml3-ref
# 2. Install dependencies
npm install
# 3. Build the TypeScript server
npm run build注意: 仓库已包含预构建的
index.json(约 1 MB),因此除非你想重新运行索引脚本,否则无需下载原始的 SFML Doxygen HTML 文件。
🖥️ 客户端配置
1. Claude Desktop
将服务器添加到你的 Claude Desktop 配置文件中:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"sfml3-ref": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/sfml3-ref/dist/src/index.js"
]
}
}
}(在 Windows 上,使用正斜杠或双反斜杠,例如 C:/Users/<username>/Documents/sfml3-ref/dist/src/index.js)
替代方案:直接使用 tsx 运行(无需构建步骤)
{
"mcpServers": {
"sfml3-ref": {
"command": "npx",
"args": [
"-y",
"tsx",
"/ABSOLUTE/PATH/TO/sfml3-ref/src/index.ts"
]
}
}
}2. Cursor / Cline / 其他 MCP 客户端
添加一个 STDIO MCP 服务器:
命令:
node参数:
["/path/to/sfml3-ref/dist/src/index.js"]
📖 使用示例
在 Claude 或你的 MCP 客户端中连接后,你可以提出如下提示:
"列出 SFML 3.1 中所有可用的模块。"
"显示 SFML Graphics 模块中的所有类和函数。"
"SFML 3 中
sf::Sprite的构造函数签名是什么?""如何使用 SFML 3.1 中的
sf::Dns查询 DNS 记录?""搜索 SFML 3 中的事件处理方法。"
🔄 重建索引(可选)
如果你想从头重新生成 index.json:
从 SFML 官网 下载 SFML 3.1.0 Doxygen HTML 文档。
将 HTML 文件解压到仓库根目录下名为
SFML-3.1.0的文件夹中。运行索引脚本:
npm run build:index
📄 许可证
服务器代码: 根据 MIT 许可证 授权。
SFML 文档与库: 版权所有 © Laurent Gomila 和 SFML 团队。SFML 根据 zlib/png 许可证 的条款和条件进行许可。
This server cannot be deployed
Maintenance
Related MCP Connectors
Qt 5 and Qt 6 framework and product docs: Qt Creator, MCUs, Squish, Coco and more.
Search the official docs of Claude Code, Cursor, OpenAI Codex and MCP, refreshed daily.
Tailor Platform for AI assistants: search, list and read the platform documentation.
Search and read Rust documentation for the standard library and any crate on crates.io
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides instant, offline access to comprehensive PrestaShop development documentation including 647+ hooks, module guides, component architecture, APIs, and theme development resources for AI assistants.79MIT
- FlicenseAqualityFmaintenanceProvides offline access to complete Garmin Connect IQ SDK 8.2.3 documentation with enhanced search, device reference, programming guides, and FAQ for AI assistants.811-
- FlicenseAqualityDmaintenanceEnables AI assistants to search and retrieve detailed documentation for Tracktion Engine classes and APIs.2-
- AlicenseAqualityBmaintenanceProvides full class documentation for the Binding of Isaac modding API, enabling AI assistants to access complete class pages with methods, enums, and tutorials to avoid hallucination.4MIT