diff --git a/README.md b/README.md index 7795038..c474081 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A comprehensive Model Context Protocol (MCP) server for FiveM (GTA5) development The FiveM MCP Server enables seamless integration with AI coding assistants (Claude, ChatGPT, etc.) to provide: - **Native function lookups** with client/server separation - **Event documentation** for all frameworks -- **Framework support** for Standalone, ESX, QBCore, and COX +- **Framework support** for Standalone, ESX, QBCore, COX, and Prodigy Scripts (prp-bridge) - **Resource generation** with customizable boilerplate - **Documentation search** across FiveM, QBCore, and COX MySQL - **Code snippets and best practices** for common patterns @@ -81,32 +81,45 @@ Configure in your AI client settings: ## Tools -The MCP server includes 15 powerful tools organized by framework and execution side: +The MCP server includes 30 powerful tools organized by framework and execution side: -### FiveM Core (5 tools) +### FiveM Core (7 tools) - **SearchFiveMDocs** - Search FiveM, QBCore, and COX documentation - **GetNativeClientFunction** - Look up client-side native functions (10 natives) - **GetNativeServerFunction** - Look up server-side native functions (12 natives) - **GetEventClientReference** - Client-side event reference (5 events) - **GetEventServerReference** - Server-side event reference (4+ events) +- **GenerateManifest** - Generate fxmanifest.lua with framework support +- **GenerateResourceBoilerplate** - Complete resource scaffolding -### QBCore Framework (4 tools) +### QBCore Framework (9 tools) - **GetQBCoreServerFunction** - QBCore server functions (13+ functions) - **GetQBCoreClientFunction** - QBCore client functions (6 functions) - **GetQBCoreServerEventReference** - QBCore server events (6 events) - **GetQBCoreClientEventReference** - QBCore client events (6 events) +- **GetQBCoreConfig** - QBCore configuration reference +- **GetQBCorePlayers** - Player management functions +- **GetQBCoreResourceList** - Available QBCore resources +- **GetQBCoreResourceReference** - Resource-specific documentation +- **GetQBCoreSharedData** - Shared data (jobs, items, vehicles) -### COX MySQL (2 tools) +### COX / ox_libs (10 tools) - **GetCOXFunction** - OxMySQL database functions (8 functions) - **GetCOXEventReference** - COX-specific events +- **GetInventoryServerFunction** - ox_inventory server functions (21 functions) +- **GetInventoryClientFunction** - ox_inventory client functions (8 functions) +- **GetOxDoorlockClientFunction** - ox_doorlock client API +- **GetOxDoorlockServerFunction** - ox_doorlock server API +- **GetOxDoorlockServerEvent** - ox_doorlock server events +- **GetOxFuelClientFunction** - ox_fuel client API +- **GetOxFuelServerFunction** - ox_fuel server API +- **GetOxTargetClientFunction** - ox_target client API -### ox_inventory (2 tools) -- **GetInventoryServerFunction** - Server-side inventory management (21 functions) -- **GetInventoryClientFunction** - Client-side inventory functions (8 functions) - -### Resource Generation (2 tools) -- **GenerateManifest** - Generate fxmanifest.lua with framework support -- **GenerateResourceBoilerplate** - Complete resource scaffolding +### Prodigy Scripts / prp-bridge (4 tools) +- **GetProdigyClientEventReference** - prp-bridge client-side events (11 events across notifications, callbacks, allowlist, medical) +- **GetProdigyServerEventReference** - prp-bridge server-side events (8 events across framework, groups, medical, UniQueue) +- **GetProdigyClientExport** - prp-bridge client exports (allowlist, prop placer, ped interactions) +- **GetProdigyServerExport** - prp-bridge server exports (24 exports: cooldowns, allowlist, groups, UniQueue, sell shops, cases) ## Project Structure @@ -114,12 +127,22 @@ The MCP server includes 15 powerful tools organized by framework and execution s app/Mcp/ ├── Tools/ │ ├── COX/ +│ │ ├── Doorlock/ +│ │ │ ├── Client/GetOxDoorlockClientFunction.php +│ │ │ └── Server/ +│ │ │ ├── GetOxDoorlockServerFunction.php +│ │ │ └── GetOxDoorlockServerEvent.php +│ │ ├── Fuel/ +│ │ │ ├── Client/GetOxFuelClientFunction.php +│ │ │ └── Server/GetOxFuelServerFunction.php +│ │ ├── Inventory/ +│ │ │ ├── Server/GetInventoryServerFunction.php +│ │ │ └── Client/GetInventoryClientFunction.php │ │ ├── MySQL/ │ │ │ ├── GetCOXFunction.php │ │ │ └── GetCOXEventReference.php -│ │ └── Inventory/ -│ │ ├── Server/GetInventoryServerFunction.php -│ │ └── Client/GetInventoryClientFunction.php +│ │ └── Target/ +│ │ └── Client/GetOxTargetClientFunction.php │ ├── FiveM/ │ │ ├── Client/ │ │ │ ├── GetNativeClientFunction.php @@ -130,13 +153,25 @@ app/Mcp/ │ │ ├── GenerateManifest.php │ │ ├── GenerateResourceBoilerplate.php │ │ └── SearchFiveMDocs.php +│ ├── Prodigy/ +│ │ ├── Client/ +│ │ │ ├── GetProdigyClientEventReference.php +│ │ │ └── GetProdigyClientExport.php +│ │ └── Server/ +│ │ ├── GetProdigyServerEventReference.php +│ │ └── GetProdigyServerExport.php │ └── QBCore/ +│ ├── Client/ +│ │ ├── GetQBCoreClientFunction.php +│ │ └── GetQBCoreClientEventReference.php │ ├── Server/ │ │ ├── GetQBCoreServerFunction.php │ │ └── GetQBCoreServerEventReference.php -│ └── Client/ -│ ├── GetQBCoreClientFunction.php -│ └── GetQBCoreClientEventReference.php +│ ├── GetQBCoreConfig.php +│ ├── GetQBCorePlayers.php +│ ├── GetQBCoreResourceList.php +│ ├── GetQBCoreResourceReference.php +│ └── GetQBCoreSharedData.php ├── Resources/ │ ├── CodeSnippets.php │ ├── BestPractices.php @@ -186,7 +221,7 @@ php artisan test tests/Feature/GetNativeClientFunctionToolTest.php php artisan test --coverage ``` -**Current Test Status:** 82 tests passing ✅ +**Current Test Status:** 181 tests passing ✅ ## Code Quality @@ -206,6 +241,7 @@ vendor/bin/pint --test - [FiveM Natives Reference](https://docs.fivem.net/natives/) - [QBCore Documentation](https://docs.qbcore.org/) - [COX MySQL Documentation](https://coxdocs.dev/) +- [Prodigy Scripts Documentation](https://docs.prodigyrp.net/) - [Laravel MCP Documentation](https://laravel.com/docs/mcp) - [Model Context Protocol](https://modelcontextprotocol.io/) diff --git a/resources/views/docs/documentation.blade.php b/resources/views/docs/documentation.blade.php index 9b0e53a..7279814 100644 --- a/resources/views/docs/documentation.blade.php +++ b/resources/views/docs/documentation.blade.php @@ -3,364 +3,368 @@ @section('title', 'Full Documentation - FiveM MCP Server') @section('content') -
- A comprehensive Model Context Protocol (MCP) server for FiveM (GTA5) development, built with Laravel MCP. - This server provides AI assistants with powerful tools to help you develop FiveM resources more efficiently. -
++ A comprehensive Model Context Protocol (MCP) server for FiveM (GTA5) development, built with Laravel MCP. + This server provides AI assistants with powerful tools to help you develop FiveM resources more efficiently. +
- -Choose how you want to connect to the FiveM MCP server:
+ +Choose how you want to connect to the FiveM MCP server:
- -- Easy setup! Connect to a hosted MCP server. This is the easiest option and - works from anywhere without any local setup. -
+ ++ Easy setup! Connect to a hosted MCP server. This is the easiest option and + works from anywhere without any local setup. +
-Edit your configuration file:
-~/Library/Application Support/Claude/claude_desktop_config.json
- %APPDATA%\Claude\claude_desktop_config.json
- Edit your configuration file:
+~/Library/Application Support/Claude/claude_desktop_config.json
+ %APPDATA%\Claude\claude_desktop_config.json
+ Add this configuration (replace with your - actual - server URL):
-@verbatim{
- "mcpServers": {
- "fivem": {
- "url": "https://your-domain.com/fivem"
- }
- }
-}@endverbatim
- If using VSCode with the Cline extension, edit - your - settings:
-settings.json
- @verbatim{
- "mcp": {
- "servers": {
+ Add this configuration (replace with your
+ actual
+ server URL):
+ @verbatim{
+ "mcpServers": {
"fivem": {
"url": "https://your-domain.com/fivem"
}
}
- }
-}@endverbatim
- - 💡 Tip: After configuring Claude Desktop, completely quit and restart the - application - for - changes to take effect. +
+ 💡 Tip: After configuring Claude Desktop, completely quit and restart the + application + for + changes to take effect. +
++ The FiveM MCP Server provides {{ count($tools) }} tools organized by category. + These tools allow AI assistants to search documentation, generate code, and lookup framework functions.
-- The FiveM MCP Server provides {{ count($tools) }} tools organized by category. - These tools allow AI assistants to search documentation, generate code, and lookup framework functions. -
+ @php + $groupedTools = collect($tools)->groupBy('category'); + @endphp - @php - $groupedTools = collect($tools)->groupBy('category'); - @endphp + @foreach ($groupedTools as $category => $categoryTools) +{{ $tool['description'] }}
+{{ $tool['description'] }}
-+ MCP Resources provide read-only reference documentation that AI assistants can access. + Currently available: {{ count($resources) }} resources. +
- -- MCP Resources provide read-only reference documentation that AI assistants can access. - Currently available: {{ count($resources) }} resources. -
+ @forelse ($resources as $index => $resource) +{{ $resource['description'] }}
+No resources configured.
+ @endforelse +{{ $resource['description'] }}
-No resources configured.
- @endforelse -+ MCP Prompts are pre-built prompt templates for common tasks. + Currently available: {{ count($prompts) }} prompts. +
- -- MCP Prompts are pre-built prompt templates for common tasks. - Currently available: {{ count($prompts) }} prompts. -
+ @forelse ($prompts as $index => $prompt) +{{ $prompt['description'] }}
+No prompts configured.
+ @endforelse +{{ $prompt['description'] }}
-No prompts configured.
- @endforelse -You can test the MCP server locally using the inspector: +
+php artisan mcp:inspector fivem
+ This will open the MCP Inspector in your browser + where + you + can test all the tools interactively.
+You can test the MCP server locally using the inspector: -
-php artisan mcp:inspector fivem
- This will open the MCP Inspector in your browser - where - you - can test all the tools interactively.
-1. Create a new tool class in app/Mcp/Tools/:
+
1. Create a new tool class in app/Mcp/Tools/:
-
@verbatim<?php
- @verbatim<?php
+ namespace App\Mcp\Tools;
-namespace App\Mcp\Tools;
+ use Illuminate\Contracts\JsonSchema\JsonSchema;
+ use Laravel\Mcp\Request;
+ use Laravel\Mcp\Response;
+ use Laravel\Mcp\Server\Attributes\Description;
+ use Laravel\Mcp\Server\Tool;
-use Illuminate\Contracts\JsonSchema\JsonSchema;
-use Laravel\Mcp\Request;
-use Laravel\Mcp\Response;
-use Laravel\Mcp\Server\Attributes\Description;
-use Laravel\Mcp\Server\Tool;
-
-#[Description('Your tool description')]
-class YourTool extends Tool
-{
- public function handle(Request $request): Response
+ #[Description('Your tool description')]
+ class YourTool extends Tool
{
- // Tool logic here
- return Response::text('Result');
+ public function handle(Request $request): Response
+ {
+ // Tool logic here
+ return Response::text('Result');
+ }
+
+ public function schema(JsonSchema $schema): array
+ {
+ return [
+ 'param' => $schema->string()->required(),
+ ];
+ }
}
+ @endverbatim
- public function schema(JsonSchema $schema): array
- {
- return [
- 'param' => $schema->string()->required(),
- ];
- }
-}
-@endverbatim
+ 2. Register the tool in app/Mcp/Servers/FiveMServer.php:
+
2. Register the tool in app/Mcp/Servers/FiveMServer.php:
-
@verbatimprotected array $tools = [
+ // ... existing tools
+ \App\Mcp\Tools\YourTool::class,
+ ];@endverbatim
- @verbatimprotected array $tools = [
- // ... existing tools
- \App\Mcp\Tools\YourTool::class,
-];@endverbatim
+ Format code with Laravel Pint:
+vendor/bin/pint
+ Format code with Laravel Pint:
-vendor/bin/pint
- Both Lua and JavaScript are fully supported across all tools and + generators.
+Both Lua and JavaScript are fully supported across all tools and - generators.
-Contributions are welcome! Areas for expansion:
+Contributions are welcome! Areas for expansion:
-MIT License
-MIT License
+- A comprehensive Model Context Protocol server for FiveM development with 5 tools, 3 resources, and 5 - prompts. -
-+ Search FiveM documentation by topic and category. Get direct links to relevant + documentation. +
+- Search FiveM documentation by topic and category. Get direct links to relevant - documentation. + + +
+ Look up GTA5/FiveM native functions with signatures, parameters, and code examples. +
++ Generate fxmanifest.lua files automatically for any framework and scripting language. +
++ Complete database of FiveM events including core, QBCore, and Prodigy Studios (prp-bridge) + events with examples. +
++ Generate complete resource structures with client, server, config, and optional NUI files. +
++ Full support for Standalone, ESX, QBCore, and Prodigy Studios (prp-bridge) in both Lua and + JavaScript. +
++ Set up the MCP server in just 5 minutes with our quick start guide.
+- Look up GTA5/FiveM native functions with signatures, parameters, and code examples. + +
+ To connect to the FiveM MCP server, use the following configuration in your MCP client:
+{
+ "servers": {
+ "fivem": {
+ "url": "{{ route('fivem') }}",
+ "type": "http"
+ }
+ }
+ }
- Generate fxmanifest.lua files automatically for any framework and scripting language. -
-- Complete database of FiveM events including core, ESX, and QBCore events with examples. -
-- Generate complete resource structures with client, server, config, and optional NUI files. -
-- Full support for Standalone, ESX, and QBCore frameworks in both Lua and JavaScript. -
-- Set up the MCP server in just 5 minutes with our quick start guide. -
- -- To connect to the FiveM MCP server, use the following configuration in your MCP client: -
-{
- "servers": {
- "fivem": {
- "url": "{{ route('fivem') }}",
- "type": "http"
- }
- }
-}
-