Godot Documentation Server MCP Server

Provides AI assistants with direct access to the complete Godot Engine docs.

README.md

Godot MCP Documentation Server

中文文档 | English

A Model Context Protocol (MCP) server that provides AI assistants with access to the complete Godot Engine documentation, helping developers with Godot development by serving documentation directly to LLMs.

Purpose

This server bridges the gap between AI assistants and Godot documentation, allowing developers to get instant, accurate answers about Godot classes, tutorials, and features without leaving their AI chat interface.

Project Origin

This project is based on godot-mcp-docs by Nihilantropy, modified for local development on Windows without Docker.

Installation

  1. Install uv (if not already installed):

    # On Windows with PowerShell:
    Invoke-WebRequest -Uri https://astral.sh/uv/install.ps1 -UseBasicParsing | Invoke-Expression
    
  2. Clone the repository:

    git clone https://github.com/Nihilantropy/godot-mcp-docs.git
    cd godot-mcp-docs
    
  3. Install Python dependencies:

    uv sync
    

    This command reads from pyproject.toml and creates a virtual environment.

    Note: uv sync uses pyproject.toml as the source of truth, not requirements.txt. This is the modern Python packaging standard (PEP 517/518/621). The uv.lock file ensures consistent dependency versions across environments.

Setting Up Documentation

After installing dependencies, you need to download and process the Godot documentation:

  1. Generate documentation:

    uv run python .\docs_converter\godot_docs_converter.py
    
  2. Move docs folder to root: After conversion, move the generated docs folder to the project root directory.

  3. Generate documentation tree:

    cd docs
    tree /f > docs_tree.txt
    cd ..
    

    Note: If you encounter Chinese encoding issues, use:

    tree /f | Out-File -Encoding utf8 docs_tree.txt
    

Running the Server

Start the MCP server locally:

uv run python main.py

Configuring MCP Client

Claude Desktop Example

Add this to your Claude Desktop configuration file:

{
  "mcpServers": {
    "godot-mcp-docs": {
      "command": "uv",
      "args": [
        "run",
        "python",
        "main.py"
      ]
    }
  }
}

Available Tools

  • get_documentation_tree() - Get a tree-style overview of the entire documentation structure
  • get_documentation_file(file_path: str) - Retrieve the content of specific documentation files

Sample Usage

Explore documentation structure:

What documentation is available for Godot?

Get specific class documentation:

Show me the documentation for CharacterBody2D

Learn about tutorials:

What tutorials are available for 2D game development?

Get specific tutorial content:

Show me the first 2D game tutorial

Compare classes:

What's the difference between Node2D and CharacterBody2D?

Debugging

Option 1: FastMCP Dev UI (Recommended)

Start the server in dev mode:

uv run fastmcp dev main.py

Then open your browser to http://127.0.0.1:8000 to see all tools and test them interactively.

Option 2: MCP Inspector (Official Debugger)

Use Anthropic's official MCP Inspector:

npx @modelcontextprotocol/inspector uv run python main.py

This opens http://localhost:5173 in your browser, showing all tools, request/response logs, and allowing manual tool testing. No need to run uv run python main.py separately.

Option 3: HTTP API Debugging

Send JSON-RPC requests to the server:

Invoke-WebRequest -Uri http://localhost:8000/message `
    -Method POST `
    -ContentType "application/json" `
    -Body '{
        "jsonrpc": "2.0",
        "method": "tools/call",
        "params": {
            "name": "get_documentation_file",
            "arguments": {
                "file_path": "classes/class_characterbody2d.md"
            }
        },
        "id": 1
    }'

Or using curl:

curl -X POST http://localhost:8000/message `
     -H "Content-Type: application/json" `
     -d '{
           "jsonrpc": "2.0",
           "method": "tools/call",
           "params": { "name": "search_godot_docs", "arguments": { "query": "DisplayServer" } },
           "id": 1
         }'

Understanding Path Resolution

The DOCS_DIR = Path("docs").resolve() in the code is relative to the current working directory (CWD) when you run Python, not the script location.

Example

Assume your directory structure:

D:\Codes\16_MCP\           <-- 根目录
├── main.py                <-- 启动脚本
├── docs\                  <-- 文档目录
└── srcs\
    └── util\
        └── docs_utils.py  <-- 工具代码 (里面写了 Path("docs"))

Case A: Running from root directory

cd D:\Codes\16_MCP
python main.py
  • Current Working Directory: D:\Codes\16_MCP

Tools 2

get_documentation_treeGet a tree-style overview of the entire documentation structure
get_documentation_fileRetrieve the content of specific documentation files

Try it

What documentation is available for Godot?
Show me the documentation for CharacterBody2D
What tutorials are available for 2D game development?
Show me the first 2D game tutorial
What's the difference between Node2D and CharacterBody2D?

Frequently Asked Questions

What are the key features of Godot Documentation Server?

Direct access to official Godot Engine documentation. Retrieval of specific class and tutorial files. Tree-style overview of documentation structure. Local execution without Docker requirements.

What can I use Godot Documentation Server for?

Quickly looking up class methods and properties while coding in Godot. Getting step-by-step guidance from official tutorials within the chat interface. Comparing different Godot nodes and their functionalities. Navigating the complex Godot documentation hierarchy using natural language.

How do I install Godot Documentation Server?

Install Godot Documentation Server by running: git clone https://github.com/Nihilantropy/godot-mcp-docs.git && cd godot-mcp-docs && uv sync

What MCP clients work with Godot Documentation Server?

Godot Documentation Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Godot Documentation Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare