Skip to content

nexus-context MCP server — expose agent memory and personas as MCP tools #84

Description

@canoo

Problem

Project memory written to ~/.config/nexus/agent-memory/<project>/ is read by tools that happen to load NEXUS steering files. Tools without steering file support, or tools mid-session, cannot query this memory. Writing back from a tool session to agent-memory requires manual file operations.

Research shows developers are using Obsidian and similar 'second brain' setups as a manual long-term memory bridge between AI tools (r/hermesagent, April 2026). NEXUS should automate this.

Solution

A second MCP server — nexus-context — that runs locally alongside nexus-ollama and exposes agent memory and personas as queryable MCP tools. Any tool with MCP support gets real-time, bidirectional project context.

MCP tools exposed

nexus_get_context(project?)      → returns relevant agent-memory for current project
nexus_log_decision(what, why)    → writes a decision entry back to agent-memory
nexus_get_persona(name)          → returns full instructions for a named persona
nexus_list_personas()            → returns available specialist agents with descriptions
nexus_get_session_summary()      → returns summary of current session context

How it works

  1. nexus sync automatically adds nexus-context to each installed tool's MCP config
  2. Any tool with MCP support (Claude Code, Cursor, Windsurf, Cline, Continue.dev) can call these tools
  3. Context is shared in real-time — a decision logged from Claude Code is immediately available when you switch to Cursor
  4. No file-polling, no steering-file dependency

Config entry written by nexus sync

{
  "mcpServers": {
    "nexus-context": {
      "command": "node",
      "args": ["~/.config/nexus/tools/mcp/context-server.mjs"]
    }
  }
}

Dependencies

Requires #81 (nexus sync, to auto-add to tool MCP configs) and the agent-memory directory convention already established in NEXUS.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions