Skip to content

Connect Claude Code & Desktop

The local transport runs the MCP server as a subprocess of your client over stdio — best for a single user on their own machine. For teammates and web clients, use the hosted endpoint instead.

In StoryOS, open the sidebar → API tokens → create one for the workspace you want. Copy the mn_pat_… value — it’s shown once and scoped to that workspace. See authentication.

The package isn’t published to npm yet, so run it from the repo build:

Terminal window
pnpm install
pnpm --filter @storyos/mcp build # → packages/mcp/dist/index.js
Terminal window
claude mcp add storyos \
-e STORYOS_URL=https://app.storyos.dev \
-e STORYOS_TOKEN=mn_pat_xxx \
-- node /ABSOLUTE/PATH/to/repo/packages/mcp/dist/index.js

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
"mcpServers": {
"storyos": {
"command": "node",
"args": ["/ABSOLUTE/PATH/to/repo/packages/mcp/dist/index.js"],
"env": {
"STORYOS_URL": "https://app.storyos.dev",
"STORYOS_TOKEN": "mn_pat_xxx"
}
}
}
}

STORYOS_URL is https://app.storyos.dev for the cloud instance, or http://localhost:3001 for local dev (the default). Restart Claude, then ask it to “list my StoryOS databases”.

Terminal window
pnpm --filter @storyos/mcp dev # run from source over stdio (needs STORYOS_TOKEN)
pnpm --filter @storyos/mcp build # compile to dist/