MCP Hub
Back to servers

@nex-ai/nex

Requires Setup

Nex CLI provides organizational context & memory to AI agents. Connect email, CRM, Slack, meetings, and 100+ tools into one knowledge graph.

npm888/wk
Stars
14
Updated
Mar 23, 2026
Validated
Mar 25, 2026

Quick Install

npx -y @nex-ai/nex

Nex: Compounding Intelligence for AI agents

npm version Discord

Turn all your AI agent conversations into a unified knowledge graph. Supports Claude Code, Codex, OpenClaw, Cursor, OpenCode, etc. Adds additional context from Email, Meetings, Slack, HubSpot, Salesforce.

Tell something to OpenClaw. Ask about it in Claude Code. Reference it from Cursor. Context follows you across tools — no copy-pasting, no re-explaining, no lost context.

Join our Discord

Talk to the team, share feedback, and connect with other developers building AI agents with Nex.

How It Works

You → OpenClaw: "Maria Rodriguez, CTO of TechFlow, wants to expand to Europe in Q3. Budget is $2M."

You → Claude Code: "What do you know about Maria Rodriguez?"
Claude Code: "Maria Rodriguez is the CTO of TechFlow. They're planning European expansion
              in Q3 with a $2M budget."

You → Cursor: "Which companies are planning European expansion?"
Cursor: "TechFlow — Maria Rodriguez (CTO) confirmed Q3 timeline, $2M budget."

One fact entered once. Available everywhere, instantly.

Integration Options

CLI + MCP ServerOpenClaw PluginClaude Code PluginSKILL.md
PlatformsAny terminal, Claude Desktop, ChatGPT, Cursor, WindsurfOpenClawClaude Code CLIOpenClaw (script-based)
Auto-recallVia nex recall / MCP tool callsYes (smart filter)Yes (smart filter)No (manual)
Auto-captureVia nex captureYesYesNo (manual)
NotificationsDaily digest + proactive alerts (Channels API)NoNoNo
Commands50+ CLI commands, 50+ MCP tools, nex mcp4 tools + 4 commands5 slash commands + MCPbash scripts
Setupnex setupCopy pluginnex setupSet NEX_API_KEY

Quick Start (Recommended)

# Install and run setup — handles everything in one step
bun install -g @nex-ai/nex
nex setup

nex setup registers your API key, auto-detects your AI platforms (Claude Code, Cursor, Windsurf, etc.), installs hooks, scans project files, and creates config. One command, fully configured.

# Now use it from any agent
nex ask "who is Maria Rodriguez?"
nex remember "Met with Maria, CTO of TechFlow. European expansion Q3, $2M budget."

See cli/README.md for all 50+ commands.


Manual setup per platform (if you prefer step-by-step)

CLI (any terminal, any AI agent)

npx @nex-ai/nex register --email you@company.com

That's it. Now use it:

# Ask your knowledge graph
nex ask "who is Maria Rodriguez?"

# Ingest information
nex remember "Met with Maria Rodriguez, CTO of TechFlow. European expansion Q3, $2M budget."

# Or pipe from stdin
cat meeting-notes.txt | nex remember

# Search CRM records
nex search "TechFlow"

# CRUD operations
nex record list person --limit 10
nex task create --title "Follow up with Maria" --priority high
nex insight list --last 24h

# Build auto-recall hooks for any agent
nex recall "what do I know about TechFlow?"  # Returns <nex-context> XML block

# Build auto-capture hooks
nex capture "Agent conversation text..."  # Rate-limited, filtered

Install globally: bun install -g @nex-ai/nex

MCP Server (Claude Desktop, Cursor, Windsurf)

The MCP server is bundled inside @nex-ai/nex. No separate package needed.

{
  "mcpServers": {
    "nex": {
      "command": "nex-mcp",
      "env": { "NEX_API_KEY": "sk-your_key_here" }
    }
  }
}

Or without a global install:

{
  "mcpServers": {
    "nex": {
      "command": "npx",
      "args": ["-y", "@nex-ai/nex", "mcp"],
      "env": { "NEX_API_KEY": "sk-your_key_here" }
    }
  }
}

No API key? The server starts in registration mode — call the register tool with your email.

Proactive Notifications (Claude Code Channels)

The MCP server includes a built-in notification channel that pushes context updates directly into your Claude Code session — without you having to ask. This uses the Claude SDK Channels API.

What you get:

NotificationWhat it doesFrequency
Daily digestSummarizes all context collected in the last 24 hours: deal updates, new relationships, upcoming events, actionable itemsOnce per day (on first session start after 24h)
Proactive alertsPushes new insights as they're discovered — deal changes, relationship shifts, risks, opportunitiesEvery 15 minutes (configurable)

How to enable:

  1. Install Nex globally (if not already):

    npm install -g @nex-ai/nex
    
  2. Add the MCP server to your project (.mcp.json):

    {
      "mcpServers": {
        "nex": {
          "command": "nex-mcp",
          "env": {}
        }
      }
    }
    
  3. Start Claude Code with channels enabled:

    claude --dangerously-load-development-channels server:nex
    
  4. That's it. Notifications arrive as <channel> events in your session:

    ← nex: [technical_stack] MCP server utilizes experimental channel capability...
    ← nex: [deal_update | high] Meridian counter-offer moved to 12% equity split...
    

Configuration:

Environment variableDefaultDescription
NEX_NOTIFY_INTERVAL_MINUTES15How often to poll for new insights

Set it in your .mcp.json:

{
  "mcpServers": {
    "nex": {
      "command": "nex-mcp",
      "env": { "NEX_NOTIFY_INTERVAL_MINUTES": "5" }
    }
  }
}

State persistence: Digest and notification timestamps are stored in ~/.nex/channel-state.json. Delete this file to force a fresh digest on next session start.

Requirements: Claude Code v2.1.80+, claude.ai login (API keys not supported for Channels), --dangerously-load-development-channels flag during research preview.

OpenClaw Plugin (auto-recall + auto-capture)

cp -r openclaw-plugin /path/to/openclaw/plugins/nex
cd /path/to/openclaw/plugins/nex && bun install && bun run build

Add to openclaw.json:

{
  "plugins": {
    "load": { "paths": ["/path/to/plugins/nex"] },
    "slots": { "memory": "nex" },
    "entries": {
      "nex": {
        "enabled": true,
        "config": {
          "apiKey": "sk-your_key_here"
        }
      }
    }
  }
}

See openclaw-plugin/README.md for details.

Claude Code Plugin (auto-recall + auto-capture)

cd claude-code-plugin && bun install && bun run build

Add hooks to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [{
      "matcher": "",
      "hooks": [{
        "type": "command",
        "command": "NEX_API_KEY=sk-your_key node /path/to/claude-code-plugin/dist/auto-recall.js",
        "timeout": 10000
      }]
    }],
    "Stop": [{
      "matcher": "",
      "hooks": [{
        "type": "command",
        "command": "NEX_API_KEY=sk-your_key node /path/to/claude-code-plugin/dist/auto-capture.js",
        "timeout": 5000,
        "async": true
      }]
    }]
  }
}

Slash commands and MCP server:

cp claude-code-plugin/commands/*.md ~/.claude/commands/    # /nex:recall, /nex:remember, /nex:scan, /nex:entities
claude mcp add nex -- nex-mcp                               # Full toolset

See claude-code-plugin/README.md for details.

SKILL.md (OpenClaw script-based)

For OpenClaw agents without the plugin, SKILL.md provides bash-script-based access:

# Register and get API key
bash scripts/nex-openclaw-register.sh your@email.com "Your Name"

# Query context
printf '{"query":"who is Maria?"}' | bash scripts/nex-api.sh POST /v1/context/ask

# Ingest text
printf '{"content":"Meeting notes..."}' | bash scripts/nex-api.sh POST /v1/context/text

# Scan project files
bash scripts/nex-scan-files.sh --dir . --max-files 10

See SKILL.md for the full API reference.

Shared Config

All surfaces share configuration for cross-tool compatibility:

FilePurposeShared by
~/.nex-mcp.jsonAPI key + workspace infoAll surfaces
~/.nex/file-scan-manifest.jsonFile change trackingAll surfaces
~/.nex/rate-limiter.jsonRate limit timestampsOC, MCP, CC
~/.nex/recall-state.jsonRecall debounce stateCC

Register once via any surface → all other surfaces pick up the key automatically.

Architecture

                    ┌─────────────────────┐
                    │   Nex Context Graph  │
                    │  (people, companies, │
                    │  insights, tasks...) │
                    └──────────┬──────────┘
                               │
      ┌────────────────────────┼────────────────────────┐
      │              │                   │              │
  ┌───▼────┐  ┌─────▼───────┐  ┌───────▼──────┐  ┌───▼──────────┐
  │  CLI   │  │  MCP Server │  │  OpenClaw    │  │  Claude Code │
  │  50+   │  │  50+ tools  │  │  Plugin     │  │  Plugin      │
  │  cmds  │  │  + scan     │  │  + recall   │  │  + recall    │
  └───┬────┘  └─────┬───────┘  └──────┬──────┘  └──────┬───────┘
      │             │                 │                 │
  Any agent    Claude Desktop    OpenClaw agents   Claude Code
  Aider        ChatGPT          Clawgent          Any project
  Codex        Cursor            WhatsApp
  Custom       Windsurf

Environment Variables

VariableRequiredDefault
NEX_API_KEYYes (or register)
NEX_DEV_URLNo (dev only)https://app.nex.ai
NEX_SCAN_ENABLEDNotrue
NEX_SCAN_EXTENSIONSNo.md,.txt,.rtf,.html,.htm,.csv,.tsv,.json,.yaml,.yml,.toml,.xml,.js,.ts,.jsx,.tsx,.py,.rb,.go,.rs,.java,.sh,.bash,.zsh,.fish,.org,.rst,.adoc,.tex,.log,.env,.ini,.cfg,.conf,.properties
NEX_SCAN_MAX_FILESNo5
NEX_SCAN_DEPTHNo20
NEX_SCAN_MAX_FILE_SIZENo100000 (bytes)
NEX_SCAN_IGNORE_DIRSNonode_modules,.git,dist,build,.next,__pycache__,vendor,.venv,.claude,coverage,.turbo,.cache
NEX_NOTIFY_INTERVAL_MINUTESNo15

Testing

  • CLI: 119 tests (cd cli && bun test)
  • OpenClaw plugin: 38/38 unit tests (cd openclaw-plugin && npx vitest run)
  • Claude Code plugin: 21/21 E2E tests (see docs/nex-plugin-test-results.md)
  • MCP server: Embedded in CLI, builds clean, all tools typed with Zod schemas
  • SKILL scripts: Syntax validated, injection-resistant, cross-platform (macOS + Linux)

License

MIT

Reviews

No reviews yet

Sign in to write a review