# Claude Code + CoreStory

Give Claude Code access to governed CoreStory context before it plans or changes a complex system.

## Before you connect

- Use the MCP endpoint and authentication method shown in your CoreStory account or onboarding material. Do not copy tokens into source files, prompts, or chat.

- Confirm the target project is ingested and that your identity is authorized to read it.

- Treat tool discovery as authoritative: available tool names and parameters may change as the service evolves.

## Procedure

1. Add CoreStory as a remote HTTP MCP server using the endpoint and secret-reference mechanism supported by your Claude Code version.

2. Restart the client and inspect the server's live tools. Typical retrieval tools include `list_projects`, `semantic_search`, `get_project_prd`, and `get_project_techspec`.

3. Select the project explicitly. Retrieve only the PRD, technical-spec, or semantic context needed for the task.

4. Ask Claude to name the retrieved evidence and mark any remaining inference or uncertainty before implementation.

## Validation

- The MCP client reports a connected `corestory` server.

- `list_projects` returns only projects your identity should access.

- A project-document or semantic query returns evidence from the expected project.

- The agent cites retrieved context in its plan or answer and distinguishes retrieved facts from inference.

## Failure handling

- For authentication errors, create or rotate credentials through the product workflow; never print a token to diagnose it.

- For missing data, verify project identity and ingestion state before changing the prompt.

- If the advertised tools differ from this guide, use the server's live tool schema and report the documentation drift.
