Skip to content

feat: MCP server nous-mcp exposing campaigns as resources + tools #126

@sriumcp

Description

@sriumcp

TL;DR

Build an MCP server that exposes Nous campaigns as queryable resources and tools. Lets any Claude Code session — terminal, web, IDE — @-reference a campaign or call nous.search_principles("ordinal scheduling") natively, without bash plumbing.

Why this matters

On 5/20 the user explicitly tried to aggregate "all campaigns about saturation detection, with results and patches." The agent had to grep across inference-sim/.nous/*/findings.json manually. With 33 campaigns on inference-sim alone, this is acute. MCP is the canonical Claude Code answer to "give my agent access to my data."

What's already shipped

  • The on-disk artifact layout (state.json, ledger.json, findings.json, patches/) is stable and well-tested. This issue just exposes it.

Proposed approach

Resources:

  • nous://campaigns — list all campaigns with status
  • nous://campaigns/<run-id>/state — current phase + iteration
  • nous://campaigns/<run-id>/principles — accumulated principles
  • nous://campaigns/<run-id>/iter/<N>/findings — findings.json
  • nous://campaigns/<run-id>/iter/<N>/patches/<arm>.patch — code patch
  • nous://campaigns/<run-id>/iter/<N>/results/<arm>/<seed> — raw result file

Tools:

  • nous.list_campaigns(query?, status?, repo?) — filter campaigns
  • nous.search_principles(text, scope?) — fuzzy/semantic search across principles.json files
  • nous.get_arm_results(run_id, iter, arm) — return aggregated results for an arm
  • nous.compare_iterations(run_id, iter_a, iter_b) — deterministic diff of findings

Acceptance criteria

  • nous-mcp serve starts a local stdio MCP server.
  • Drop-in config snippet for ~/.claude.json documented in README.
  • In a fresh Claude Code session, the agent can answer "find campaigns about saturation detection and summarize their h-main outcomes" using only MCP calls.

Notes

  • Optional: enable embedding-based semantic search when OPENAI_API_KEY is set; fall back to ripgrep otherwise.
  • Keep the MCP server stateless; campaigns live on disk.

Part of #120.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions