Get the FREE Ultimate OpenClaw Setup Guide →

plot

MCP server from takehisa10098/plot-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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
  1. Clone the repository and install dependencies
git clone https://github.com/takehisa10098/plot-mcp-server.git
cd plot-mcp-server
npm install
  1. Create a .env file with your OpenAI API key
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
  1. Create or customize context.json as needed (example provided in README)

  2. Start the server

node server.js
  1. Interact with the MCP endpoints:

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

Sponsor this space

Reach thousands of developers