godot-mcp: Instructions file for Claude Code

CLAUDE.md

godot-mcp CLAUDE.md is an instructions file for Claude Code from hhhh124hhhh/godot-mcp. It costs 7,358 tokens per session, scanned A, original, MIT.

Project instructions for connecting the Godot game engine to Claude through an MCP server. Godot is software for building games, and WebSocket is a network connection that allows two programs to exchange messages continuously.

In plain words
What is it for?
Use them when installing or building the Node.js server, enabling the Godot plugin, checking the WebSocket connection, or changing command routing and MCP communication.
Why use it?
They explain the client-server setup and the commands needed to build, run, test, and connect the Godot plugin and backend.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; positional $N argument; mentions Claude Code.

This is hhhh124hhhh/godot-mcp's own configuration. It tells Claude Code how to work on godot-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything godot-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hhhh124hhhh/godot-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hhhh124hhhh/godot-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/hhhh124hhhh/godot-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for godot-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hhhh124hhhh/godot-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/hhhh124hhhh/godot-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/hhhh124hhhh/godot-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/hhhh124hhhh/godot-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for godot-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hhhh124hhhh/godot-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/hhhh124hhhh/godot-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,358 This file is loaded in full into every session.
When invoked 7,358 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.07358 $0.07358
Opus 5 $0.03679 $0.03679
Sonnet 5 $0.01472 $0.01472
Haiku 4.5 $0.00736 $0.00736

Measured 9d ago against content hash 110fe10e8a94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

godot-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 954 lines

How it starts

The opening of the file, as written. The whole thing — 954 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

本文件为 Claude Code (claude.ai/code) 在此代码库中工作时提供指导。

架构概览

这是一个 Godot 引擎 + Claude AI 集成项目,使用模型上下文协议 (MCP)。项目采用 客户端-服务器架构

  • Godot 插件 (客户端): 位于 addons/godot_mcp/ - 作为 EditorPlugin 在 Godot 中运行
  • MCP 服务器 (后端): 位于 server/ - 使用 FastMCP 的 Node.js/TypeScript 服务器

通信流程

Claude ↔ MCP 服务器 (FastMCP) ↔ WebSocket ↔ Godot 插件

Godot 插件创建 WebSocket 服务器(默认端口 9080),接受来自 MCP 服务器的连接。所有命令都通过此 WebSocket 连接使用 JSON 消息格式传输。

构建和运行命令

MCP 服务器开发

  • 安装依赖: cd server && npm install
  • 服务器构建: cd server && npm run build (将 TypeScript 编译到 dist/)
  • 启动服务器: cd server && npm run start
  • 开发模式: cd server && npm run dev (使用 nodemon 自动重建)
  • 类型检查: cd server && npx tsc --noEmit (仅类型检查,不输出文件)

Godot 项目

  • 打开项目: 在 Godot Editor 中打开 project.godot
  • 插件位置: addons/godot_mcp/
  • 启用插件: 项目设置 → 插件 → 启用 "Godot MCP"

测试连接

  1. 启动 MCP 服务器: cd server && npm run dev
  2. 在 Godot Editor 中打开项目(插件自动启动)
  3. 检查 MCP 服务器日志,确认 WebSocket 连接到 ws://localhost:9080

核心组件

Godot 插件端 (addons/godot_mcp/)

  • mcp_server.gd: 主 EditorPlugin,创建 WebSocket 服务器
  • command_handler.gd: 将 JSON 命令路由到相应的处理器
  • commands/: 命令处理器(node_commands.gd, script_commands.gd, scene_commands.gd 等)
  • ui/mcp_panel.gd: 编辑器 UI 面板,显示连接状态和日志

MCP 服务器端 (server/src/)

  • index.ts: FastMCP 服务器入口点,注册所有工具/资源
  • utils/godot_connection.ts: WebSocket 连接管理,支持自动重连
  • tools/: MCP 工具定义(node_tools.ts, script_tools.ts 等)
  • resources/: MCP 资源提供器(scene_resources.ts, script_resources.ts 等)

开发模式

添加新命令

  1. Godot 端: 在 addons/godot_mcp/commands/ 中创建新命令类

    • 继承基础命令模式
    • command_handler.gd 中注册
    • 遵循 snake_case 命名规范
  2. MCP 服务器端: 在 server/src/tools/ 中创建工具

    • 使用 FastMCP 工具构建器模式
    • server/src/index.ts 中注册
    • 使用 Zod 进行参数验证

消息协议

命令格式 (MCP → Godot):

{
  "type": "command_name",
  "params": { /* 命令参数 */ },
  "commandId": "unique_id"
}

响应格式 (Godot → MCP):

{
  "status": "success|error",
  "result": { /* 响应数据 */ },
  "commandId": "matching_id"
}

Read the full file on GitHub · 954 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 954 lines · 7,358 tokens per session scan A 110fe10e8a94

Subscribe to this mod's changes

godot-mcp CLAUDE.md is an instructions file published in the GitHub repository hhhh124hhhh/godot-mcp (42 stars, last pushed 9mo ago), licensed MIT. It adds 7,358 tokens to every session, about $0.0368 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,737 tokens