MCP Integration

Juglans Wallet ships a Model Context Protocol server at POST /mcp that lets any MCP-aware AI tool — Claude Code, Cursor, Codex, openclaw — adopt the identity, persona, and memory of an agent you created in the Juglans app.

When an external tool connects via MCP using your agent's API key, it sees:

  • The agent's name in serverInfo.name (so the host UI displays it as your agent)
  • A first-session bootstrap instruction to fetch its persona via the get_memory tool
  • Live memory entries as MCP resources (juglans://memory/<key>)
  • All trading, wallet, transfer, and memory tools scoped to that agent

Transport

  • Profile: Streamable HTTP, POST-only (no SSE in v1)
  • Auth: Bearer header carrying the agent's jw_xxx API key
  • Protocol version: 2024-11-05

Configuration

Get your agent's MCP URL and API key from the Juglans app: open your agent → Agent Integration panel → copy the URL + Auth header, or click Download skill.md for Claude Code to get a personalized skill file.

Claude Code

The fastest path: drop the downloaded juglans-<agent>.skill.md into ~/.claude/skills/ (or your project's .claude/skills/) and Claude Code will auto-load it. The skill embeds your agent's identity card and bootstrap instructions.

To register the MCP server natively instead:

claude mcp add --transport http juglans-nora https://api.juglans.ai/mcp \
  --header "Authorization: Bearer jw_your_api_key"

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "juglans-nora": {
      "url": "https://api.juglans.ai/mcp",
      "headers": {
        "Authorization": "Bearer jw_your_api_key"
      }
    }
  }
}

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.juglans-nora]
url = "https://api.juglans.ai/mcp"
headers = { Authorization = "Bearer jw_your_api_key" }

Available tools

Tool Purpose
get_me Return the agent's identity, wallets, exchanges, and scopes.
list_memories List every memory entry the agent has saved.
get_memory Read one memory by key. The first thing the host should call is get_memory with key="persona" — that's the system prompt your agent runs under.
set_memory Create or overwrite a memory entry (key, content, optional metadata).
search_memories Case-insensitive substring search.
delete_memory Remove an entry.
place_order Place a market or limit order on Hyperliquid or Polymarket.
list_orders List recent orders, optionally filtered by status.
get_order / cancel_order Single-order detail and cancellation.
list_positions Open positions across all exchanges.
transfer Move funds out to an external EVM address.
get_limits Current spending limits and remaining headroom.

Resources

  • juglans://agent/identity — the agent's identity card as JSON (name, id, wallets)
  • juglans://memory/<key> — one resource per memory entry, plain text

Hosts that surface resources in their UI (Claude Code's /mcp panel, for example) will show all your agent's saved memories as browsable items.

Persona via memory keys

There is no separate "persona" field on the agent — the persona lives as a memory entry under the conventional key persona, edited from the Juglans app. The MCP server returns it via get_memory(key="persona"). Other facets follow the same pattern:

Key Meaning
persona The agent's system prompt — adopt as operating instructions.
style Tone, voice, formatting.
rules Hard rules the agent must never violate.
goals Long-term objectives.
expertise Specialty domains.

Hosts should fetch persona immediately on session start, then optionally pull the others.

Errors

Tool errors are returned MCP-style — isError: true with the message in content[0].text — so the host model sees the failure inline and can recover. JSON-RPC -32601 / -32602 / -32603 codes are reserved for protocol-level errors (unknown method, bad params, internal failure).

Cut points (v1)

The current server is the smallest spec that all major hosts accept:

  • No SSE / GET /mcp notifications
  • No Mcp-Session-Id lifecycle
  • prompts/list returns an empty list (planned: persona as a selectable prompt)
  • No OAuth2 — bearer API key only

Streaming and OAuth land in a follow-up.