Skip to main content
Glama
MTA:SA Documentation MCP Server

MTA:SA Documentation MCP Server

MTA:SA ドキュメント MCP サーバー

AI アシスタントが Multi Theft Auto: San Andreas のドキュメントに信頼性の高い構造化された方法でアクセスできるようにする MCP (Model Context Protocol) サーバーです。

高速なキーワード検索、セマンティックマッチング、SQLite ベースのキャッシュを組み合わせることで、エージェントは手動で Wiki をスクレイピングすることなく、適切な API を発見し、信頼できるドキュメントを取得できます。

ハイライト

  • 発見、ドキュメント取得、キャッシュ操作、ワークフローガイダンスのための 11 個の MCP ツール

  • イベント優先の発見機能 (search_events, find_events_for_task)

  • SQLite ベクトル検索によるセマンティックタスクマッチング

  • スマートなキーワード展開 (例: database -> db* API)

  • 組み込みの非推奨検出と警告

  • 設定可能な有効期限を持つローカル SQLite キャッシュ

  • CI 検証ゲート、スモークテスト、リリース自動化

Related MCP server: Documentation Retrieval MCP Server (DOCRET)

インストール

要件:

  • Node.js 24+

  • Bun 1.3+ (オプションのランタイム)

  • pnpm 10+ (ローカル開発用)

ランチャーに関する注意:

  • npx、pnpx、bunx、または yarn dlx スタイルのフローで起動/インストールできます。

  • ランタイムサポートはクロスランタイムです: Node.js (node:sqlite 経由) および Bun (bun:sqlite 経由)。

npm から (推奨)

npm install -g mtasa-docs-mcp

または:

pnpm add -g mtasa-docs-mcp

クイックインストール

Add mtasa-docs MCP server to Cursor

ソースから

git clone https://github.com/Luminaire1337/mtasa-docs-mcp.git
cd mtasa-docs-mcp
pnpm install
pnpm build

環境でオプションのネイティブ依存関係がスキップされる場合は、以下を実行してください:

pnpm install --force

MCP クライアントの設定

Cursor (手動)

グローバル: ~/.cursor/mcp.json

プロジェクト: .cursor/mcp.json

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

VS Code (手動)

ワークスペース: .vscode/mcp.json

ユーザー: コマンドパレット -> MCP: Open User Configuration

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

またはターミナルから追加:

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

Claude Code (CLI)

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

OpenCode (手動)

グローバル設定ファイル: ~/.config/opencode/opencode.json

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

Antigravity (手動)

設定ファイル: ~/.gemini/antigravity/mcp_config.json

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

汎用 MCP クライアント (手動)

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

mtasa-docs-mcp がすでに公開されている場合は、コマンドを以下に置き換えてください:

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

利用可能なツール

  • 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

開発

pnpm build
pnpm test
pnpm test:runtime
pnpm smoke
pnpm smoke:cross-runtime
pnpm verify
pnpm verify:full

便利なチェック:

  • pnpm check:versions - package.json と MCP サーバーのバージョンを一致させる

  • pnpm check:changelog - CHANGELOG.md に現在のリリースの見出しがあることを確認する

  • pnpm check:tool-names - レガシーなツール命名への回帰を防ぐ

  • pnpm test:runtime - Node および Bun のスモークパスに対する統合ランタイムテストを実行する

  • pnpm smoke:cross-runtime - Node と Bun 両方のランタイムに対してスモークチェックを実行する

スクリプトは scripts/ にあります (ビルド、スモーク、リリースガード)。

リリースフロー

