
Multi Theft Auto MCP server
概览
This repositories contains the source for MCP server(s?) intended to augment AI tooling use for creating resources / scripts for MTA San Andreas. These are the tools that the MCP server exposes: - GetFunctionList(side) lists MTA scripting functions grouped by category (Server, Client, Shared). - GetFunctionInformation(functionName) returns description, syntax, parameters and example for a wiki function. - GetEventList(side) lists scripting events for Server or Client sides. - GetEventParameters(eventName) returns parameters and source information for a specific event. - GetPedModels() returns bundled GTA:SA ped model IDs and names. - GetVehicleModels() returns bundled GTA:SA vehicle model IDs and names. - SearchWiki(query) searches the MTA Wiki and returns matching pages usable with the other tools. - GetPageSource(functionName) returns raw HTML source for a wiki page. The easiest way to use the MCP is by adding the MTA-hosted version of the MCP to your mcp.
README
以下为原文 README 节选,完整内容请查看原文。
Project Overview
This repositories contains the source for MCP server(s?) intended to augment AI tooling use for creating resources / scripts for MTA San Andreas.
MCPs and tools
These are the tools that the MCP server exposes:
Wiki MCP
GetFunctionList(side)
lists MTA scripting functions grouped by category (Server,Client,Shared).GetFunctionInformation(functionName)
returns description, syntax, parameters and example for a wiki function.GetEventList(side)
lists scripting events forServerorClientsides.GetEventParameters(eventName)
returns parameters and source information for a specific event.GetPedModels()
returns bundled GTA:SA ped model IDs and names.GetVehicleModels()
returns bundled GTA:SA vehicle model IDs and names.SearchWiki(query)
searches the MTA Wiki and returns matching pages usable with the other tools.GetPageSource(functionName)
returns raw HTML source for a wiki page.
Usage
The easiest way to use the MCP is by adding the MTA-hosted version of the MCP to your mcp.json (or your IDE’s equivalent)
"MTA Wiki MCP": {
"url": "https://mcp.multitheftauto.com/wiki",
"type": "http"
}
Debug companion MCP
The Debug Companion MCP exposes tools to run Lua on a running MTA server, control resources, and fetch recent server logs.
Available tools:
RunCode(string code)
Runs arbitrary Lua code on the server and returns the result. For multi-statement results return a value via areturn(for example, wrap in an immediately-invoked function andreturn toJSON(...)).RestartResource(string name)
Restarts the specified resource.StartResource(string name)
Starts the specified resource.StopResource(string name)
Stops the specified resource.GetLogs()
Retrieves the latest ~100 lines of debug logs.
Usage
- Run the
debugCompanionresource on the MTA server.- You might need to give
user.*access toresource.debugCompanion.httpin ACL in order for the MCP server to be able to access the companion resource.
- You might need to give
- If you changed the default hostname or API key, make sure to update the values in the project’s
appsettings.json/appsettings.local.jsonso the MCP can communicate with the server. - Run the MCP locally (the HTTP MCP exposes the service on the local host).
- Add the MCP to your
mcp.json(or IDE equivalent) pointing at the local URL (default local port used by the HTTP host is 5277):
"Mta Debug Companion MCP": {
"url": "http://localhost:5277",
"type": "http"
}
Once added you can invoke the Debug Companion tools from your agent to run code, manage resources, and fetch logs.
You can use this to let the agent iterate independently, changing code, applying it, and verifying the changes work as intended.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →