ストーリーMCPハブ
このリポジトリは、Story Protocol の Model Context Protocol (MCP) サーバーの中央ハブとして機能します。AI エージェントが Story Protocol のエコシステムとやり取りできるようにするさまざまな MCP サービスを実行および管理するための統合環境を提供します。
プロジェクト構造
story-mcp-hub/
├── storyscan-mcp/ # MCP server for blockchain data queries via StoryScan
├── story-sdk-mcp/ # MCP server for Story Protocol SDK interactions
├── utils/ # Shared utilities for MCP servers
├── .venv/ # Python virtual environment
├── pyproject.toml # Project dependencies and configuration
├── .python-version # Python version specification
└── README.md # This filegraph TD
subgraph "MCP Hub"
style MCP Hub fill:#F5F5FF,stroke:#9999CC,stroke-width:2px,rx:10,ry:10
Agent["AI Agent<br>(Claude, IDEs, Tools)"]
style Agent fill:#E6E6FA,stroke:#9370DB,stroke-width:2px,rx:8,ry:8
end
subgraph "StoryScan MCP Server"
style StoryScan MCP Server fill:#F0F8FF,stroke:#87CEFA,stroke-width:2px,rx:10,ry:10
StoryscanService["StoryScan Service"]
style StoryscanService fill:#E6E6FA,stroke:#9370DB,stroke-width:2px,rx:8,ry:8
subgraph "StoryScan Tools"
style StoryScan Tools fill:#F0FFFF,stroke:#5F9EA0,stroke-width:2px,rx:10,ry:10
StoryscanToolset["Balance & Stats<br>check_balance,<br>get_address_overview,<br>get_transactions,<br>interpret_transaction,<br>get_token_holdings,<br>get_nft_holdings,<br>get_stats"]
style StoryscanToolset fill:#E0FFFF,stroke:#5F9EA0,stroke-width:2px,rx:8,ry:8
end
end
subgraph "Story SDK MCP Server"
style Story SDK MCP Server fill:#F5FFFA,stroke:#98FB98,stroke-width:2px,rx:10,ry:10
StoryService["Story Service"]
style StoryService fill:#E6E6FA,stroke:#9370DB,stroke-width:2px,rx:8,ry:8
subgraph "Story SDK Tools"
style Story SDK Tools fill:#F0FFF0,stroke:#90EE90,stroke-width:2px,rx:10,ry:10
IPFSTools["IPFS Tools<br>upload_image_to_ipfs<br>create_ip_metadata"]
style IPFSTools fill:#E0FFFF,stroke:#5F9EA0,stroke-width:2px,rx:8,ry:8
IPTools["IP Management Tools<br>mint_and_register_ip_with_terms<br>get_license_terms,<br>mint_license_tokens,<br>send_ip,<br>create_spg_nft_collection"]
style IPTools fill:#E0FFFF,stroke:#5F9EA0,stroke-width:2px,rx:8,ry:8
end
end
subgraph "External Resources"
style External Resources fill:#FFF0F5,stroke:#FFB6C1,stroke-width:2px,rx:10,ry:10
IPFS[(IPFS/Pinata<br>Storage)]
style IPFS fill:#FFE4E1,stroke:#DB7093,stroke-width:2px,rx:15,ry:15
Blockchain[(Story Protocol<br>Blockchain)]
style Blockchain fill:#E0F8E0,stroke:#90EE90,stroke-width:2px,rx:15,ry:15
StoryScan[(StoryScan/Blockscout<br>API)]
style StoryScan fill:#E6F3FF,stroke:#87CEFA,stroke-width:2px,rx:15,ry:15
end
Agent <--MCP Protocol--> StoryService
Agent <--MCP Protocol--> StoryscanService
StoryscanService --> StoryscanToolset
StoryService --> IPFSTools
StoryService --> IPTools
StoryscanToolset <--API Calls--> StoryScan
IPFSTools <--API Calls--> IPFS
IPTools <--RPC Calls--> BlockchainRelated MCP server: Storybook MCP Server
MCP サーバー
StoryScan MCP サーバー
アドレス残高、トランザクション、ブロックチェーン統計などのブロックチェーン データを照会するためのツールを提供します。
ツール:
check_balance: アドレスの残高を確認するget_transactions: アドレスの最近のトランザクションを取得するget_stats: 現在のブロックチェーンの統計情報を取得するget_address_overview: 住所の包括的な概要を取得するget_token_holdings: アドレスのすべての ERC-20 トークン保有数を取得するget_nft_holdings: アドレスのすべてのNFT保有を取得するinterpret_transaction: トランザクションの人間が読める解釈を取得する
ストーリーSDK MCPサーバー
Story Protocol の Python SDK と対話するためのツールを提供します。
ツール:
get_license_terms: 特定のIDのライセンス条項を取得するmint_license_tokens: 特定の IP とライセンス条件の Mint ライセンス トークンsend_ip: ネイティブトークン転送を使用して指定されたアドレスにIPトークンを送信するupload_image_to_ipfs: IPFSにイメージをアップロードし、URIを返すcreate_ip_metadata: 特定の画像URIのNFTメタデータを作成するmint_and_register_ip_with_terms: 規約付きでIPを登録する
設定
前提条件
Python 3.12以上
UV パッケージ マネージャー
インストール
UV パッケージ マネージャーをインストールし、env をインストールします。
curl -LsSf https://astral.sh/uv/install.sh | shこのリポジトリをクローンします:
git clone https://github.com/piplabs/story-mcp-hub.git
cd story-mcp-hubUV を使用して依存関係をインストールします。
uv sync各サーバーの環境変数を設定します。
StoryScan MCPの場合:
cd storyscan-mcp
cp .env.example .env
# Edit .env with your StoryScan API endpointStory SDK MCP の場合:
cd story-sdk-mcp
cp .env.example .env
# Edit .env with your wallet private key, RPC provider URL, etc.サーバーの実行
StoryScan MCP サーバーインスペクター
cd storyscan-mcp
uv run mcp dev server.pyストーリーSDK MCPサーバー
cd story-sdk-mcp
uv run mcp dev server.pyMCPクライアントでの使用
MCP サーバーをさまざまな MCP 互換クライアントに接続するには、以下の手順に従います。
カーソル
Cursor は、 stdioとsseトランスポートの両方を備えた任意の数の MCP サーバーをサポートする MCP クライアントを実装します。
カーソルにMCPサーバーを追加する
Cursor Settings>Features>MCPに移動します+ Add New MCP Serverボタンをクリックします。フォームに記入してください:
Typeでトランスポートを選択しますNameフィールドにサーバーのニックネームを入力しますトランスポートに応じて、実行するコマンドまたはサーバーのURLを入力します。
サーバーを実行するには
uvコマンドを使用するので、サーバーへのパスに--directoryフラグを含めるようにしてください (例:uv --directory ~/path/to/story-mcp-hub/storyscan-mcp run server.py)
プロジェクト固有のMCP構成
.cursor/mcp.jsonを使用して、プロジェクト固有の MCP サーバーを設定できます。ファイルは次の形式に従います。
{
"mcpServers": {
"storyscan-mcp": {
"command": "uv",
"args": [
"--directory",
"~/path/to/story-mcp-hub/storyscan-mcp",
"run",
"server.py"
]
},
"story-sdk-mcp": {
"command": "uv",
"args": [
"--directory",
"~/path/to/story-mcp-hub/story-sdk-mcp",
"run",
"server.py"
]
}
}
}カーソルでのMCPツールの使用
Composer Agent は、MCP 設定ページの「 Available Toolsにリストされている MCP ツールが関連していると判断された場合、自動的に使用します。ツールの使用を意図的に促すには、ツール名または説明を指定して、エージェントにツールの使用を指示するだけです。
エージェントが MCP ツールを使用しようとすると、承認を求めるメッセージが表示されます。
クロードデスクトップ
Claude Desktop は、構成ファイルを編集することで MCP サーバーを使用するように構成できます。
Claude Desktop に MCP サーバーを追加する
Claude Desktop 構成ファイルを開きます。
code ~/Library/Application\ Support/Claude/claude_desktop_config.jsonMCP サーバー構成を追加します。
{
"mcpServers": {
"storyscan-mcp": {
"command": "uv",
"args": [
"--directory",
"~/path/to/story-mcp-hub/storyscan-mcp",
"run",
"server.py"
],
// Add environment variables for the server
"env": {
"STORY_API_KEY": "your_story_api_key_here",
"STORYSCAN_API_ENDPOINT": "your_story_api_endpoint_here"
}
},
"story-sdk-mcp": {
"command": "uv",
"args": [
"--directory",
"~/path/to/story-mcp-hub/story-sdk-mcp",
"run",
"server.py"
],
// Add environment variables for the server
"env": {
"WALLET_PRIVATE_KEY": "your_private_key_here",
"RPC_PROVIDER_URL": "your_rpc_provider_url_here",
"PINATA_JWT": "your_pinata_jwt_here"
}
}
}
}変更を有効にするには、ファイルを保存して Claude Desktop を再起動します。
クエリ例: use storyscan to check balance of 0x95A13F457C76d10A40D7e8497eD4F40c53F4d04b
発達
新しい MCP サーバーをハブに追加するには:
サーバーに新しいディレクトリを作成する
サーバーにMCPプロトコルを実装する
必要な依存関係をルート
pyproject.tomlに追加します。このREADMEをサーバの情報で更新してください
トラブルシューティング
問題が発生した場合:
各サーバーの環境変数が正しく設定されていることを確認します
外部 API (StoryScan、IPFS など) へのネットワーク接続を確認します
正しい Python バージョン (3.12 以上) を使用していることを確認してください
uv syncですべての依存関係がインストールされていることを確認します
ライセンス
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.