ishswar/story_mcp_server
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.
š 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 titlecontent
(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
- Get available characters:
get_characters()
- Get character details:
get_backstory("Jack")
andget_superpower("Jack")
- Create and save a story:
save_story("Jack's Adventure", "...")
- List available stories:
list_stories("checking available stories")
- 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:
- Choose a writing style that matches your story goals
- Specify parameters (theme, mystery type, or emotional focus)
- Receive comprehensive teaching content with techniques and assignments
- 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:
- Jack: A former spy with invisibility and telepathy powers
- Ram: An ancient warrior with invincible body and immense strength
- Robert: A scientist-turned-cyborg with advanced technological powers
These characters can be used to create engaging stories using their unique backstories and abilities.