How the connection works
Your agent talks to CoreStory by startingcorestory mcp, a local MCP server that communicates over standard input and output (stdio). There is no URL, sign-in, or token. The server runs on your machine for as long as the agent session lasts.
The server serves the repository it starts in. It finds the corpus by looking for .corestory/ in the folder it was started from. Every configuration below makes sure the server starts in your repository folder. If an agent starts it somewhere else, the server reports that the repository is not initialized.
Before you connect, finish Install and Set Up: run corestory setup, then corestory init and corestory ingest in the repository. The agent can also run init and ingest through MCP tools, but it cannot run setup for you.
Configure your agent
- Claude Code
- GitHub Copilot
- Cursor
- Codex
- Other agents
Option 1: Install the plugin (recommended). It configures the MCP server and installs CoreStory’s Agent Skills, which teach Claude workflows that use it.Install Start Claude Code from the repository folder. Run
corestory-local, not corestory. The corestory plugin connects to the CoreStory web app through its sign-in MCP server instead.Start Claude Code from the repository folder. Run /mcp to confirm the corestory-local server is connected.Option 2: Configure MCP only. Create .mcp.json at the repository root:.mcp.json
/mcp to confirm corestory is connected.What your agent can do
The server provides these tools.init and ingest write local state and can cost money, so a well-behaved agent asks before calling them. The other tools only read.
Guidance the server gives the agent
When an agent connects, the server sends instructions on how to use these tools well. In short, it tells the agent to:- call
statusfirst, and ask you before anything that changes local state or makes model calls - use
rules_forbefore editing a file, andsearchfor open-ended questions - check rules against the cited source before relying on them, because they are leads, not proof
- follow pagination, since a first page of results is not a complete list
- remember that results describe the ingested snapshot, which may be older than the working tree
corestory mcp --no-instructions.
Keeping the index current
The agent sees the snapshot from your last ingest, not your latest edits. After significant changes, runcorestory ingest again, or ask the agent to call its ingest tool. The new snapshot becomes the selected one.
Troubleshooting
The agent says the repository is not initialized
The agent says the repository is not initialized
If you already ran
corestory init and corestory ingest, the server probably started outside your repository. Check the agent’s MCP configuration and make sure it starts corestory mcp in the folder that contains .corestory/. For Codex, check cwd. For Cursor, use the sh -c wrapper shown above.Don’t let the agent call init to fix this. That creates a new, empty corpus in whatever folder the server started in.The agent says setup is not complete
The agent says setup is not complete
Run
corestory setup in your own terminal and finish all of its steps. Agents cannot accept the terms for you.The agent cannot find corestory
The agent cannot find corestory
The agent’s environment may not include the folder where
corestory is installed. Run which corestory (or where corestory on Windows) and either add that folder to the PATH the agent uses or put the full path to the binary in the command field.Answers do not match the current code
Answers do not match the current code
The snapshot is older than your edits. Run
corestory ingest. If the agent still sees the old snapshot, start a new agent session.