plot
MCP server from takehisa10098/plot-mcp-server
claude mcp add --transport stdio takehisa10098-plot-mcp-server node server.js \ --env OPENAI_API_KEY="your OpenAI API key"
How to use
This MCP server implements a context-aware storytelling assistant built with Node.js and Express. It uses a structured MCP context (system, user, steps, resources) to guide the generation of story plots via OpenAI. You can fetch the current context at /context, generate a plot by posting to /step/plot, and extend the context by adding characters through /update/characters. The plot generation respects the defined goals and constraints in context.json, and characters can be added dynamically to influence future plots. This setup demonstrates how altering the MCP context changes the LLM's output in a reproducible workflow.
How to install
Prerequisites:
- Node.js v18+ installed
- npm installed
- An OpenAI API key
- Clone the repository and install dependencies
git clone https://github.com/takehisa10098/plot-mcp-server.git
cd plot-mcp-server
npm install
- Create a .env file with your OpenAI API key
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
-
Create or customize context.json as needed (example provided in README)
-
Start the server
node server.js
- Interact with the MCP endpoints:
- Get context: curl http://localhost:3000/context
- Generate a plot: curl -X POST http://localhost:3000/step/plot
- Add a character: curl -X POST http://localhost:3000/update/characters -H "Content-Type: application/json" -d '{"name":"ユキ","role":"謎の旅人","trait":"静かで何かを知っているような雰囲気"}'
Additional notes
Notes:
- Ensure OPENAI_API_KEY is valid and has access to GPT-4 or GPT-4-turbo for best results.
- The context.json file defines the initial state; adjust system/user/steps/resources to fit your project.
- The MCP flow uses the /step/plot endpoint to generate a plot based on the current context; subsequent plots will reflect changes in characters or world settings.
- If the server cannot reach OpenAI, verify network access and key configuration. Ensure the environment variable is correctly loaded (dotenv in this setup).
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.