MTA:SA Documentation MCP Server

io.github.Luminaire1337由 GitHub 账号 Luminaire1337 发布v1.0.3更新于 Oct 24, 2026

MCP server for MTA:SA documentation with intelligent search and caching

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

本地 MCP 服务器,为助手提供 Multi Theft Auto: San Andreas 函数与事件文档的结构化检索与缓存访问。

可以做什么
  • 按关键词搜索函数与事件,并支持关键词智能扩展
  • 用语义匹配找出适合某项任务的函数或事件
  • 获取单个或多个函数的完整文档及代码示例
  • 按分类列出函数,并提示已弃用的 API
  • 查看或清空本地 SQLite 文档缓存,并获取文档工作流建议
适用场景
适合在编写或调试 MTA:SA Lua 脚本时使用,让助手直接查询权威的函数与事件文档,而不必手动抓取 wiki。
运行要求
以 stdio 方式在本机运行;需要 Node.js 24+(Bun 1.3+ 可选)。通过 npm 包 mtasa-docs-mcp 安装,通常用 npx 启动。未声明需要账号、API 密钥或环境变量。抓取文档填充缓存需要网络访问。
安装前请注意
clear_cache 工具会删除本地文档缓存,之后需重新抓取。文档来自外部 wiki,请求会离开本机。不要求任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MTA:SA Documentation MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

MTA:SA Documentation MCP Server

An MCP (Model Context Protocol) server that gives AI assistants reliable, structured access to Multi Theft Auto: San Andreas documentation.

It combines fast keyword search, semantic matching, and SQLite-backed caching so agents can discover the right APIs and fetch authoritative docs without manual wiki scraping.

Highlights

  • 11 MCP tools for discovery, docs retrieval, cache operations, and workflow guidance
  • Event-first discovery (search_events, find_events_for_task)
  • Semantic task matching with SQLite vector search
  • Smart keyword expansion (for example, database -> db* APIs)
  • Built-in deprecation detection and warnings
  • Local SQLite cache with configurable lifetime
  • CI verification gates, smoke tests, and release automation

Installation

Requirements:

  • Node.js 24+
  • Bun 1.3+ (optional runtime)
  • pnpm 10+ (for local development)

Launcher note:

  • You can launch/install via npx, pnpx, bunx, or yarn dlx-style flows.
  • Runtime support is cross-runtime: Node.js (via node:sqlite) and Bun (via bun:sqlite).

From npm (recommended)

bash
npm install -g mtasa-docs-mcp

or:

bash
pnpm add -g mtasa-docs-mcp

Quick install

[Add mtasa-docs MCP server to Cursor]

From source

bash
git clone https://github.com/Luminaire1337/mtasa-docs-mcp.gitcd mtasa-docs-mcppnpm installpnpm build

If your environment skips optional native dependencies, run:

bash
pnpm install --force

MCP Client Setup

Cursor (manual)

Global: ~/.cursor/mcp.json

Project: .cursor/mcp.json

json
{  "mcpServers": {    "mtasa-docs": {      "command": "npx",      "args": ["-y", "mtasa-docs-mcp"]    }  }}

VS Code (manual)

Workspace: .vscode/mcp.json

User: Command Palette -> MCP: Open User Configuration

json
{  "servers": {    "mtasa-docs": {      "command": "npx",      "args": ["-y", "mtasa-docs-mcp"]    }  }}

Or add it from terminal:

bash
code --add-mcp "{\"name\":\"mtasa-docs\",\"command\":\"npx\",\"args\":[\"-y\",\"mtasa-docs-mcp\"]}"

Claude Code (CLI)

bash
claude mcp add-json mtasa-docs '{"type":"stdio","command":"npx","args":["-y","mtasa-docs-mcp"]}'

OpenCode (manual)

Global config file: ~/.config/opencode/opencode.json

json
{  "$schema": "https://opencode.ai/config.json",  "mcp": {    "mtasa-docs": {      "type": "local",      "command": ["npx", "-y", "mtasa-docs-mcp"],      "enabled": true    }  }}

Antigravity (manual)

Config file: ~/.gemini/antigravity/mcp_config.json

json
{  "mcpServers": {    "mtasa-docs": {      "command": "npx",      "args": ["-y", "mtasa-docs-mcp"]    }  }}

Generic MCP clients (manual)

json
{  "mcpServers": {    "mtasa-docs": {      "command": "node",      "args": ["/absolute/path/to/mtasa-docs-mcp/build/index.js"]    }  }}

If mtasa-docs-mcp is already published, replace the command with:

json
{  "mcpServers": {    "mtasa-docs": {      "command": "npx",      "args": ["-y", "mtasa-docs-mcp"]    }  }}

Available Tools

  • search_functions
  • search_events
  • find_functions_for_task
  • find_events_for_task
  • get_function_docs
  • get_multiple_function_docs
  • get_function_examples
  • list_functions_by_category
  • get_cache_stats
  • recommend_doc_workflow
  • clear_cache

Development

bash
pnpm buildpnpm testpnpm test:runtimepnpm smokepnpm smoke:cross-runtimepnpm verifypnpm verify:full

Useful checks:

  • pnpm check:versions - keep package.json and MCP server version aligned
  • pnpm check:changelog - ensure CHANGELOG.md has current release heading
  • pnpm check:tool-names - prevent legacy tool naming regressions
  • pnpm test:runtime - run integration runtime tests for Node and Bun smoke paths
  • pnpm smoke:cross-runtime - run smoke checks against both Node and Bun runtimes

Scripts are located in scripts/ (build, smoke, release guards).

Release Flow

Release automation is handled by .github/workflows/release.yml.

  1. Bump version in package.json and src/index.ts.
  2. Move release notes from Unreleased into a versioned section in CHANGELOG.md using ## [x.y.z] - YYYY-MM-DD.
  3. Create and push a release tag: git tag v<version> && git push origin v<version>.

Branching policy:

  • Before v1.0.0: direct pushes to master are allowed.
  • Starting at v1.0.0: use PR-based development for all changes to master.

On release tag pushes (v*.*.*), the release workflow:

  • checks whether the version already exists on npm
  • runs pnpm verify:full
  • publishes to npm with provenance using trusted publishing (OIDC)
  • publishes server.json to the MCP Registry using GitHub OIDC
  • creates/updates the GitHub Release from CHANGELOG.md
  • verifies installability of the published package and runs smoke tests

Maintainer setup for npm trusted publishing

In npm package settings, configure a trusted publisher for this repository and workflow:

  • Repository: Luminaire1337/mtasa-docs-mcp
  • Workflow file: .github/workflows/release.yml
  • Environment (if used): match your GitHub Actions configuration

Maintainer setup for MCP Registry publishing

  • Ensure server.json exists at repository root and uses this package name: mtasa-docs-mcp
  • Configure MCP Registry ownership for io.github.Luminaire1337/mtasa-docs-mcp
  • Release workflow uses mcp-publisher login github-oidc and publishes only when the npm publish gate passes

CI Workflows

  • .github/workflows/ci.yml - verification on push/PR to master (Ubuntu + macOS) and optional live wiki integration tests on labeled PRs
  • .github/workflows/release.yml - automated publish and GitHub release on release tags (v*.*.*)

Project Docs

  • AGENTS.md - architecture and contributor guidance
  • FEATURES.md - roadmap and ideas
  • CHANGELOG.md - release history
  • SECURITY.md - vulnerability disclosure policy

License

GNU General Public License v3.0. See LICENSE.

来源:README.md,提交 2360dcf

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分