Aurora 4x MCP Server
Read-only MCP server that lets Claude query your Aurora 4x campaign database for colonies, fleets, minerals, and more, with support for registering custom queries.
README
Aurora 4x MCP Server
A read-only MCP (Model Context Protocol) server that lets Claude query your Aurora 4x campaign database directly. Claude can look up colonies, fleets, minerals, commanders, ordnance, and more — and can register, edit, and promote new queries against your live DB without restarting.
AI/LLM DISCLAIMER: This tool was generated with the assistance of claude code by a user who has a solid grasp on the game. This tool is built specificially to query the DB, and nothing else. If you write to the DB you may cause unintended consquence and will not be able to receive support by the larger community.
Prerequisites
- Python 3.10 or later
- Aurora 4x installed with at least one active campaign saved
- Claude Code or Claude Desktop
Installation
1. Place the server files
Copy the server directory somewhere permanent. These docs assume:
D:\Aurora\aurora-mcp\
server.py
queries.json
pyproject.toml
Adjust all paths below if you use a different location.
2. Install the Python dependency
Open a terminal and run:
pip install "mcp>=1.0.0"
Or install from the project directory using the included pyproject.toml:
cd D:\Aurora\aurora-mcp
pip install -e .
3. Locate your Aurora database
Aurora 4x always stores its database in its own install folder. The file you need is AuroraDB.db, sitting directly inside the Aurora directory — the same folder that contains Aurora.exe.
D:\Aurora\AuroraDB.db ← example; your install path may differ
You must set AURORA_DB_PATH to this file's full path in the config below. There is no default that will work out of the box.
Getting started
Once the server is connected, start a new Claude Code session and say:
Please verify my current game and give me a description of the available tools.
Claude will call get_session_context to confirm the right campaign is loaded, then summarize what each tool does. From there you can ask natural-language questions about your empire — minerals, colonies, fleets, commanders, ordnance — and Claude will pick the right tools automatically.
Connecting to Claude Code
This is the step most people find tricky. You need to edit Claude Code's MCP configuration file manually.
Find the config file
Open a terminal and run:
notepad "$env:APPDATA\Claude\claude_code_config.json"
If the file doesn't exist yet, create it.
Add the MCP server entry
Paste the following into the JSON, replacing the paths with your actual paths:
{
"mcpServers": {
"aurora4x": {
"command": "python",
"args": [
"D:/Aurora/aurora-mcp/server.py"
],
"env": {
"AURORA_DB_PATH": "D:/Aurora/AuroraDB.db",
"AURORA_MAX_ROWS": "200"
}
}
}
}
Path format: Use forward slashes (
/) even on Windows, or double backslashes (\\). Single backslashes will cause a JSON parse error.
If you already have other MCP servers in your config, add the
"aurora4x"block inside the existing"mcpServers"object — don't create a second one.
Restart Claude Code
Close and reopen Claude Code. The aurora4x MCP server will appear in the tool list on the next session start.
Verify the connection
In a new Claude Code session, ask:
Call
get_session_contextto confirm the right campaign is loaded.
Claude should return your GameID, GameName, RaceID, and RaceName. If it does, you're good to go.
Environment variables
| Variable | Default | Description |
|---|---|---|
AURORA_DB_PATH |
Aurora.db next to server.py |
Full path to AuroraDB.db |
AURORA_MAX_ROWS |
200 |
Maximum rows returned per query |
Available tools
Ad-hoc query
| Tool | Description |
|---|---|
execute_sql |
Run any read-only SQL directly. :game_id and :race_id are automatically available as bind parameters. Results capped at AURORA_MAX_ROWS. Use this for exploration and one-off queries before registering them. |
Introspection
| Tool | Description |
|---|---|
get_session_context |
Returns the GameID and RaceID resolved for this session — call first to confirm the right campaign is active |
list_queries |
Lists all registered queries with verified status, params, and description |
list_safe_tables |
Shows the known-good table schema from queries.json |
list_all_tables |
Lists every table in the Aurora database |
describe_table |
Returns column names, types, and primary key flags for a specific table |
Query registry
| Tool | Description |
|---|---|
register_query |
Saves a new query to queries.json as DRAFT_<name>. Available immediately — no restart needed. |
update_query |
Overwrites an existing query's SQL, params, or description. Resets verified to false. Live immediately. |
delete_query |
Removes a query from queries.json by name. Live immediately. |
promote_query |
Marks a DRAFT_ query as verified and renames it by stripping the DRAFT_ prefix. Live immediately. |
Jump network
| Tool | Description |
|---|---|
systems_near |
Returns all systems within N jump hops of a source system using Dijkstra traversal. Use this first for "what's near X" queries, then join the returned system IDs against mineral or colony data. Params: source_system_id, max_hops (default 8). |
refresh_jump_network |
Invalidates the cached jump network. Call after survey vessels discover new jump points so the next routing call re-fetches from the DB. |
Registered queries
Queries are stored in queries.json and loaded on every request — no restart needed after changes.
| Query | Params | Description |
|---|---|---|
get_session_context |
— | Active game and race info |
game_log |
days, hours |
Recent game log entries, looking back N days or hours |
mineral_survey |
— | Body-level mineral survey — every surveyed body with amount, accessibility, and accessible amount |
mineral_survey_by_system |
mineral_name |
Minerals summarised by system; filter by mineral name or leave empty for all |
minerals_near_system |
source_system_id, max_hops, mineral_name |
Mineral totals for all systems within N hops of a given system |
colony_report |
— | Full colony report: population, species, stockpiles, installations, and production queues |
commander_assignment |
name_fragment |
Commander details by name fragment — type, rank, assignment, homeworld, and career history |
commander_profile |
name_fragment |
Full RP/lore profile — skills, traits, medals, career history, health, loyalty |
ship_design_report |
— | Full ship design report — propulsion, armour, sensors, capacity, EW, component manifest, and capture provenance |
ship_class_classifications |
— | Quick hull classification lookup — class name, type (BB/CA/DD etc), military vs commercial |
class_ordnance_templates |
class_name |
Ordnance load-out templates per class with full missile stats and colony stock |
missile_catalogue |
missile_name |
Complete missile catalogue — speed, range, warhead, ECM/ECCM, staging, and total stock |
colony_ordnance_stockpiles |
missile_name |
Missile stockpiles held at colonies — stock count, size, and key combat stats |
ship_ordnance_status |
— | Per-ship ordnance status — loaded vs template vs deficit, with ship location and collier flag |
system_distances |
source_system_id, destination_system_id, fleet_name |
Shortest route between two systems with hop-by-hop distance and per-class fuel cost |
Query lifecycle
The server reloads queries.json on every request, so all registry changes take effect immediately.
execute_sql ← explore with ad-hoc SQL
↓
register_query ← save a promising query as DRAFT_<name>
↓
update_query ← fix SQL or params as needed
↓
promote_query ← once verified, strip DRAFT_ and mark verified=true
↓
delete_query ← remove broken or superseded drafts
Important: save before querying
Aurora 4x holds an exclusive write lock on AuroraDB.db while the game is running. The server connects read-only and will return:
Aurora database is locked. Save the game first.
Troubleshooting
Server doesn't appear in Claude Code
- Confirm
pythonresolves in your PATH: runpython --versionin a terminal. - Confirm the path to
server.pyinargsis correct and uses forward slashes or\\. - Check Claude Code's MCP logs (Developer → MCP Servers) for startup errors.
"No active campaign found"
- The server finds the campaign via
MAX(GameID) WHERE GameName != 'Sample'. Make sure you have a real saved game, not just the built-in sample campaign.
"No player race found"
- The server looks for
MIN(RaceID)withNPR = 0. If that doesn't match your setup, inspectFCT_Racewithdescribe_tableandexecute_sql.
Wrong campaign loaded
- The server picks the highest
GameID. If you have multiple campaigns, the most recently created one wins. Verify withget_session_context.
A DRAFT query returns wrong column names
- Use
describe_tableon the relevant table to check exact column names, then fix the query withupdate_query.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。