milkyway-codex-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # MilkyWay Codex MCP Server
2
+
3
+ An MCP (Model Context Protocol) server that provides AI assistants with accurate WoW 3.3.5a (WotLK) addon development reference data. Powered by the [MilkyWay Codex](https://milkyway-codex.vercel.app/) dataset.
4
+
5
+ ## Reference Data
6
+
7
+ | Category | Count | Description |
8
+ |----------|-------|-------------|
9
+ | API Functions | 2,137 | Lua API functions with signatures, parameters, returns, examples |
10
+ | Events | 558 | Game events with payload parameters |
11
+ | Widgets | 38 | UI widget types with methods, inheritance, script handlers |
12
+ | CVars | 449 | Console variables with defaults and descriptions |
13
+ | Data Types | 33 | Enums and flag types (anchorPoint, unitId, etc.) |
14
+ | Combat Log Events | 48 | Combat log sub-events with argument tables |
15
+ | Secure Templates | 14 | Secure frame templates with attributes |
16
+ | Categories | 100 | API function categories |
17
+
18
+ ## Setup
19
+
20
+ ### Using the MCP server
21
+
22
+ 1. **Add the server to your AI assistant.** Edit your MCP config file and add the `milkyway-codex` entry under `mcpServers`:
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "milkyway-codex": {
28
+ "command": "npx",
29
+ "args": ["-y", "milkyway-codex-mcp"]
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ The first time you use it, `npx` will download and run the package. No clone or install required.
36
+
37
+ **Config file locations:**
38
+
39
+ | Client | Config path |
40
+ |--------|-------------|
41
+ | Cursor | `~/.cursor/mcp.json` or project `.cursor/mcp.json` |
42
+ | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
43
+ | Rovo Dev | `~/.rovodev/mcp.json`; add `milkyway-codex` to `allowedMcpServers` in `~/.rovodev/config.yml` |
44
+
45
+ 2. **Restart your AI assistant** so it picks up the new MCP config.
46
+
47
+ ## Tools
48
+
49
+ ### `search`
50
+ Global search across all reference data (functions, events, widgets, CVars, data types, secure templates, combat log events). Supports filtering by type and category.
51
+
52
+ ### `get_function`
53
+ Get complete API function documentation: signature, parameters, return values, code examples, protection status, and related functions.
54
+
55
+ ### `get_event`
56
+ Get complete event documentation: description, payload parameters, category, and related events.
57
+
58
+ ### `get_widget`
59
+ Get complete widget type documentation: methods, inherited methods, script handlers, and inheritance chain.
60
+
61
+ ### `get_data_type`
62
+ Get data type documentation with all enumerated values.
63
+
64
+ ### `get_cvar`
65
+ Get console variable details. Supports partial name matching.
66
+
67
+ ### `get_combat_log_event`
68
+ Get combat log sub-event details, or call without arguments for a full system overview.
69
+
70
+ ### `get_secure_template`
71
+ Get secure frame template documentation with attributes and examples.
72
+
73
+ ### `list_categories`
74
+ List all API function categories with function counts.
75
+
76
+ ### `list_widgets`
77
+ List all UI widget types with brief descriptions.
78
+
79
+ ## Syncing Data
80
+
81
+ The MCP server ships with pre-built JSON data files in `src/data/`. If the codex source data is updated, regenerate them:
82
+
83
+ ```bash
84
+ npm run sync-data
85
+ ```
86
+
87
+ This reads from `milkyway-codex/src/data/*.ts` and writes JSON to `src/data/`.
88
+
89
+ ## Token Efficiency
90
+
91
+ The server is designed to minimize token usage in AI conversations:
92
+
93
+ - **Search before fetch** -- `search` returns brief summaries (name + truncated description) so the AI can identify the right entry before requesting full details with a `get_*` tool.
94
+ - **Scored ranking** -- Search results are ranked by relevance (exact match > prefix > contains > description match), putting the most useful results first and reducing follow-up queries.
95
+ - **Scoped lookups** -- Each `get_*` tool returns only the requested entry rather than dumping entire datasets. A `get_function` call returns one function's docs, not all 2,137.
96
+ - **Filtered search** -- Optional `type` and `category` filters narrow results server-side, avoiding large result sets the AI would need to sift through.
97
+ - **Compact listings** -- `list_categories` and `list_widgets` return brief one-line summaries, not full documentation for every entry.
98
+ - **Fuzzy suggestions** -- When a lookup misses, the server returns "did you mean?" suggestions so the AI can self-correct in one turn instead of re-searching.