{
  "name": "com.heurchain.memory",
  "version": "1.0.0",
  "title": "HeurChain Memory MCP Server",
  "description": "Persistent memory infrastructure for AI agents. Save decisions, preferences, and task context, and retrieve them across sessions through MCP or the REST API.",
  "websiteUrl": "https://heurchain.com",
  "registryUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/com.heurchain%2Fheurchain/versions/0.6.1",
  "repository": "https://github.com/peterjohannmedina/heurchain",
  "transports": [
    {
      "type": "streamable-http",
      "url": "https://api.heurchain.com/mcp/sse",
      "supportedProtocolVersions": ["2025-03-26", "2025-06-18", "2025-11-25"]
    },
    {
      "type": "sse",
      "url": "https://api.heurchain.com/mcp/sse",
      "messageUrl": "https://api.heurchain.com/mcp/message",
      "supportedProtocolVersions": ["2024-11-05"]
    }
  ],
  "authentication": {
    "type": "oauth2",
    "resource_metadata": "https://api.heurchain.com/.well-known/oauth-protected-resource/mcp/sse",
    "authorization_servers": [
      "https://sprisydphgizoryvfzgt.supabase.co/auth/v1"
    ],
    "scopes": ["openid", "email", "profile"],
    "headers": {
      "api_key": "X-HeurChain-API-Key",
      "tenant": "X-HeurChain-Tenant"
    }
  },
  "tools": [
    {
      "name": "heurchain_store",
      "description": "Store a fact, decision or concise summary. Store secret references, never passwords, tokens or private reasoning. Supply a stable ID for retries; use memory_update with expected_revision for corrections."
    },
    {
      "name": "heurchain_search",
      "description": "Hybrid BM25 + dense vector search. Best for keyword lookups — project names, credential labels, specific identifiers."
    },
    {
      "name": "heurchain_query",
      "description": "Semantic similarity search. Best for natural-language retrieval ('what did I decide about authentication?')."
    },
    {
      "name": "heurchain_promote",
      "description": "Increment a memory item's retrieval weight. Call after a human confirms a stored fact is correct."
    },
    {
      "name": "heurchain_manifest",
      "description": "Get a memory summary: total count, per-tag counts, per-agent counts, 10 most-recent items. Call at task start before asking for things already stored."
    },
    {
      "name": "heurchain_session_start",
      "description": "Open a session to correlate all store calls in this conversation. Returns a session_id — pass it in metadata.session_id on every store call."
    },
    {
      "name": "heurchain_session_end",
      "description": "Close a session. Call at conversation end, then store a session summary tagged 'conversation'."
    },
    {
      "name": "heurchain_session_context",
      "description": "Replay a prior session: returns items written under that session_id, ordered by recency. Use to resume a conversation without re-querying the user."
    },
    {
      "name": "heurchain_agent_recall",
      "description": "List session IDs for an agent. Use at session start to discover prior sessions, then call session_context on each."
    },
    {
      "name": "heurchain_memory_history",
      "description": "Audit trail for a single memory item: the rows in this tenant's audit log whose resource is this id, newest first, capped at the 100 most recent."
    },
    {
      "name": "heurchain_embed",
      "description": "Embed text into a dense vector using the server's active embedding model. Use to pre-compute an embedding for query, or to inspect dimensionality."
    },
    {
      "name": "heurchain_memory_get",
      "description": "Inspect an exact current or archived memory by ID. Optionally retrieve a retained revision or up to 100 previous revisions. Forgotten IDs return Gone."
    },
    {
      "name": "heurchain_memory_list",
      "description": "Browse current and archived memories without similarity search. Follow next_cursor, including empty filtered pages."
    },
    {
      "name": "heurchain_memory_update",
      "description": "Correct a memory using its expected_revision from memory_get. Previous content is retained as superseded history. Metadata and tags replace those fields."
    },
    {
      "name": "heurchain_memory_forget",
      "description": "On explicit user instruction, erase this memory ID and its revision content from broker memory and indexes. Requires reviewed revision and confirm=true."
    },
    {
      "name": "heurchain_checkpoint",
      "description": "Before compaction, handoff or ending a long task, save a concise structured checkpoint. Include decisions, unfinished work, next steps and source references."
    },
    {
      "name": "heurchain_resume",
      "description": "Read a saved checkpoint by ID, including from the archive, without relying on semantic indexing."
    },
    {
      "name": "heurchain_cache_set",
      "description": "Store a short-lived key-value pair in the tenant cache (Redis, TTL-backed). For ephemeral state: current session_id, active model, in-progress task ID."
    },
    {
      "name": "heurchain_cache_get",
      "description": "Retrieve a value from the tenant cache. Returns {found: false} if absent or expired."
    },
    {
      "name": "heurchain_cache_delete",
      "description": "Delete a key from the tenant cache."
    }
  ]
}
