MCP on My SAMP
MCP on My SAMP
범위: 로컬 서버 또는 사용자가 소유/허가한 서버. 공개 서버 자동화용 도구가 아닙니다.
무엇을 할 수 있나요?
MCP on My SAMP는 AI 에이전트가 반복 가능한 워크플로우로 게임 서버를 테스트할 수 있게 합니다:
open.mp 시작 / 중지 / 상태 확인;
헤드리스 RakClient 시작 / 중지 / 상태 확인;
클라이언트가 실제로
Spawned될 때까지 대기;허용된 슬래시 명령 전송;
클라이언트 출력 기록 읽기;
서버 응답이 클라이언트에 수신되었는지 검증;
Pawn gamemode 소스에서 명령 찾기;
allowlist 외부의 명령 거부.
플러드, 스팸, 지연 주입, 임의 RCON 또는 공개 서버 자동화는 제공하지 않습니다.
Related MCP server: Brainstorm
워크플로우
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| A유효한 왕복(round-trip) 증거:
command dikirim
→ server callback menerima command
→ gamemode mengirim response
→ client menerima response
→ MCP assertion berhasilSpawned만으로는 명령 성공의 증거가 아닙니다.
설치
1. Python 준비
Python 3.10 이상이 필요합니다.
2. 프로젝트 설치
저장소 루트에서 실행:
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. 검증
pytest -q예상 출력:
35 passedopen.mp 및 RakClient 바이너리는 라이브 테스트에만 필요합니다. Python 단위 테스트는 해당 바이너리 없이도 실행할 수 있습니다.
구성
템플릿에서 로컬 구성 파일 생성:
Windows
copy config.example.json local-server.jsonLinux / macOS
cp config.example.json local-server.json파일 내용:
{
"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
}executable 및 working_dir을 컴퓨터의 open.mp 위치에 맞게 변경하세요. local-server.json은 컴퓨터마다 경로가 다르므로 Git에 포함되지 않습니다.
MCP 서버 실행
서버만
mcp-gta-samp --config local-server.json헤드리스 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.pwnMCP 전송은 stdio를 사용합니다.
MCP 도구
도구 | 기능 |
| 서버를 시작하고 준비 상태를 기다립니다. |
| 서버 상태 및 PID를 확인합니다. |
| 서버를 종료합니다. |
| 헤드리스 RakClient를 시작합니다. |
| 클라이언트 상태를 확인합니다. |
| 클라이언트를 종료합니다. |
|
|
| 버퍼링된 클라이언트 출력을 가져옵니다. |
| 특정 출력이 클라이언트에 수신되었는지 확인합니다. |
| Pawn 소스의 명령을 표시합니다. |
| allowlist에 대해 명령을 검증합니다. |
마지막 두 도구는 --gamemode-source가 사용될 때 사용할 수 있습니다.
AI 에이전트용 워크플로우
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_stop에이전트를 위한 중요 지침:
공개 서버에 접근하지 마세요;
부팅, 조인 또는
Spawned를 명령 왕복으로 간주하지 마세요;실패 시 경계를 분류하세요: 부팅, 연결, 스폰, 대기열, 아웃바운드 패킷, 서버 콜백, 서버 응답, 클라이언트 파서 또는 MCP 어서션;
테스트 후 항상 프로세스를 중지하세요;
UDP 포트
7777이 다시 비어 있는지 확인하세요.
라이브 테스트 예시
테스트 gamemode는 다음 위치에 있습니다:
vendor/openmp/Server/gamemodes/mcp_test.pwn사용 가능한 명령:
/help
/statusPawn 소스를 변경한 경우 서버 폴더에서 .amx를 다시 컴파일하세요:
qawno\pawncc.exe -i.\qawno\include -o.\gamemodes\mcp_test .\gamemodes\mcp_test.pwn라이브 워크플로우:
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_stop헤드리스 RakClient는 프로토콜, 상태 및 명령을 증명합니다. 스크린샷을 생성하지 않습니다. 시각적 테스트에는 별도의 렌더링된 GTA 클라이언트가 필요합니다.
개발
테스트 실행:
pytest -qwheel 생성:
python -m pip wheel . --no-deps -w distwheel 설치:
python -m pip install dist/mcp_gta_samp-0.1.0-py3-none-any.whl핵심 구조:
mcp_gta_samp/ package Python dan MCP facade
tests/ unit, contract, dan bridge tests
config.example.json template konfigurasi
vendor/ binary dan fixture live test보안
이 MCP는 로컬/소유 서버로 사용을 제한합니다. 자격 증명, 프록시 풀, 개인 구성, 개인 로그 또는 테스트 서버 데이터를 공개 저장소에 포함하지 마세요.
인터넷에서 서버를 실행하는 경우 인증 및 네트워크 격리를 직접 추가하세요. 이 패키지는 공개 게임 제어 API로 설계되지 않았습니다.
라이선스
MIT 라이선스. LICENSE 참조.
링크
이슈: 문제 보고
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-