@extends('layouts.app') @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.
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.
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": {
"fivem": {
"url": "https://your-domain.com/fivem"
}
}
}
}@endverbatim
💡 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.
@php $groupedTools = collect($tools)->groupBy('category'); @endphp @foreach ($groupedTools as $category => $categoryTools){{ $tool['description'] }}
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.
@endforelseMCP Prompts are pre-built prompt templates for common tasks. Currently available: {{ count($prompts) }} prompts.
@forelse ($prompts as $index => $prompt){{ $prompt['description'] }}
No prompts configured.
@endforelseYou 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/:
@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
Format code with Laravel Pint:
vendor/bin/pint
Both Lua and JavaScript are fully supported across all tools and generators.
Contributions are welcome! Areas for expansion:
MIT License