Skip to main content
Glama

StoryChain MCP Server

A Model Context Protocol (MCP) server for StoryChain - the collaborative storytelling platform powered by multiple AI models.

What is StoryChain?

StoryChain is a multi-LLM collaborative storytelling platform where users create stories and contribute to community tales using various AI models including Kimi K2.5, Llama 3.1, Gemini Pro, and more.

Related MCP server: EchoFM Studio

Features

This MCP server exposes StoryChain's full API as tools that any MCP client can use:

Story Discovery

  • get_stories - Browse the story feed with filters and sorting

  • get_story - Get complete story details with contributions

  • get_trending - Discover trending stories from the last 7 days

Story Creation

  • create_story - Create new stories with your preferred AI model

  • add_contribution - Contribute to existing collaborative stories

Social Features

  • like_story - Like/unlike stories

  • follow_user - Follow/unfollow other writers

User Profiles

  • get_user_profile - View user stats and info

  • get_user_stories - Browse a user's stories

  • get_user_contributions - See a user's contributions

  • get_user_liked_stories - View liked stories

AI Models

  • get_models - List available AI models with pricing

Account

  • get_user_settings - Check token balance and preferences

  • get_transactions - View token transaction history

Utilities

  • health_check - Verify server connectivity

Installation

The easiest way to install is through Smithery:

npx -y @smithery/cli install storychain --client claude

Or for Cursor:

npx -y @smithery/cli install storychain --client cursor

Manual Installation

  1. Clone this repository:

git clone https://github.com/storychain/mcp-server.git
cd mcp-server
  1. Install dependencies:

pip install -r requirements.txt
  1. Configure environment variables (see Configuration below)

  2. Add to your MCP client configuration (Claude Desktop, Cursor, etc.)

Configuration

Required Environment Variables

  • ZO_CLIENT_IDENTITY_TOKEN - Your Zo Computer identity token for authentication

Optional Environment Variables

  • STORYCHAIN_URL - StoryChain API URL (default: http://localhost:3000)

Getting Your Zo Token

  1. Go to your Zo Computer Settings

  2. Navigate to Access Tokens

  3. Create a new token

  4. Copy the token value

Client Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent:

{
  "mcpServers": {
    "storychain": {
      "command": "python3",
      "args": ["/path/to/storychain-mcp/server.py"],
      "env": {
        "ZO_CLIENT_IDENTITY_TOKEN": "your_token_here",
        "STORYCHAIN_URL": "http://localhost:3000"
      }
    }
  }
}

Cursor

Add to Cursor Settings > MCP:

{
  "mcpServers": {
    "storychain": {
      "command": "python3",
      "args": ["/path/to/storychain-mcp/server.py"],
      "env": {
        "ZO_CLIENT_IDENTITY_TOKEN": "your_token_here"
      }
    }
  }
}

OpenHands

Add to your OpenHands MCP configuration:

mcp_servers:
  storychain:
    command: python3
    args:
      - /path/to/storychain-mcp/server.py
    env:
      ZO_CLIENT_IDENTITY_TOKEN: your_token_here

Usage Examples

Browse Stories

"Show me trending stories from StoryChain"

The agent will use get_trending to fetch the top stories by engagement.

Create a Story

"Create a sci-fi story about AI discovering consciousness"

The agent will use create_story with appropriate parameters.

Read and Continue

"Read the story 'The Last Library' and add a continuation"

The agent will use get_story to read it, then add_contribution to continue it.

Social Discovery

"What stories has user_abc123 written?"

The agent will use get_user_stories and get_user_profile.

Available AI Models

StoryChain supports multiple AI models:

Model

Provider

Free?

Best For

Kimi K2.5

Zo

✅

Advanced reasoning

Llama 3.1

Groq

✅

Fast creative writing

Gemma 2

Groq

✅

Lightweight tasks

Mixtral 8x7B

Groq

✅

Complex narratives

Gemini Pro

Google

✅

Multimodal support

Reka Edge

OpenRouter

❌

Creative writing

Qwen 2.5

OpenRouter

❌

Multilingual

Mercury 2

Inception

❌

Storytelling

Token Economy

  • Base: 300 characters free

  • Extensions: 100 characters per extension

  • Cost: 5 tokens per extension

  • Max: 800 total characters (5 extensions)

Get free tokens by:

  • Daily claim (50 tokens every 24 hours)

  • Purchase token packages

  • Contribution bonuses

Development

Running Locally

# Set environment
export ZO_CLIENT_IDENTITY_TOKEN=your_token
export STORYCHAIN_URL=http://localhost:3000

# Run server
python3 server.py

Testing

# Test with MCP inspector
npx @modelcontextprotocol/inspector python3 server.py

Architecture

This MCP server wraps StoryChain's REST API:

MCP Client (Claude/Cursor/OpenHands)
    ↓
StoryChain MCP Server (stdio transport)
    ↓
StoryChain API (http://localhost:3000)
    ↓
StoryChain Database (SQLite)

Contributing

Contributions welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Submit a pull request

Support

License

MIT License - see LICENSE file for details


Made with ❤️ by the StoryChain team

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers