Content
# Tool List
For Cocos Creator 3.8.8 + exia-framework to provide AI knowledge base query services.
The index files (`index/`) and `.d.ts` files (`dts/`) have been pre-built and submitted to the repository, and can be used directly after cloning.
---
## Directory
- [Tool List](#tool-list)
- [Directory](#directory)
- [Quick Installation](#quick-installation)
- [Configure AI Editor](#configure-ai-editor)
- [Claude Code](#claude-code)
- [Cursor](#cursor)
- [Available Tools](#available-tools)
- [Synchronize Index after Framework Update (for Framework Maintainers)](#synchronize-index-after-framework-update-for-framework-maintainers)
- [Build Index for the First Time](#build-index-for-the-first-time)
- [Project Structure Description](#project-structure-description)
---
## Quick Installation
> Requirements: Node.js >= 22
```bash
git clone <repository address> ~/exia/exia-framework-mcp
cd ~/exia/exia-framework-mcp
npm install
```
No need to start after installation. The AI editor will automatically start the MCP Server when needed.
---
## Configure AI Editor
### Claude Code
Add the following to `.claude/settings.json` (or global `~/.claude/settings.json`) in the game project directory:
```json
{
"mcpServers": {
"game-knowledge": {
"command": "node",
"args": ["/your actual clone path/exia-framework-mcp/src/server.js"]
}
}
}
```
Restart Claude Code after configuration and run `/mcp` command to confirm `game-knowledge` status is connected.
### Cursor
Add the following to `.cursor/mcp.json` in the game project root directory:
```json
{
"mcpServers": {
"game-knowledge": {
"command": "node",
"args": ["/your actual clone path/bit-framework-mcp/src/server.js"]
}
}
}
```
---
## Available Tools
After MCP Server starts, AI can directly call the following tools to query API:
| Tool | Description | Example |
| ------------ | ---------------------------------- | ------------------------------------ |
| `search_api` | Semantic search (supports Chinese-English mutual search) | `search_api("delayed execution")` |
| `get_module` | Query all classes/interfaces in a module | `get_module("bit-ui")` |
| `get_class` | Query a class's complete properties and methods | `get_class("Window")` |
| `get_method` | Query a specific method signature | `get_method("Window", "onShow")` |
**`search_api` supported source parameters:**
- `all` (default): Search both framework and Cocos engine API
- `framework`: Search only bit-framework module
- `cocos`: Search only Cocos Creator 3.8.8 API
---
## Synchronize Index after Framework Update (for Framework Maintainers)
1. Install cross-env:
```bash
npm install --save-dev cross-env
```
> Normal members do not need to perform this step. Just `git pull` to pull the latest index and restart the editor.
```bash
# 1. Manually copy the changed module .d.ts (e.g., exia-ccui)
cp /path/to/exia-framework/exia-ccui.d.ts dts/framework/exia-ccui.d.ts
# 2. Rebuild index (need to download vector model ~120MB for the first run, stored in models/)
npm run sync
# 3. Commit and push (no need to submit models/, already in .gitignore)
git add dts/ index/
git commit -m "chore: Synchronize framework index vX.X.X"
git push
```
If the network times out when downloading the model, `npm run sync` has enabled `hf-mirror.com` mirror by default, or you can specify it manually:
```bash
HF_ENDPOINT=https://hf-mirror.com npm run sync
```
---
## Build Index for the First Time
The repository already contains pre-built indexes. The following steps are only needed when **completely rebuilding**.
```bash
# 1. Put Cocos 3.8.8 type definitions
cp /path/to/cc.d.ts dts/cocos/cc.d.ts
# 2. Put framework .d.ts (one file per module)
cp /path/to/exia-ccui.d.ts dts/framework/exia-ccui.d.ts
cp /path/to/exia-data.d.ts dts/framework/exia-data.d.ts
# ... other modules similarly
# 3. Build index (Cocos classes are numerous, vectorization takes a few minutes)
npm run sync
# 4. Commit
git add dts/ index/
git commit -m "feat: Initialize framework index"
git push
```
---
## Project Structure Description
```bash
exia-framework-mcp/
├── src/
│ ├── server.js # MCP Server entry, defines 4 query tools
│ ├── searcher.js # Index query logic (keyword + vector semantic search)
│ └── build-index.js # Index build script (parse .d.ts → JSON + vector)
├── dts/
│ ├── framework/ # exia-framework module .d.ts (pre-set)
│ └── cocos/ # cc.d.ts (Cocos 3.8.8, pre-set)
├── index/ # Build product (pre-set, do not modify manually)
│ ├── framework.json # Framework class index
│ ├── framework-vectors.json # Framework semantic vector
│ ├── cocos.json # Cocos class index
│ └── cocos-vectors.json # Cocos semantic vector
├── models/ # Vector model cache (.gitignore, locally generated automatically)
└── package.json
```
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.