DocsMCP Server

MCP Server

Connect BaseGrid to Claude Desktop, Cursor, and any MCP-compatible AI tool. The MCP (Model Context Protocol) server acts as a bridge between your AI tools and BaseGrid's persistent memory API.

Overview

The Model Context Protocol (MCP) is an open standard that enables AI models to interact with external tools and data. By running the BaseGrid MCP server, you give your local AI tools direct access to persistent memory.

  • Open Standard: Developed by Anthropic, adopted by major tools.
  • Universal Plugin: Write once, run anywhere (Claude, Cursor, Zed).
  • Persistent Memory: Your AI remembers context across sessions and restarts.

Prerequisites

  • Node.js 18 or higher installed on your machine.
  • A BaseGrid API key (get one at basegrid.io/signup).
  • Claude Desktop, Cursor, or any MCP-compatible client.

Installation

Option A: npx (Recommended)

No installation required. The server runs directly via npx.

# No installation required - npx downloads and runs automatically
# Just add the config below to your AI tool

Option B: Global Install

npm install -g @basegrid-io/mcp-server

Option C: Source

git clone https://github.com/basegrid-io/mcp-server.git
cd mcp-server
npm install
npm run build

Configuration

Claude Desktop

Edit your configuration file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "basegrid": {
      "command": "npx",
      "args": ["-y", "@basegrid-io/mcp-server"],
      "env": {
        "BASEGRID_API_KEY": "bg_your_api_key_here"
      }
    }
  }
}

Save the file and restart Claude Desktop completely.

Cursor

  1. Open Cursor Settings (Cmd+Shift+J or Ctrl+Shift+J).
  2. Navigate to the MCP section.
  3. Click "Add new MCP server".
  4. Name: basegrid
  5. Type: command
  6. Command: npx -y @basegrid-io/mcp-server
  7. Add Environment Variable: BASEGRID_API_KEY with your key.

Environment Variables

VariableRequiredDefaultDescription
BASEGRID_API_KEYYes—Your BaseGrid API key
BASEGRID_API_URLNoProduction URLCustom API URL (for self-hosted)
TRANSPORTNostdioSet to http for HTTP
PORTNo3100Port when TRANSPORT=http

Available Tools

store_memory

Store a new memory in BaseGrid.

ParameterTypeRequiredDescription
contentstringYesThe memory content to store
agentIdstringNoAgent/namespace (default: "personal")

Response Example:

✓ Stored memory: "I prefer dark mode and use TypeScript"
ID: mem_abc123

recall_memories

Search and retrieve relevant memories using hybrid search.

ParameterTypeRequiredDescription
querystringYesWhat to search for
limitnumberNoMax results (default: 5)

Response Example:

Found 2 memories for "coding preferences":

1. [Score: 0.92] "I prefer dark mode and use TypeScript" (stored Feb 18, 2026)
2. [Score: 0.85] "I use VS Code with Vim keybindings" (stored Feb 15, 2026)

list_memories

List recent memories for an agent.

ParameterTypeRequiredDescription
limitnumberNoNumber of memories (default: 10)

forget_memory

Delete a specific memory by ID.

Parameter: memoryId (string, required)

Usage Examples

Personal Assistant

You: Remember that my wife's birthday is March 15 and she loves orchids
Claude: ✓ Stored memory
[2 weeks later]
You: My wife's birthday is coming up, any gift ideas?
Claude: Your wife's birthday is on March 15. She loves orchids — you might consider a rare orchid variety or an orchid care set.

Project Context

You: Remember that for Project Phoenix, we decided to use event sourcing with a CQRS pattern.
Claude: ✓ Stored memory
[Days later]
You: What architecture decisions did we make for Project Phoenix?
Claude: For Project Phoenix, the team decided on event sourcing with CQRS.

Troubleshooting

"BASEGRID_API_KEY not set"

  • Check your configuration file syntax.
  • Ensure the key starts with bg_.
  • Verify key status in dashboard.

Tools not showing up

  • Restart your AI tool (Claude/Cursor).
  • Check for JSON syntax errors in config.
  • Verify file path for your OS.

API Key Security

Never share your API key publicly or commit it to version control. Use environment variables in production. If you suspect your key is compromised, regenerate it immediately in the dashboard.