Skip to main content

How the connection works

Your agent talks to CoreStory by starting corestory 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

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 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
Start Claude Code from the repository folder. Run /mcp to confirm corestory is connected.
Installing with an agent. You can ask your coding agent: “Install CoreStory from get.corestory.ai and set it up for this repository.” The agent follows the instructions at get.corestory.ai/llms.txt. It will stop and ask you to run corestory setup yourself.

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 status first, and ask you before anything that changes local state or makes model calls
  • use rules_for before editing a file, and search for 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
If you write your own workflow instructions and want to leave these out, start the server with corestory mcp --no-instructions.

Keeping the index current

The agent sees the snapshot from your last ingest, not your latest edits. After significant changes, run corestory ingest again, or ask the agent to call its ingest tool. The new snapshot becomes the selected one.

Troubleshooting

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.
Run corestory setup in your own terminal and finish all of its steps. Agents cannot accept the terms for you.
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.
The snapshot is older than your edits. Run corestory ingest. If the agent still sees the old snapshot, start a new agent session.