Logo: Story MCP Hub

Story MCP Hub

Organisatioun
piplabs

An MCP server for the Story SDK and Storyscan Block Explorer

Editeurpiplabs
Repositorystory-mcp-hub
SproochPython
Forks
8
Stären
16
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Story MCP Hub bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 16, Forks: 8.

Story MCP Hub

This repository serves as a central hub for Story Protocol's Model Context Protocol (MCP) servers. It provides a unified environment for running and managing various MCP services that enable AI agents to interact with Story Protocol's ecosystem.

Project Structure

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 file

MCP Servers

StoryScan MCP Server

Provides tools for querying blockchain data, including address balances, transactions, and blockchain statistics.

Tools:

  • get_transactions: Get recent transactions for an address
  • get_stats: Get current blockchain statistics
  • get_address_overview: Get a comprehensive overview of an address including balance, token info, and blockchain activity
  • get_token_holdings: Get all ERC-20 token holdings for an address, including detailed token information and balances
  • get_nft_holdings: Get all NFT holdings for an address, including collection information and individual token metadata
  • interpret_transaction: Get a human-readable interpretation of a blockchain transaction

Story SDK MCP Server

Provides tools for interacting with Story Protocol's Python SDK.

Tools:

IPFS & Metadata Tools (requires PINATA_JWT):

  • upload_image_to_ipfs: Upload an image to IPFS using Pinata API and return the URI
  • create_ip_metadata: Create and upload both NFT and IP metadata to IPFS

License Management Tools:

  • get_license_terms: Retrieve license terms for a specific ID
  • get_license_minting_fee: Get the minting fee for a specific license terms ID
  • get_license_revenue_share: Get the commercial revenue share percentage for a specific license terms ID
  • mint_license_tokens: Mint license tokens for a given IP and license terms (auto-approves WIP tokens)
  • predict_minting_license_fee: Pre-compute the minting license fee for given IP, license terms and amount

IP Asset Management Tools:

  • register: Register an NFT as IP, creating a corresponding IP record
  • attach_license_terms: Attach license terms to an IP asset
  • mint_and_register_ip_with_terms: Mint and register an IP with terms

NFT Collection Tools:

  • create_spg_nft_collection: Create a new SPG NFT collection that can be used for minting and registering IP assets
  • get_spg_nft_minting_token: Get the minting fee required by an SPG NFT contract

Revenue & Royalty Tools:

  • pay_royalty_on_behalf: Pay royalties to a receiver IP asset on behalf of a payer IP asset (auto-approves tokens)
  • claim_all_revenue: Claim all revenue from child IPs of an ancestor IP with optional auto-transfer

Dispute Tools:

  • raise_dispute: Raise a dispute against an IP asset (auto-approves WIP bond tokens)

Token Management Tools:

  • deposit_wip: Wrap IP to WIP and deposit to wallet
  • transfer_wip: Transfer WIP tokens to a recipient
  • get_erc20_token_balance: Get the balance of any ERC20 token for an account
  • mint_test_erc20_tokens: Mint test ERC20 tokens if the contract has a public mint/faucet function

Setup

Prerequisites

  • Python 3.12+
  • UV package manager

Installation

  1. Install UV package manager and install env:
bash
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone this repository:
bash
git clone https://github.com/piplabs/story-mcp-hub.git
cd story-mcp-hub
  1. Install dependencies using UV:
bash
uv sync
  1. Set up environment variables for each server:

For StoryScan MCP:

bash
cd storyscan-mcp
cp .env.example .env
# Edit .env with your StoryScan API endpoint

For Story SDK MCP:

bash
cd story-sdk-mcp
cp .env.example .env
# Edit .env with your wallet private key, RPC provider URL, etc.

Running the Servers

StoryScan MCP Server Inspector

bash
cd storyscan-mcp
uv run mcp dev server.py

Story SDK MCP Server

bash
cd story-sdk-mcp
uv run mcp dev server.py

Using with MCP Clients

Follow the instructions below to connect the MCP servers to various MCP-compatible clients.

Cursor

Cursor implements an MCP client that supports an arbitrary number of MCP servers with both stdio and sse transports.

Adding MCP Servers in Cursor

  1. Go to Cursor Settings > Features > MCP
  2. Click on the + Add New MCP Server button
  3. Fill out the form:
    • Select the transport under Type
    • Enter a nickname for the server in the Name field
    • Enter either the command to run or the URL of the server, depending on the transport
    • We'll use the uv command to run the server, so make sure to include the --directory flag with the path to the server (Example: uv --directory ~/path/to/story-mcp-hub/storyscan-mcp run server.py)

Screenshot 2025-03-10 at 2 50 48 PM

Project-Specific MCP Configuration

You can configure project-specific MCP servers using .cursor/mcp.json. The file follows this format:

json
{
  "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"
      ]
    }
  }
}

Using MCP Tools in Cursor

The Composer Agent will automatically use any MCP tools that are listed under Available Tools on the MCP settings page if it determines them to be relevant. To prompt tool usage intentionally, simply tell the agent to use the tool, referring to it either by name or by description.

When the Agent wants to use an MCP tool, it will display a message asking for your approval.

Claude Desktop

Claude Desktop can be configured to use MCP servers by editing its configuration file.

Adding MCP Servers in Claude Desktop

  1. Open the Claude Desktop configuration file:
bash
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the MCP server configuration:
json
{
  "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"
      ]
    }
  }
}
  1. Save the file and restart Claude Desktop for the changes to take effect.

Screenshot 2025-03-10 at 2 57 24 PM

Example query: use storyscan to check balance of 0x95A13F457C76d10A40D7e8497eD4F40c53F4d04b

Development

To add a new MCP server to the hub:

  1. Create a new directory for your server
  2. Implement the MCP protocol in your server
  3. Add any necessary dependencies to the root pyproject.toml
  4. Update this README with information about your server

Testing

Running Tests

The project includes a test runner script (run_tests.py) that handles environment setup and test execution. To run tests:

  1. Install test dependencies:
bash
uv sync --extra test
  1. Run all tests:
bash
uv run python run_tests.py
  1. Run specific test categories:
bash
# Run unit tests only
uv run python run_tests.py -t tests/unit/

# Run integration tests only
uv run python run_tests.py -t tests/integration/

# Run with verbose output
uv run python run_tests.py -v
  1. Run individual test files:
bash
uv run python run_tests.py -t tests/unit/story_sdk_mcp/test_story_service.py
  1. Get help on available options:
bash
uv run python run_tests.py --help

Environment Setup for Testing

The tests use a .env.test file with mock credentials for testing. This file is automatically loaded by the test runner.

To set up your test environment:

  1. Copy the example file to create your own .env.test:
bash
cp .env.test.example .env.test
  1. Edit the .env.test file to include your test credentials:
bash
# For example, update the private key for blockchain interactions
nano .env.test  # or use your preferred text editor

For more detailed information about testing, see the testing guide.

Troubleshooting

If you encounter issues:

  1. Verify that environment variables are set correctly for each server
  2. Check network connectivity to external APIs (StoryScan, IPFS, etc.)
  3. Ensure you're using the correct Python version (3.12+)
  4. Check that all dependencies are installed with uv sync

License

MIT License

Installatioun

TypingMind
{
  "mcpServers": {
    "story-mcp-hub": {
      "command": "uv",
      "args": [
        "--directory",
        "path/to/your/storyscan-mcp",
        "run",
        "server.py"
      ]
    }
  }
}

Story MCP Hub MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Story MCP Hub verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Story MCP Hub als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir Story MCP Hub an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "story-mcp-hub": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun Story MCP Hub. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun Story MCP Hub.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat Story MCP Hub bei dëser Aufgab hëllefen?
Story MCP Hub
Jo. Ech hunn et gelies.
Dat hunn ech mat Story MCP Hub fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server Story MCP Hub benotzt?

Story MCP Hub ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Story MCP Hub MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Story MCP Hub mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat Story MCP Hub MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Story MCP Hub verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech Story MCP Hub MCP mat TypingMind?

Story MCP Hub leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Story MCP Hub MCP an TypingMind zur Verfügung?

Story MCP Hub stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Story MCP Hub MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Story MCP Hub eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