Skip to main content
Glama
rsutana

rocks-db

by rsutana

セットアップガイド: Fullscale Rocks MCPサーバー

本ガイドでは、fullscale-rocksデータベース用のMCPサーバーをインストール、設定、起動する方法を説明します。

1. インストール

まだインストールしていない場合は、依存関係をインストールしてください:

cd rocks-mcp
npm install

Related MCP server: DB MCP Server

2. 設定

サーバーにはデータベースの認証情報とOAuth公開鍵が必要です。

データベース設定

rocks-mcp/.envを作成または編集します:

MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_DATABASE=employee
MYSQL_USER=employee
MYSQL_PASSWORD=thisisapassword

PG_HOST=127.0.0.1
PG_PORT=5432
PG_DATABASE=employee
PG_USER=employee
PG_PASSWORD=thisisapassword

SSE_PORT=3001

認証

サーバーは自動的に以下の場所にあるOAuth公開鍵を探します: /home/ryscript/fullscale-rocks/rocks-api/storage/oauth-public.key

このファイルはrocks-apiからのJWTトークンを検証するために使用されるため、必ず存在することを確認してください。

3. サーバーの実行

開発モード

tsxを使用してサーバーを実行します(ファイル変更時にリロードされます):

npm run dev

本番モード

TypeScriptコードをビルドし、ビルドされたバージョンを起動します:

npm run build
npm start

4. AIアプリケーションへの接続

Claude Desktop

claude_desktop_config.jsonに以下を追加します:

{
  "mcpServers": {
    "rocks-db": {
      "command": "node",
      "args": ["/home/ryscript/fullscale-rocks/rocks-mcp/build/index.js"]
    }
  }
}

汎用MCPクライアント (SSE)

サーバーは、リモートまたはWebベースのクライアント向けにServer-Sent Events (SSE) もサポートしています。

  • SSE URL: http://localhost:3001/sse

  • Post Message URL: http://localhost:3001/message

これはMCP Inspectorやその他のSSE互換クライアントで使用できます。

5. ツールリファレンス

サーバーは以下のツールを提供します:

ツール

目的

要件

execute_read

SELECTクエリの実行

auth_token, db_type

execute_write

INSERT/UPDATE/DELETEの実行

auth_token (管理者のみ), db_type

list_tables

全テーブルの一覧表示

auth_token, db_type

describe_table

テーブルの列を表示

auth_token, db_type, table_name


注意: auth_tokenは、rocks-apiのログインプロセスで取得した有効なBearerトークンである必要があります。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables secure interaction with MySQL databases through SQL queries, supporting read-only operations without approval and write operations with user confirmation.
    6 npm
    ISC
  • A
    license
    A
    quality
    D
    maintenance
    Enables executing SQL queries, schema introspection, and data management for PostgreSQL and MySQL databases via natural language, supporting local, SSH, and AWS RDS connections.
    8
    145 npm
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables read-only exploration and querying of PostgreSQL or MySQL databases via MCP, with schema discovery, safe SQL validation, natural language to SQL conversion, and CSV export.
    11
    1
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables secure SQL query execution on MySQL databases with authentication and permission control, allowing users to explore database tables and run read-only queries.
    -