SAMP-MCP
A comprehensive MCP server for SA-MP server development and management, enabling AI-assisted server administration, Pawn scripting, plugin management, and diagnostics.
README
<div align="center">
samp-mcp
A comprehensive MCP server for SA-MP server development and management
Manage, script, and audit SA-MP servers with AI assistance.
</div>
Installation
npm install -g samp-mcp
# or
yarn global add samp-mcp
Requires Node.js ≥ 18 and a functional SA-MP server directory.
Quick Start
1. Configure MCP Client
Add the following to your MCP client configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"samp-mcp": {
"command": "npx",
"args": ["-y", "samp-mcp"]
}
}
}
2. Connect to Project
Once initialized, tell the AI agent: "Connect to my SAMP server at C:\path\to\server"
3. Initialize AI Agent
Copy and paste this as your first prompt to the AI:
"SAMP Project. Read
SAMP_RULES.mdand follow encoding rules. Runset_server_rootto start."
Tool Categories
Server Management
| Command | Description |
|---|---|
set_server_root |
Initialize and track a SAMP project directory |
manage_server |
Start, Stop, or Restart the server process |
get_status |
View hostname, players, and map statistics |
rcon_command |
Execute RCON commands via AI |
Pawn Scripting
| Command | Description |
|---|---|
read_pawn_script |
Read source with encoding detection + line ranges |
write_pawn_script |
Write source with backup + partial line replacement |
search_pawn_script |
Search text across all .pwn/.inc files (efficient) |
fuzzy_find_file |
Find files by partial name when you forgot the path |
get_function_body |
Extract a single function body without reading whole file |
compile_pawn |
Compile .pwn scripts and get structured errors |
restore_pawn_script |
Restore a file from its latest backup (undo) |
fix_script_encoding |
Recover corrupted UTF-8 Thai scripts to Windows-874 |
generate_boilerplate |
Generate Commands, Dialogs, or Job templates |
inject_code |
Compile and test snippets without server restart |
Plugin & Include Management
| Command | Description |
|---|---|
search_plugin |
Search GitHub repos for SAMP plugins with release info |
install_plugin |
Install .dll/.so plugins — auto-extracts ZIP archives |
install_include |
Download and install .inc libraries from URL |
Web & Info
| Command | Description |
|---|---|
web_search |
Search the web via DuckDuckGo for SAMP-related info |
Auditing & Diagnostics
| Command | Description |
|---|---|
audit_script |
Scan for large arrays or hardcoded Dialog IDs |
audit_sql |
Detect SQL Injection risks (missing %e in mysql_format) |
audit_performance |
Identify fast timers or heavy OnPlayerUpdate logic |
find_shadowing |
Catch variable redefinitions (e.g., playerid) |
get_server_diagnostics |
Analyze logs for crashes and plugin failures |
Automation
| Command | Description |
|---|---|
generate_docs |
Generate markdown documentation for the project |
create_deployment |
Batch copy all necessary server files for distribution |
Meta
| Command | Description |
|---|---|
check_for_updates |
Check if a new version of SAMP-MCP is available on NPM |
update_mcp_server |
Perform a self-update of the server via NPM |
Features
- Thai Character Support — Native Windows-874 encoding with UTF-8 corruption recovery
- Safe Editing — Automatic backups + partial line range replacement (no truncation bugs)
- Efficient Search — Search across all scripts, fuzzy file find, extract single functions
- Plugin Auto-Install — GitHub release discovery with ZIP auto-extraction
- Web Search — DuckDuckGo integration for SAMP-related queries
- Caching — Project info cached for 5 minutes to reduce token usage
- AI-Powered — Designed for seamless integration with LLMs
License
MIT © Watcharapong Namsaeng
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.