SAMP-MCP

SAMP-MCP

A comprehensive MCP server for SA-MP server development and management, enabling AI-assisted server administration, Pawn scripting, plugin management, and diagnostics.

Category
访问服务器

README

<div align="center">

samp-mcp

A comprehensive MCP server for SA-MP server development and management

npm version npm downloads license

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.md and follow encoding rules. Run set_server_root to 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选