MCP on My SAMP
It lets you manage the lifecycle of a local open.mp/SA-MP test server.
server_start: start the configured local open.mp server and wait until it is ready (idempotent).server_status: check whether the local server process is running and get its status (read-only).server_stop: stop the local open.mp server (destructive).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP on My SAMP Start the server and when it's ready, send /help and check the response."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP on My SAMP
Scope: local servers or servers you own/are authorized for. Not a tool for public-server automation.
What can it do?
MCP on My SAMP lets AI agents test game servers with repeatable workflows:
start / stop / check open.mp status;
start / stop / check headless RakClient status;
wait for the client to actually be
Spawned;send allowed slash commands;
read client output history;
verify the server response was received by the client;
discover commands from the Pawn gamemode source;
reject commands outside the allowlist.
It does not provide flood, spam, lag injection, arbitrary RCON, or automation of public servers.
Related MCP server: Brainstorm
Workflow
flowchart LR
A[AI Agent] -->|MCP stdio| B[MCP on My SAMP]
B --> C[open.mp Server]
B --> D[Headless RakClient]
D -->|UDP localhost| C
C -->|server response| D
D --> B
B -->|assertion| AValid round-trip proof:
command dikirim
→ server callback menerima command
→ gamemode mengirim response
→ client menerima response
→ MCP assertion berhasilSpawned alone is not proof a command succeeded.
Installation
1. Set up Python
Python 3.10 or newer is required.
2. Install the project
Run from the repository root:
Windows
py -3 -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install ".[dev]"Linux / macOS
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install ".[dev]"3. Verify
pytest -qExpected output:
35 passedThe open.mp and RakClient binaries are only needed for live tests. Python unit tests can still run without those binaries.
Configuration
Create a local config file from the template:
Windows
copy config.example.json local-server.jsonLinux / macOS
cp config.example.json local-server.jsonFill in the file:
{
"executable": "vendor/openmp/Server/omp-server.exe",
"working_dir": "vendor/openmp/Server",
"args": ["--config-path", "config.json"],
"ready_text": "Legacy Network started on port",
"startup_timeout": 30
}Change executable and working_dir to match the open.mp location on your machine. local-server.json is not committed to Git because paths differ per machine.
Running the MCP server
Server only
mcp-gta-samp --config local-server.jsonWith headless RakClient
Windows
mcp-gta-samp ^
--config local-server.json ^
--client-executable vendor/rakclient-bin/rakclient.exe ^
--client-arg --server ^
--client-arg 127.0.0.1:7777 ^
--client-arg --nick ^
--client-arg MCPBot ^
--client-arg --scripts-dir ^
--client-arg vendor/rakclient-bin/scripts ^
--gamemode-source vendor/openmp/Server/gamemodes/mcp_test.pwnLinux / macOS
mcp-gta-samp \
--config local-server.json \
--client-executable vendor/rakclient-bin/rakclient \
--client-arg --server \
--client-arg 127.0.0.1:7777 \
--client-arg --nick \
--client-arg MCPBot \
--client-arg --scripts-dir \
--client-arg vendor/rakclient-bin/scripts \
--gamemode-source vendor/openmp/Server/gamemodes/mcp_test.pwnThe MCP transport uses stdio.
MCP tools
Tool | Function |
| Starts the server and waits for readiness. |
| Checks server status and PID. |
| Stops the server. |
| Starts the headless RakClient. |
| Checks client status. |
| Stops the client. |
| Sends an allowed slash command after |
| Retrieves buffered client output. |
| Ensures specific output was received by the client. |
| Lists commands from the Pawn source. |
| Validates a command against the allowlist. |
The last two tools are available when --gamemode-source is used.
Workflow for AI agents
1. server_status
2. server_start jika belum berjalan
3. client_start
4. tunggu state Spawned
5. server_list_commands
6. server_assert_command("/help")
7. client_send_chat("/help")
8. client_assert_output("MCP Test Commands:")
9. client_get_history bila perlu diagnosis
10. client_stop
11. server_stopImportant instructions for the agent:
do not access public servers;
do not treat boot, join, or
Spawnedas a command round-trip;on failure, classify the boundary: boot, connection, spawn, queue, outbound packet, server callback, server response, client parser, or MCP assertion;
always stop processes after a test;
make sure UDP port
7777is free again.
Live test example
A test gamemode is available at:
vendor/openmp/Server/gamemodes/mcp_test.pwnAvailable commands:
/help
/statusIf the Pawn source is changed, recompile the .amx from the server folder:
qawno\pawncc.exe -i.\qawno\include -o.\gamemodes\mcp_test .\gamemodes\mcp_test.pwnLive workflow:
server_start
→ client_start
→ client mencapai Spawned
→ client_send_chat("/help")
→ client_assert_output("MCP Test Commands:")
→ client_assert_output("/status - show a test response")
→ client_stop
→ server_stopThe headless RakClient proves protocol, state, and commands. It does not produce screenshots. Visual testing requires a separate rendered GTA client.
Development
Running tests:
pytest -qBuilding a wheel:
python -m pip wheel . --no-deps -w distInstalling the wheel:
python -m pip install dist/mcp_gta_samp-0.1.0-py3-none-any.whlCore structure:
mcp_gta_samp/ package Python dan MCP facade
tests/ unit, contract, dan bridge tests
config.example.json template konfigurasi
vendor/ binary dan fixture live testSecurity
This MCP restricts usage to local/owned servers. Do not include credentials, proxy pools, private configs, private logs, or server test data in public repositories.
If you run a server from the internet, add your own authentication and network isolation. This package is not designed as a public game-control API.
License
MIT License. See LICENSE.
Links
Repository: marhenrik635-oss/mcponmysamp
Issues: report an issue
Available Tools
3 toolsserver_startAIdempotent
Start the configured local open.mp test server and wait for readiness.
Inputs: no named parameters. Returns: object
server_statusARead-only
Return local open.mp test server process status.
Inputs: no named parameters. Returns: object
server_stopADestructive
Stop the configured local open.mp test server.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a single, clear responsibility: start, stop, or check status. There is no overlap or ambiguity between them.
All tools follow the identical pattern of 'server_' followed by a simple verb (start, stop, status). This is perfectly consistent and predictable.
Three tools is exactly right for the narrow scope of managing a local server. Each tool is essential and earns its place without unnecessary bloat.
The tool set covers the core lifecycle (start, stop, status) but lacks a restart operation, which is a common need. However, agents can still accomplish restart via stop+start, so this is a minor gap.
Maintenance
Related MCP Connectors
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects AI agents to Minecraft servers via RCON to execute commands, monitor logs, and perform read-only SQLite database queries. It is specifically designed to facilitate AI-assisted plugin development, live debugging, and automated testing workflows.612MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to communicate, coordinate, and collaborate on complex tasks through a local MCP server.8Business Source 1.1
- FlicenseNot gradedqualityCmaintenanceTurns your local machine into an MCP server with a GUI, allowing agents to execute file operations, run commands (including admin), manage background processes, and query databases, with optional ngrok exposure.-
- FlicenseCqualityDmaintenanceAn MCP server that enables AI agents to execute terminal commands and Python code on the host system, leveraging Agent Zero's battle-tested implementation with session management and smart output handling.4-