mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-11 22:51:05 +00:00
160 lines
3.7 KiB
Text
160 lines
3.7 KiB
Text
---
|
|
title: 'Setup and Usage'
|
|
description: 'How to set up and use Supermemory MCP Server 4.0'
|
|
---
|
|
|
|
## Quick Install (Recommended)
|
|
|
|
```bash
|
|
npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client claude --oauth=yes
|
|
```
|
|
|
|
Replace `claude` with your MCP client: `cursor`, `windsurf`, `vscode`, etc.
|
|
|
|
## Manual Configuration
|
|
|
|
Add this to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"supermemory": {
|
|
"url": "https://mcp.supermemory.ai/mcp"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
The server uses **OAuth authentication** by default. Your MCP client will automatically discover the authorization server via `/.well-known/oauth-protected-resource` and prompt you to authenticate.
|
|
|
|
## API Key Authentication (Alternative)
|
|
|
|
If you prefer to use an API key instead of OAuth, get one from [app.supermemory.ai](https://app.supermemory.ai) and pass it in the `Authorization` header:
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"supermemory": {
|
|
"url": "https://mcp.supermemory.ai/mcp",
|
|
"headers": {
|
|
"Authorization": "Bearer sm_your_api_key_here"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
API keys start with `sm_` and are automatically detected. When an API key is provided, OAuth authentication is skipped.
|
|
|
|
## Project Scoping (Optional)
|
|
|
|
To scope all operations to a specific project, add the `x-sm-project` header:
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"supermemory": {
|
|
"url": "https://mcp.supermemory.ai/mcp",
|
|
"headers": {
|
|
"x-sm-project": "your-project-id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
This keeps memories organized by project, useful when working on multiple codebases or contexts.
|
|
|
|
## Client-Specific Setup
|
|
|
|
### Claude Desktop
|
|
|
|
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"supermemory": {
|
|
"url": "https://mcp.supermemory.ai/mcp"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Cursor
|
|
|
|
Add to `~/.cursor/mcp.json`:
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"supermemory": {
|
|
"url": "https://mcp.supermemory.ai/mcp"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Or use the one-click install button at [app.supermemory.ai](https://app.supermemory.ai).
|
|
|
|
### Windsurf / VS Code
|
|
|
|
Configuration varies by extension. Generally, add the server URL (`https://mcp.supermemory.ai/mcp`) to your MCP settings.
|
|
|
|
## Using the MCP Server
|
|
|
|
Once configured, the MCP server provides three main tools:
|
|
|
|
### `memory` Tool
|
|
|
|
Save or forget information about the user:
|
|
|
|
```json
|
|
{
|
|
"content": "User prefers dark mode and uses TypeScript",
|
|
"action": "save",
|
|
"containerTag": "optional-project-tag"
|
|
}
|
|
```
|
|
|
|
The AI assistant will automatically use this tool when:
|
|
- You explicitly ask it to remember something
|
|
- It detects important preferences or patterns in conversation
|
|
|
|
### `recall` Tool
|
|
|
|
Search memories and get user profile:
|
|
|
|
```json
|
|
{
|
|
"query": "What are the user's programming preferences?",
|
|
"includeProfile": true,
|
|
"containerTag": "optional-project-tag"
|
|
}
|
|
```
|
|
|
|
The AI assistant will automatically use this tool when:
|
|
- You ask about past conversations or preferences
|
|
- It needs context from previous interactions
|
|
- It wants to provide personalized responses
|
|
|
|
### `whoAmI` Tool
|
|
|
|
Get information about the current logged-in user:
|
|
|
|
```json
|
|
{}
|
|
```
|
|
|
|
Returns your userId, email, name, client information, and sessionId.
|
|
|
|
## Resources
|
|
|
|
The MCP server also provides resources that can be accessed directly:
|
|
|
|
- **`supermemory://profile`** - Your user profile with stable preferences and recent activity
|
|
- **`supermemory://projects`** - List of your available memory projects
|
|
|
|
## Prompts
|
|
|
|
The server provides a `context` prompt that injects your user profile and preferences into the system context, allowing the AI to be aware of your preferences from the start of each conversation.
|