リリース自動化は .github/workflows/release.yml によって処理されます。

  1. package.json と src/index.ts のバージョンを上げる。

  2. CHANGELOG.md の Unreleased からバージョン付きセクションにリリースノートを移動する (## [x.y.z] - YYYY-MM-DD を使用)。

  3. リリースタグを作成してプッシュする: git tag v<version> && git push origin v<version>。

ブランチポリシー:

  • v1.0.0 より前: master への直接プッシュが許可されます。

  • v1.0.0 以降: master へのすべての変更には PR ベースの開発を使用します。

リリースタグのプッシュ (v*.*.*) 時、リリースワークフローは以下を行います:

  • npm にバージョンがすでに存在するかどうかを確認する

  • pnpm verify:full を実行する

  • 信頼された公開 (OIDC) を使用して provenance 付きで npm に公開する

  • GitHub OIDC を使用して MCP レジストリに server.json を公開する

  • CHANGELOG.md から GitHub リリースを作成/更新する

  • 公開されたパッケージのインストール可能性を検証し、スモークテストを実行する

npm 信頼された公開のためのメンテナー設定

npm パッケージ設定で、このリポジトリとワークフローの信頼されたパブリッシャーを設定します:

  • リポジトリ: Luminaire1337/mtasa-docs-mcp

  • ワークフローファイル: .github/workflows/release.yml

  • 環境 (使用する場合): GitHub Actions の設定と一致させる

MCP レジストリ公開のためのメンテナー設定

  • リポジトリルートに server.json が存在し、パッケージ名 mtasa-docs-mcp を使用していることを確認する

  • io.github.Luminaire1337/mtasa-docs-mcp の MCP レジストリ所有権を設定する

  • リリースワークフローは mcp-publisher login github-oidc を使用し、npm 公開ゲートを通過したときのみ公開する

CI ワークフロー

  • .github/workflows/ci.yml - master へのプッシュ/PR 時の検証 (Ubuntu + macOS) およびラベル付き PR でのオプションのライブ Wiki 統合テスト

  • .github/workflows/release.yml - リリースタグ (v*.*.*) 時の自動公開および GitHub リリース

プロジェクトドキュメント

  • AGENTS.md - アーキテクチャと貢献者向けガイダンス

  • FEATURES.md - ロードマップとアイデア

  • CHANGELOG.md - リリース履歴

  • SECURITY.md - 脆弱性開示ポリシー

ライセンス

GNU General Public License v3.0。LICENSE を参照してください。

Available Tools

11 tools
clear_cacheB

Clear the MTA:SA documentation cache for a specific function or all functions.

Inputs: function_name (required).

find_events_for_taskA

Task-to-events matcher. Use when you need event names for handlers/triggers (e.g., resource lifecycle, player joins, marker hits). Returns ranked MTA:SA events only.

Inputs: task_description (required), side, limit.

find_functions_for_taskA

Task-to-functions matcher. Use this FIRST when user intent is high-level (e.g., 'vehicle dealership', 'login panel'). Returns ranked MTA:SA functions/events optimized for follow-up documentation retrieval.

Inputs: task_description (required), limit.

get_cache_statsB

Get statistics about the MTA:SA documentation cache.

Inputs: no named parameters.

get_function_docsA

Fetch authoritative docs for exactly ONE MTA:SA function/event by canonical name. Preferred over manual web browsing. For multiple names, use get_multiple_function_docs in one call.

Inputs: function_name (required), use_cache, include_optional_arguments.

get_function_examplesA

Get only code examples for one function/event after docs lookup. Use when writing implementation snippets and tests.

Inputs: function_name (required).

get_multiple_function_docsA

Batch docs retrieval for implementation phase. Provide exact function/event names (ideally from search/find tools) and get combined authoritative docs in one response.

Inputs: function_names (required), include_examples, include_optional_arguments.

list_functions_by_categoryA

Enumerate canonical function/event names in a category. Useful for discovery when query terms are vague.

Inputs: category (required), limit.

recommend_doc_workflowA

Planner tool that tells LLMs exactly which mtasa-docs tools to call next for a given task. Use this to enforce MCP-first workflows and avoid manual wiki scraping.

Inputs: task_description (required), known_function_names.

search_eventsA

Event discovery tool. Search MTA:SA client/server events only (not regular functions), then chain into docs tools with exact event names.

Inputs: query (required), side, limit.

search_functionsA

Primary discovery tool. Search MTA:SA functions and events by name or keyword before coding. Returns canonical function names with side/category so LLMs can reliably chain into docs tools.

Inputs: query (required), side, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: search tools (search_functions, search_events) differ from task matchers (find_functions_for_task, find_events_for_task), retrieval tools handle single/batch/examples, and cache/listing/planner serve unique roles. No overlap or confusion.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., clear_cache, search_functions, get_function_docs). No mixing of cases or verb styles, making the pattern predictable and easy to navigate.

    Tool Count5/5

    With 11 tools, the server is well-scoped for its documentation purpose. Each tool earns its place, covering search, retrieval, cache management, category listing, and workflow planning without excess or deficiency.

    Completeness5/5

    The tool surface provides a complete workflow: discover (search/task matchers), retrieve (docs, examples, batch), manage (cache stats/clear), explore (category listing), and plan (workflow recommender). No obvious gaps for a documentation server.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers