Skip to content

Commit e91fef9

Browse files
TMHSDigitalclaude
andcommitted
docs: document all 10 MCP tools and configuration in mcp-server README (#46)
The MCP Server page listed 4 of the 10 tools, no parameters, and no configuration, and its data list omitted docs_index.json. - Tools table generated from server.py signatures with parameters and allowed values for all 10 tools. - Configuration table for the txAdmin, data-path and scaffold-root variables with defaults. - Data files list matches mcp-server/data/, plus where scaffolded files land and how to run the tests. Fixes #46 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f3b39d6 commit e91fef9

1 file changed

Lines changed: 30 additions & 10 deletions

File tree

‎mcp-server/README.md‎

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ A Model Context Protocol (MCP) server that provides AI-powered tools for FiveM a
44

55
## Tools
66

7-
| Tool | Description |
8-
|------|-------------|
9-
| `scaffold_resource_tool` | Create a new resource with boilerplate files |
10-
| `lookup_native_tool` | Search the native function database by name or description |
11-
| `generate_manifest_tool` | Generate a properly formatted fxmanifest.lua |
12-
| `search_events_tool` | Search the event reference database |
7+
| Tool | Parameters | Description |
8+
|------|------------|-------------|
9+
| `scaffold_resource_tool` | `name`, `game` (gta5, rdr3, both), `language` (lua, javascript, csharp), `framework` (standalone, esx, qbcore, qbox, oxcore, vorp, rsg), `workspace_path`?, `output_path`?, `overwrite`? (default false) | Create a resource with boilerplate files at `<output_path or workspace_path>/<name>`. Refuses to write into an existing non-empty directory unless `overwrite` is true. |
10+
| `lookup_native_tool` | `query`?, `game`? (gta5, rdr3; default gta5), `side`? (client, server, shared), `category`? (e.g. VEHICLE) | Search natives by name (any case, with or without underscores), hash, or description; browse categories. |
11+
| `generate_manifest_tool` | `name`, `game`, `language`, `framework`, `scripts`?, `dependencies`?, `has_nui`?, `workspace_path`? | Return `fxmanifest.lua` content; with `workspace_path`, scripts, author and NUI page are detected from the resource. |
12+
| `search_events_tool` | `query`?, `side`?, `game`? (gta5, rdr3), `framework`? (cfx, esx, qbcore, qbox, oxcore, vorp, rsg, baseevents, chat) | Search the event reference database. |
13+
| `detect_framework_tool` | `workspace_path`? (default `.`) | Detect ESX, QBCore, Qbox, ox_core, VORP, RSG, standalone, or a multi-framework bridge. |
14+
| `search_docs_tool` | `query`?, `section`? (scripting-manual, scripting-reference, game-references, server-manual, stock-resources, getting-started, developer-docs, support) | Search the offline docs.fivem.net index. |
15+
| `txadmin_server_control_tool` | `action` (start, stop, restart) | Control the FXServer through txAdmin. |
16+
| `txadmin_resource_control_tool` | `action` (start, stop, restart, ensure), `resource` | Control one resource through txAdmin. |
17+
| `txadmin_player_search_tool` | `search_value`?, `search_type`? (playerName, playerNotes, playerIds), `filters`? (isAdmin, isOnline, isWhitelisted, hasNote), `limit`? (default 25) | Search players known to the server. |
18+
| `txadmin_kick_player_tool` | `netid`, `reason`?, `mutex`? (default `current`) | Kick an online player by server id. |
19+
20+
`?` marks optional parameters.
1321

1422
## Setup
1523

@@ -27,28 +35,40 @@ pip install -r requirements.txt
2735

2836
### Run the server
2937

30-
The server is configured to run automatically via Cursor's MCP integration (see `.cursor/mcp.json`). To run it manually:
38+
The server runs automatically through your MCP client (see the MCP Server section of the main README for Cursor, Claude Code and generic stdio setup). To run it manually:
3139

3240
```bash
3341
python server.py
3442
```
3543

44+
It finds `data/` next to `server.py`, so it can be started from any working directory.
45+
46+
### Run the tests
47+
48+
```bash
49+
pip install -r requirements-dev.txt
50+
python -m pytest
51+
```
52+
3653
## Configuration
3754

3855
| Variable | Required | Default | Description |
3956
|----------|----------|---------|-------------|
4057
| `TXADMIN_URL` | No | `http://127.0.0.1:40120` | Base URL of the txAdmin panel |
4158
| `TXADMIN_USERNAME` | For txAdmin tools | - | Admin username used to log into the panel |
4259
| `TXADMIN_PASSWORD` | For txAdmin tools | - | Admin password |
60+
| `CFX_DATA_PATH` | No | `data/` next to `server.py` | Directory with the native, event and docs data. `CFX_NATIVES_PATH` is accepted as an alias. |
61+
| `CFX_SCAFFOLD_ROOT` | No | server working directory | Where `scaffold_resource_tool` creates resources when neither `output_path` nor `workspace_path` is given |
4362

4463
Set the txAdmin credentials in your OS or shell environment, never in a committed file such as `.cursor/mcp.json` (see `skills/txadmin-integration/SKILL.md`).
4564

4665
## Data files
4766

4867
The `data/` directory contains JSON databases:
4968

50-
- `natives_gta5.json` - GTA5 native function reference
51-
- `natives_rdr3.json` - RDR3 native function reference
69+
- `natives_gta5.json` - GTA5 native function reference (game natives plus the CFX platform natives that apply to GTA5)
70+
- `natives_rdr3.json` - RDR3 native function reference (game natives plus the CFX platform natives that apply to RDR3)
5271
- `events.json` - Common FiveM/RedM events
72+
- `docs_index.json` - Offline index of docs.fivem.net pages (title, URL, section, text snippet)
5373

54-
These are snapshots used for offline lookup. For the most current data, refer to the official native reference at https://docs.fivem.net/natives/.
74+
These are snapshots used for offline lookup, refreshed by the `update-natives.yml` and `update-docs-index.yml` workflows. For the most current data, refer to the official native reference at https://docs.fivem.net/natives/.

0 commit comments

Comments
 (0)