Content
# Godot Documentation MCP Server
A Model Context Protocol (MCP) server that provides queryable access to Godot Engine documentation.
## Features
- **Full-text search** across 1066+ Godot classes using SQLite FTS5
- **8 powerful tools** for querying classes, methods, properties, signals, and inheritance
- **Fast queries** with indexed database (~50-100MB)
- **Zero deployment dependencies** - single SQLite file
## Installation
```bash
cd C:\GodotProjects\godot-docs-mcp
pip install -e .
```
## Build Documentation Database
```bash
git -C C:\GodotProjects\godot-docs switch stable
git -C C:\GodotProjects\godot-docs pull --ff-only
python scripts/build_index.py C:\GodotProjects\godot-docs --version 4.7
```
This will parse the Godot 4.7 stable RST files and create `src/data/godot_docs.db`,
which is the database loaded by the MCP server.
## Usage with OpenCode
Add to your OpenCode configuration:
```json
{
"mcpServers": {
"godot-docs": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "C:\\GodotProjects\\godot-docs-mcp"
}
}
}
```
## Available Tools
1. `search_class` - Search for classes by name or description
2. `get_class_docs` - Get full documentation for a class
3. `get_method_docs` - Get documentation for a specific method
4. `search_methods` - Search methods across all classes
5. `list_class_members` - List all members of a class
6. `get_inheritance_tree` - Get inheritance hierarchy
7. `search_by_return_type` - Find methods by return type
8. `search_guides` - Search tutorial documentation
## Example Queries
```python
# Search for Node class
search_class(query="Node")
# Get all methods of Control class
list_class_members(class_name="Control", member_type="methods")
# Find methods that return Vector2
search_by_return_type(return_type="Vector2")
# Get inheritance tree for CanvasItem
get_inheritance_tree(class_name="CanvasItem", direction="both")
```
## Architecture
- **Database**: SQLite with FTS5 full-text search
- **Parser**: Regex-based RST parser for Godot class documentation
- **Server**: Python MCP server using official SDK
- **Schema**: Normalized tables for classes, methods, properties, signals, enums
## License
MIT