Home/Documentation

MCP Server

Model Context Protocol

Connect MemoAir directly to AI assistants like Claude Desktop and Cursor using the Model Context Protocol (MCP). Your AI assistant gains persistent memory that survives across conversations.

What is MCP?

The Model Context Protocol is an open standard that allows AI assistants to connect to external tools and data sources. MemoAir's MCP server gives your AI assistant the ability to search, save, and manage memories.

Benefits: Your AI remembers your preferences, past conversations, and important information across all sessions.

Prerequisites

  • Node.js 18+ installed
  • A MemoAir API Key (get one from your dashboard)
  • Claude Desktop or Cursor IDE

Installation

The MCP server can be run directly with npx (no installation required):

1npx @memoair/mcp-server

Or install globally:

1npm install -g @memoair/mcp-server

Configure Claude Desktop

Add MemoAir to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

claude_desktop_config.jsonjson
1{
2 "mcpServers": {
3 "memoair": {
4 "command": "npx",
5 "args": ["@memoair/mcp-server"],
6 "env": {
7 "MEMOAIR_API_KEY": "your-api-key-here",
8 "MEMOAIR_USER_ID": "your-user-id"
9 }
10 }
11 }
12}

Replace your-api-key-here with your actual API key from the dashboard.

Configure Cursor

Add MemoAir to your Cursor MCP configuration:

.cursor/mcp.jsonjson
1{
2 "mcpServers": {
3 "memoair": {
4 "command": "npx",
5 "args": ["@memoair/mcp-server"],
6 "env": {
7 "MEMOAIR_API_KEY": "your-api-key-here",
8 "MEMOAIR_USER_ID": "your-user-id"
9 }
10 }
11 }
12}

Available Tools

Once connected, your AI assistant has access to these memory tools:

search_memories
Search your memory bank for relevant information based on a query.
query (required)limitview
save_memory
Save new information to your memory bank for later retrieval.
content (required)source_urlsource_title
analyze_query
Analyze a statement and automatically determine if it should be saved, updated, or deleted.
query (required)source_urlsource_title
delete_memory
Delete a specific memory by its ID.
id (required)
update_memory
Update an existing memory with new content.
id (required)content (required)
list_working_memory
List items in your working memory (hippocampus), grouped by category.
categoriesinclude_contentlimit

Example Conversation

Here's how your AI assistant uses MemoAir:

👤

"Remember that I prefer TypeScript over JavaScript for new projects."

🤖

I'll save that preference for you.

→ Calling save_memory: "User prefers TypeScript over JavaScript for new projects"
... later in a new conversation ...
👤

"Help me set up a new web project."

🤖

Based on your preferences, I'll set this up with TypeScript...

→ search_memories found: "User prefers TypeScript over JavaScript"

Environment Variables

VariableRequiredDescription
MEMOAIR_API_KEYRequiredYour MemoAir API key
MEMOAIR_USER_IDOptionalUser ID for memory isolation (defaults to API key owner)
MEMOAIR_API_BASEOptionalAPI base URL (for self-hosted instances)

Troubleshooting

MCP server not appearing in Claude

Restart Claude Desktop after editing the config file. Check the logs at ~/Library/Logs/Claude/ for errors.

Authentication errors

Verify your API key is correct and hasn't expired. Generate a new key from the dashboard if needed.

Tools not working

Ensure Node.js 18+ is installed. Run node --version to check.