Token导航 LogoToken导航TokenDH.com
Unreal Python MCP logo
开发工具stdio官方级别未说明来源级核验

Unreal Python MCP

MCP Server

为Unreal Python API提供文档浏览、搜索和代码执行功能的MCP服务器,适用于AI编程助手和开发者。

工具数

8

提示词数

0

GitHub Stars

0

资源数

0
代码执行PythonClaude文档服务Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

self-taught-code-tokushima

提供方

self-taught-code-tokushima

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uvx unreal-python-mcp-refresh

详细介绍

虚幻的python mcp

MCP(模型上下文协议)服务器,用于Unreal Python API文档和执行。

使Claude Code等AI编码助手能够:

  • 浏览虚幻Python API文档
  • 搜索类和函数
  • 在虚幻编辑器中执行Python代码

安装

# Clone the repository
git clone https://github.com/self-taught-code-tokushima/unreal-python-mcp.git
cd unreal-python-mcp

# Install with uv
uv sync

Claude代码设置

添加到您的Claude Code MCP配置中(~/.config/claude/mcp.json 或项目级别 .mcp.json):

{
  "mcpServers": {
    "unreal-python": {
      "command": "uv",
      "args": ["--directory", "D:\\UnrealProjects\\unreal-python-mcp", "run", "unreal-python-mcp"]
    }
  }
}

{
  "mcpServers": {
    "unreal-python": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/self-taught-code-tokushima/unreal-python-mcp", "unreal-python-mcp"]
    }
  }
}

需求

  • Python 3.13+
  • 启用Python插件的虚幻编辑器
  • 在编辑器首选项>插件>Python中选中“启用远程执行”

自定义模块支持

除了内置 unreal 模块,您可以在虚幻编辑器环境中记录可用的自定义Python模块(例如。, MaterialGraphEditor).

设置

添加 env 使用 UNREAL_PYTHON_CUSTOM_MODULES 环境变量:

{
  "mcpServers": {
    "unreal-python": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/self-taught-code-tokushima/unreal-python-mcp", "unreal-python-mcp"],
      "env": {
        "UNREAL_PYTHON_CUSTOM_MODULES": "YourCustomModule1,YourCustomModule2"
      }
    }
  }
}

使用自定义模块刷新缓存

配置自定义模块后,刷新缓存以包含它们:

# Windows PowerShell
$env:UNREAL_PYTHON_CUSTOM_MODULES="MaterialGraphEditor,BlueprintGraphEditor"
uvx unreal-python-mcp-refresh

# Or with uv run
$env:UNREAL_PYTHON_CUSTOM_MODULES="MaterialGraphEditor,BlueprintGraphEditor"
uv run unreal-python-mcp-refresh
# Linux/macOS
UNREAL_PYTHON_CUSTOM_MODULES="MaterialGraphEditor,BlueprintGraphEditor" uvx unreal-python-mcp-refresh

备注

  • 将多个模块指定为逗号分隔的值
  • 自定义模块将与内置模块一起出现在模块列表中
  • MCP服务器启动时将自动使用配置的模块

可用工具

工具说明
search_unreal_api按类/函数名称搜索API
get_class_overview获取类概述(成员名单,1-3KB)
get_member_info获取特定成员的详细信息
get_members_info获取多个成员的详细信息(批量)
list_modules列出可用的虚幻模块
exec_unreal_python在虚幻编辑器中执行Python代码
list_unreal_instances列出可用的虚幻编辑器实例
refresh_api_cache刷新API文档缓存(也可作为CLI: uvx unreal-python-mcp-refresh)

可用资源

层级索引

类按模块组织,以尽量减少上下文使用。

资源大小描述
unreal-python://index/summary~2KB从这里开始。 API概述及模块列表
unreal-python://index/module/{name}~20-90KB特定模块的类
unreal-python://index/enums~50KB所有枚举
unreal-python://index/structs~200KB所有结构
unreal-python://index/delegates~10KB所有代表

常用模块:

  • Engine (994个类):核心类-演员、世界、游戏静态
  • UnrealEd (204类):编辑器实用程序-EditorAssetLibrary
  • UMG (110个类):UI/Widget类
  • Niagara (98类):粒子系统

课堂文件

资源描述
unreal-python://class/{name}详细的课堂文档

用法示例

在克劳德代码中:

User: Actor クラスの位置を取得するメソッドを教えて

Claude: [Reads unreal-python://index/summary]
        → Engine モジュールに Actor があることを確認

        [Reads unreal-python://index/module/Engine]
        → Actor: 145 methods, 48 properties

        [Uses get_class_overview("Actor")]
        → メソッド名一覧を取得(1-2KB程度)

        [Uses get_member_info("Actor", "get_actor_location")]
        → 詳細ドキュメントを取得

        Actor の位置を取得するには get_actor_location() を使います。
        返り値は Vector 型です。
User: EditorAssetLibrary の使い方を教えて

Claude: [Reads unreal-python://index/summary]
        → UnrealEd モジュールにあることを確認

        [Reads unreal-python://index/module/UnrealEd]
        [Uses get_class_overview("EditorAssetLibrary")]
        → メソッド名一覧を取得

        EditorAssetLibrary はエディタ専用のアセット操作ユーティリティです...
User: Unreal で Hello World を出力して

Claude: [Uses exec_unreal_python("print('Hello World')")]

        実行結果: Hello World

首次设置

  1. 使用项目启动虚幻编辑器
  2. 在编辑器首选项中启用Python远程执行(编辑器首选项>插件>Python>启用远程执行)
  3. 刷新API文档缓存:
# Using uvx (recommended)
uvx unreal-python-mcp-refresh

# Or with uv run (if you cloned the repository)
uv run unreal-python-mcp-refresh

或者,您可以使用 refresh_api_cache 连接到MCP服务器后,使用Claude Code的MCP工具。

发展

# Run MCP dev server (with inspector)
uv run mcp dev src/unreal_python_mcp/server.py

# Run directly
uv run unreal-python-mcp

许可证

麻省理工学院

目录标签

目录标签

代码执行PythonClaude文档服务Unreal引擎本地部署PythonAPIAI编程助手

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

8

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP