swarm-mcp

ethersphere/swarm-mcp

3.3

If you are the rightful owner of swarm-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Swarm MCP Server is a proof-of-concept implementation for connecting AI systems with decentralized storage using the Model Context Protocol and Ethereum Swarm's Bee API.

The Swarm MCP Server is designed to facilitate the integration of AI systems with decentralized storage solutions by implementing the Model Context Protocol (MCP). This server leverages Ethereum Swarm's Bee API to store and retrieve data, providing a decentralized and fault-tolerant storage option. The server supports standard MCP operations such as uploading and downloading text and files, making it a versatile tool for developers looking to integrate decentralized storage into their AI workflows. The server is configurable, allowing users to set custom Bee API endpoints and postage batch IDs, which are essential for interacting with the Swarm network. While this implementation is a proof-of-concept and not recommended for production use, it serves as a valuable resource for understanding how MCP can be used with decentralized storage technologies.

Features

  • Upload text data to Swarm through the MCP protocol
  • Download text data from Swarm through the MCP protocol
  • Standard MCP server interface using stdio transport
  • Configurable Bee API endpoints and postage batch IDs

Usages

usage with local stdio

python
mcp.run(transport='stdio')  # Tools defined via @mcp.tool() decorator

usage with ide plugin

{
  "mcpServers": {
    "swarm": {
      "command": "node",
      "args": ["src/server.js"]
    }
  }
}

usage with remote sse

python
mcp.run(transport='sse', host="0.0.0.0", port=8000)  # Specify SSE endpoint

usage with remote streamable http

yaml
paths:
  /mcp:
    post:
      x-ms-agentic-protocol: mcp-streamable-1.0  # Copilot Studio integration

usage with fastmcp

python
from mcp.server import FastMCP
app = FastMCP('swarm')
@app.tool()
async def upload_text(): ...

Tools

  1. upload_text

    Uploads text data to the Swarm network.

  2. download_text

    Retrieves text data from the Swarm network.

  3. upload_file

    Uploads a file to the Swarm network.

  4. upload_folder

    Uploads a folder to the Swarm network.

  5. download_folder

    Downloads folder, files, or binary data from a Swarm reference.