MM

multitheftauto/mta-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 4 forks 质量 54 趋势 22

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 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.

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 a return (for example, wrap in an immediately-invoked function and return 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 debugCompanion resource on the MTA server.
    • You might need to give user.* access to resource.debugCompanion.http in ACL in order for the MCP server to be able to access the companion resource.
  • If you changed the default hostname or API key, make sure to update the values in the project’s appsettings.json / appsettings.local.json so 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.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →