story_mcp_server

ishswar/story_mcp_server

3.2

If you are the rightful owner of story_mcp_server 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.

This is a lightweight MCP (Multi-Channel Processor) server designed for creative storytelling with character management and story storage capabilities.

Tools
6
Resources
0
Prompts
0

šŸ“š Story MCP Server

This is a lightweight MCP (Multi-Channel Processor) server powered by the fastmcp module. It provides a creative storytelling platform with character management and story storage capabilities using HTTP Streaming transport.


šŸ“¦ Features

  • FastAPI-based HTTP Streaming server using fastmcp
  • Character management with backstories and superpowers
  • Story creation and storage in markdown format
  • Comprehensive logging system
  • Dockerized for portability and ease of use

šŸš€ Getting Started

šŸ”§ Prerequisites

  • Docker & Docker Compose installed
  • Python 3.x (for local runs)
  • fastmcp Python package

🐳 Run via Docker

1. Clone the repository
git clone <your-repo-url>
cd story_mcp_server
2. Build and run
docker compose up --build

🟢 MCP server will be available at http://localhost:8082/mcp


šŸ›  Local Run (for development)

pip install fastmcp
python story_mcp_server.py

āš™ļø Project Structure

.
ā”œā”€ā”€ Dockerfile                # Container setup
ā”œā”€ā”€ docker-compose.yml        # Compose file for container orchestration
ā”œā”€ā”€ story_mcp_server.py      # Main MCP server implementation
ā”œā”€ā”€ requirements.txt         # Python dependencies
ā”œā”€ā”€ story_server.log        # Server logs
└── README.md

🌐 Networking (Docker Compose)

The server is configured to run on port 8082 by default and uses HTTP Streaming transport:

networks:
  app_network_pyd:
    driver: bridge

🧰 Exposed MCP Tools

This MCP server registers six tools, each providing specific storytelling and character management functionality:

1. get_characters()

šŸ” Description:
Returns a list of all available character names.

šŸ“¤ Output:

  • List of character names (e.g., ["Jack", "Ram", "Robert"])

2. get_backstory(character: str)

šŸ“„ Description:
Retrieves the backstory for a specified character.

šŸ“„ Input:

  • character (str): Name of the character

šŸ“¤ Output:

  • Character's backstory as a string

3. get_superpower(character: str)

šŸ’Ŗ Description:
Gets the superpower of a specified character.

šŸ“„ Input:

  • character (str): Name of the character

šŸ“¤ Output:

  • Character's superpower as a string

4. save_story(title: str, content: str)

šŸ’¾ Description:
Saves a story to a markdown file with title and creation date.

šŸ“„ Inputs:

  • title (str): Story title
  • content (str): Story content

šŸ“¤ Output:

  • Confirmation message with file path

5. list_stories(reason: str)

šŸ“š Description:
Lists all saved story files in markdown format.

šŸ“„ Input:

  • reason (str): Reason for listing stories (for logging)

šŸ“¤ Output:

  • List of story filenames

6. get_story(filename: str)

šŸ“– Description:
Reads and returns the content of a specific story file.

šŸ“„ Input:

  • filename (str): Name of the story file to read

šŸ“¤ Output:

  • Story content in markdown format

āœ… Example Flow

  1. Get available characters: get_characters()
  2. Get character details: get_backstory("Jack") and get_superpower("Jack")
  3. Create and save a story: save_story("Jack's Adventure", "...")
  4. List available stories: list_stories("checking available stories")
  5. Read a story: get_story("jacks_adventure.md")

šŸŽØ Writing Style Prompts

This MCP server also exposes three educational prompts that act as writing instructors, teaching different storytelling styles with specific techniques and assignments.

1. adventure-writing-master

šŸŽÆ Description:
An Adventure Writing Instructor that teaches action-packed storytelling techniques.

šŸ“„ Input:

  • story_theme (str, optional): Theme for the adventure story (default: "heroic quest")

šŸ“¤ Output:

  • Complete masterclass content with 10 essential adventure writing techniques
  • Specific writing assignment based on the provided theme
  • Teaching guidance for creating thrilling, fast-paced narratives

2. mystery-writing-master

šŸ” Description:
A Mystery Writing Instructor that teaches suspenseful, puzzle-driven storytelling.

šŸ“„ Input:

  • mystery_type (str, optional): Type of mystery story (default: "whodunit")

šŸ“¤ Output:

  • Complete masterclass content with 10 essential mystery writing techniques
  • Specific writing assignment based on the mystery type
  • Teaching guidance for creating engaging, suspenseful narratives

3. character-driven-master

šŸ’­ Description:
A Character-Driven Writing Instructor that teaches emotional, relationship-focused storytelling.

šŸ“„ Input:

  • emotional_theme (str, optional): Emotional theme to explore (default: "personal growth")

šŸ“¤ Output:

  • Complete masterclass content with 10 essential character-driven writing techniques
  • Specific writing assignment based on the emotional theme
  • Teaching guidance for creating deep, emotionally resonant narratives

šŸŽ“ How to Use Writing Prompts

These prompts are designed to be used with AI language models to get structured writing guidance:

  1. Choose a writing style that matches your story goals
  2. Specify parameters (theme, mystery type, or emotional focus)
  3. Receive comprehensive teaching content with techniques and assignments
  4. Apply the techniques to create stories using the character tools

Example Usage:

  • Request adventure-writing-master with theme "space exploration"
  • Use the teaching content to write an adventure story featuring Jack's invisibility powers
  • Save the completed story using save_story()

šŸ“ Demo Characters

The server comes with three pre-configured characters:

  1. Jack: A former spy with invisibility and telepathy powers
  2. Ram: An ancient warrior with invincible body and immense strength
  3. Robert: A scientist-turned-cyborg with advanced technological powers

These characters can be used to create engaging stories using their unique backstories and abilities.