@extends('layouts.app') @section('title', 'Full Documentation - FiveM MCP Server') @section('content')

FiveM Development MCP Server

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.

Installation & Connection

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.

Claude Desktop Configuration:

Edit your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %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

VSCode Configuration (Cline Extension):

If using VSCode with the Cline extension, edit your settings:

  • Open VSCode Settings (JSON)
  • Add to your global or workspace settings.json
@verbatim{
        "mcp": {
            "servers": {
                "fivem": {
                    "url": "https://your-domain.com/fivem"
                }
            }
        }
    }@endverbatim

💡 Tip: After configuring Claude Desktop, completely quit and restart the application for changes to take effect.

Available Tools

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 @foreach ($groupedTools as $category => $categoryTools)

{{ $category }} Tools ({{ count($categoryTools) }})

@foreach ($categoryTools as $index => $tool)

{{ $tool['name'] }}

{{ $tool['description'] }}

@endforeach
@endforeach

Available Resources

MCP Resources provide read-only reference documentation that AI assistants can access. Currently available: {{ count($resources) }} resources.

@forelse ($resources as $index => $resource)

{{ $index + 1 }}. {{ $resource['name'] }}

{{ $resource['description'] }}

@empty

No resources configured.

@endforelse

Available Prompts

MCP Prompts are pre-built prompt templates for common tasks. Currently available: {{ count($prompts) }} prompts.

@forelse ($prompts as $index => $prompt)

{{ $index + 1 }}. {{ $prompt['name'] }}

{{ $prompt['description'] }}

@empty

No prompts configured.

@endforelse

Testing the Server

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.

Development

Adding New Tools

1. Create a new tool class in app/Mcp/Tools/:

@verbatim<?php

    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;

    #[Description('Your tool description')]
    class YourTool extends Tool
    {
        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

2. Register the tool in app/Mcp/Servers/FiveMServer.php:

@verbatimprotected array $tools = [
        // ... existing tools
        \App\Mcp\Tools\YourTool::class,
    ];@endverbatim

Code Formatting

Format code with Laravel Pint:

vendor/bin/pint

Supported Frameworks

  • Standalone: Basic FiveM resources without framework dependencies
  • ESX: ESX Framework (es_extended)
  • QBCore: QBCore Framework (qb-core / qbx_core)
  • Prodigy Studios (prp-bridge): Unified bridge supporting QBox, QB-Core, ESX, and ND Core with events, exports, UniQueue, groups, allowlists, sell shops, cases, and ped interactions

Scripting Languages

Both Lua and JavaScript are fully supported across all tools and generators.

Resources

Contributing

Contributions are welcome! Areas for expansion:

  • More native functions in the database
  • Additional framework support (vRP, etc.)
  • More event types
  • Advanced code generators
  • Database query builders

License

MIT License

@endsection