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 toolOption B: Global Install
npm install -g @basegrid-io/mcp-serverOption C: Source
git clone https://github.com/basegrid-io/mcp-server.git
cd mcp-server
npm install
npm run buildConfiguration
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
- Open Cursor Settings (Cmd+Shift+J or Ctrl+Shift+J).
- Navigate to the MCP section.
- Click "Add new MCP server".
- Name:
basegrid - Type:
command - Command:
npx -y @basegrid-io/mcp-server - Add Environment Variable:
BASEGRID_API_KEYwith your key.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
| BASEGRID_API_KEY | Yes | — | Your BaseGrid API key |
| BASEGRID_API_URL | No | Production URL | Custom API URL (for self-hosted) |
| TRANSPORT | No | stdio | Set to http for HTTP |
| PORT | No | 3100 | Port when TRANSPORT=http |
Available Tools
store_memory
Store a new memory in BaseGrid.
| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | The memory content to store |
| agentId | string | No | Agent/namespace (default: "personal") |
Response Example:
✓ Stored memory: "I prefer dark mode and use TypeScript"
ID: mem_abc123recall_memories
Search and retrieve relevant memories using hybrid search.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | What to search for |
| limit | number | No | Max 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | No | Number of memories (default: 10) |
forget_memory
Delete a specific memory by ID.
Usage Examples
Personal Assistant
Project Context
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