Skip to main content
Glama

SFML 3.1.0 Documentation MCP Server (sfml3-ref)

License: MIT SFML Model Context Protocol TypeScript

一个官方的 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]]constexprexplicitdelete、默认参数)的完整方法原型。

  • 按模块分类:所有 155+ 个符号分布在 5 个 SFML 模块中:SystemWindowGraphicsAudioNetwork

  • 快速内存搜索:在符号名称、成员函数、参数和描述中进行亚毫秒级查找。

  • 智能别名:直接解析常见的 SFML typedef 和辅助类型(例如 Vector2fsf::Vector2<T>IntRectsf::Rect<T>secondssf::Time)。


Related MCP server: godot-mcp-docs

🛠️ MCP 工具

工具

参数

描述

list_modules

列出 5 个主要的 SFML 3.1.0 模块及其描述和符号数量。

get_module_toc

module_name: string

返回模块的目录(类、结构体、枚举、命名空间、函数)。

search_sfml_symbol

query: string

搜索给定术语的符号和成员方法(例如 SpritesetTexturepollEvent)。

get_sfml_doc

symbol_name: string

返回特定符号的完整 Markdown 文档和 C++ 原型(例如 sf::Spritesf::Vector2sf::Dns)。


🚀 快速开始

前提条件

  • 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.json

  • macOS~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux~/.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

  1. SFML 官网 下载 SFML 3.1.0 Doxygen HTML 文档。

  2. 将 HTML 文件解压到仓库根目录下名为 SFML-3.1.0 的文件夹中。

  3. 运行索引脚本:

    npm run build:index

📄 许可证

  • 服务器代码: 根据 MIT 许可证 授权。

  • SFML 文档与库: 版权所有 © Laurent Gomila 和 SFML 团队。SFML 根据 zlib/png 许可证 的条款和条件进行许可。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…

  • Get up-to-date, version-specific documentation and code examples from official sources directly in…

  • @latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Floxius/sfml3-ref'

If you have feedback or need assistance with the MCP directory API, please join our Discord server