> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindset.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Architecture

> Memex AI is an MCP server. Any agent, any vendor, one shared context layer.

## MCP-Native by Design

Memex AI exposes its entire surface as an **MCP (Model Context Protocol) server**. Any AI agent, regardless of vendor, framework, or runtime, connects to Memex AI and interacts with the strategy/decision/work/blueprint graph through standard tool calls.

<Note>
  This is a deliberate architectural choice. Memex AI is not another AI coding tool. It's the **shared context layer** that all AI tools read from and write to.
</Note>

## Why MCP

MCP is becoming the standard protocol for AI tool integration.

<CardGroup cols={2}>
  <Card title="Any AI coding agent" icon="robot" iconType="solid">
    Claude Code, Cursor, GitHub Copilot, custom agents, all connect and access the full strategy/decision/work/blueprint graph.
  </Card>

  <Card title="Multi-vendor, no lock-in" icon="unlock" iconType="solid">
    Multiple agents from different vendors share the same context. Swap tools without losing your graph.
  </Card>

  <Card title="Custom agents fit in" icon="puzzle-piece" iconType="solid">
    Research, testing, deployment, product management. All integrate through the same protocol.
  </Card>

  <Card title="Server is source of truth" icon="database" iconType="solid">
    Not a file in a repository that might be stale. One place, always current.
  </Card>
</CardGroup>

## Core Tool Surface

The full MCP surface, grouped by concern.

<AccordionGroup>
  <Accordion title="Strategy (top-level container)" icon="bullseye" iconType="solid">
    ```
    list_strategies()                   → all strategies with status summary
    get_strategy(id)                    → purpose, vision, decisions, work items
    get_strategy_status(id)             → progress overview: open decisions, blocked/ready WIs
    promote_work_item(wi_id)            → elevates a WI to its own strategy, preserving lineage
    ```
  </Accordion>

  <Accordion title="Strategy drafting (collaborative design)" icon="pencil" iconType="solid">
    ```
    create_strategy_draft(purpose)               → start a new strategy in draft state
    update_strategy_draft(id, section, content)  → iterative refinement
    get_strategy_draft(id)                       → current state of the draft, formatted for reading
    add_draft_decision(id, question, options)    → surface a design choice during planning
    add_draft_work_item(id, goal, deps)          → scope a unit of work
    publish_strategy(id)                         → move from draft to active; decisions become blockable
    ```
  </Accordion>

  <Accordion title="Decisions (within a strategy)" icon="circle-question" iconType="solid">
    ```
    get_decision(id)                    → decision with status, options, rationale
    get_decisions(strategy_id)          → all decisions for a strategy
    create_decision(strategy_id, question, options)
    resolve_decision(id, choice, rationale)
    reopen_decision(id, reason)         → re-opens a resolved decision, cascades impact
    get_decision_impact(id)             → WIs blocked, blueprints affected, cross-strategy deps
    ```
  </Accordion>

  <Accordion title="Work Items (within a strategy)" icon="list-check" iconType="solid">
    ```
    get_work_item(id)                   → goal, dependencies, checklist, status
    get_ready_work_items(strategy_id?)  → WIs where all decisions resolved + deps met
    check_dependencies(wi_id)           → which are met, which block (within and across strategies)
    get_dependents(wi_id)               → downstream work this unblocks
    update_work_item_status(id, status)
    submit_execution_plan(wi_id, plan)
    get_execution_plan(wi_id)           → files, dependency flow, conflicts
    ```
  </Accordion>

  <Accordion title="Blueprints (cross-cutting knowledge layer)" icon="book-open" iconType="solid">
    ```
    get_blueprint(domain)                    → full blueprint content
    get_blueprints_for_work_item(wi_id)      → which blueprints an agent should load
    flag_blueprint_drift(id, evidence)       → "this blueprint says X but code does Y"
    get_blueprints_affected_by_decision(id)  → impact analysis before resolving
    update_blueprint(id, content, reason)
    ```
  </Accordion>

  <Accordion title="Decision extraction (passive capture + review)" icon="inbox" iconType="solid">
    ```
    extract_decisions(session_context)  → candidate decisions from a conversation
    create_decision_bundle(decisions[]) → bundle for review
    get_pending_bundles(account_id?)    → bundles awaiting review
    review_decision(bundle_id, decision_id, action) → approve | reject | flag
    approve_bundle(bundle_id)           → approve all decisions in the bundle
    ```
  </Accordion>
</AccordionGroup>

## The shape of the integration

Your coding agent connects to the Memex AI MCP server at the start of a session. From that point it can list strategies, fetch decisions, check readiness, produce execution plans, and report drift, all through standard MCP tool calls. No custom plugin. No vendor-specific SDK. The agent you're already using gets the strategy/decision/work/blueprint graph for free.
