SDKs

MCP server

Connect MemHQ to Claude Desktop, Claude Code, and other MCP clients via Remote MCP or stdio.

MCP server

MemHQ ships as a hosted Model Context Protocol server at https://memhq.ai/mcp, so any MCP-aware client — Claude Desktop, Claude Code, Cursor — can read from and write to your MemHQ projects with just an API key. No npx, no local process, no editing JSON config by hand for the URL.

Use your MemHQ project API key (mem_…) as a bearer token.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on Linux / Windows:

{
  "mcpServers": {
    "memhq": {
      "url": "https://memhq.ai/mcp",
      "headers": {
        "Authorization": "Bearer mem_..."
      }
    }
  }
}

Restart Claude Desktop and the MemHQ tools will appear in the tool picker.

Claude Code

claude mcp add memhq --transport http https://memhq.ai/mcp \
  --header "Authorization: Bearer mem_..."

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "memhq": {
      "url": "https://memhq.ai/mcp",
      "headers": {
        "Authorization": "Bearer mem_..."
      }
    }
  }
}

Tools exposed

ToolMaps to
memhq_addPOST /v1/memhq/add
memhq_searchPOST /v1/memhq/search
memhq_askPOST /v1/memhq/ask
memhq_list_usersGET /v1/users

Self-hosted alternative — stdio

If you'd rather run the server in-process on your own machine — for air-gapped setups, custom env-var injection, or pointing at a non-default MemHQ API origin — @memhq/mcp-server ships a stdio entry point.

{
  "mcpServers": {
    "memhq": {
      "command": "npx",
      "args": ["-y", "@memhq/mcp-server"],
      "env": {
        "MEMHQ_API_KEY": "mem_...",
        "MEMHQ_API_URL": "https://api.memhq.ai"
      }
    }
  }
}

The same tool surface is exposed by both transports. The Remote MCP endpoint is the default path — everything else in these docs assumes you're connecting to https://memhq.ai/mcp.