Skip to main content
Glama
motchii709

dsh-modrinth-mcp

by motchii709

dsh-modrinth-mcp

DeepSeek Harness(DSH)から Modrinth API v2 をネイティブツールとして使えるようにする、依存ゼロの MCP サーバー(stdio)。

@deepseek-ai/dsh-mcp-client ブリッジで登録すると mcp__modrinth__* の9ツールが生えます。DSH 以外の MCP クライアント(Claude Code / Codex 等の汎用 mcpServers 設定)でもそのまま動きます。

特徴

  • 依存ゼロ — Node.js 標準機能のみ。newline-delimited JSON-RPC 2.0 を直実装しているので npm install 不要

  • レスポンス最適化 — Modrinth の生レスポンスは巨大(ウィキ HTML 本文・全バージョン配列・ギャラリー等)。全ツールでモデルに必要なフィールドだけにトリムし、search_projects の1ヒットは約500バイト程度に収まる

  • プロトコルの落とし穴を回避済み — Modrinth の配列クエリパラメータは JSON 配列形式が必須(?loaders=["fabric"])。カンマ区切り(?loaders=fabric)は 黙って無視され全件返る(実測)。本サーバーは常に正しい形式で送る

  • 429/5xx の単発リトライ内蔵(Retry-After尊重)、タイムアウト 30秒/リクエスト

  • 読み取りは認証不要(300 req/min)。MODRINTH_PAT を設定すればレート制限を緩和

Related MCP server: fabric-docs-mcp

ツール一覧(9)

ツール

機能

search_projects

検索。categories / gameVersions / projectType の各グループは AND 結合、グループ内は OR

get_project / get_projects

プロジェクト取得(単体 / バッチ50件)。ウィキ HTML 本文は includeBody 指定時のみ

get_project_versions

バージョン一覧(新着順・limit 上限・loaders / gameVersions 絞込)

get_version

単一バージョン(ダウンロード URL・sha1・依存関係)

get_dependencies

依存グラフ(解決済みプロジェクトの要約付き)

get_user / get_user_projects

ユーザープロフィール / 公開プロジェクト一覧

get_tags

facets 構築用の語彙(カテゴリ・ローダー・ゲームバージョン)

DSH へのインストール

git clone https://github.com/motchii709/dsh-modrinth-mcp

~/.dsh/profiles/web/cordis.patch.yml に追記(node のパス・サーバーのパスは環境に合わせて変更):

- insert:
    - id: mcp-modrinth
      name: '@deepseek-ai/dsh-mcp-client'
      config:
        serverName: modrinth
        transport: stdio
        command: node
        args:
          - 'C:\path\to\dsh-modrinth-mcp\modrinth-mcp.mjs'
        env:
          MODRINTH_PAT: !!js process.env.MODRINTH_PAT || ''
        failOnStartupError: false
        toolCallTimeoutMs: 60000

ホスト再起動(または HMR 反映)後、新規セッションで mcp__modrinth__search_projects 等が使えるようになります。

その他の MCP クライアント

{
  "mcpServers": {
    "modrinth": {
      "command": "node",
      "args": ["/path/to/dsh-modrinth-mcp/modrinth-mcp.mjs"]
    }
  }
}

開発

node test/server-test.mjs                    # JSON-RPC往復 + 実API呼び出しの回帰テスト
node test/server-test.mjs ./modrinth-mcp.mjs # サーバーファイルを明示指定する場合

テストは Modrinth 本番 API に実際にアクセスします(読み取りのみ・レート制限内)。

対応バージョン

  • Node.js 18+(global fetch 利用)

  • DSH 0.1.1-rc.2(web プロファイル、@deepseek-ai/dsh-mcp-client 同梱版)で動作確認

ライセンス

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A local MCP server for Nexus Mods mod discovery and research, backed by the v2 GraphQL API, enabling search of games, mods, collections, and users.
    79 npm
    1
    ISC
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to search, read, and publish Minecraft mods on Modrinth, including creating projects and uploading jar files as new versions.
    7
    42 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible clients to perform web searches through a self-hosted SearXNG instance, with support for configurable languages, categories, time ranges, and safe search settings.
    344 npm
    MIT