MCP server
Connect an AI client to Smritea with the smritea-mcp server. Log in, pick an app, and give the client memory tools.
The Smritea MCP server lets an AI client store and search memories through tools. MCP is the Model Context Protocol, a standard way for AI clients to call external tools. The server is the smritea-mcp npm package. It needs Node 18 or later.
You do not install it globally. Your client runs it with npx.
Log in
-
Run the login command in a terminal.
npx -y smritea-mcp login -
Finish the sign-in in the browser window that opens. The command waits up to five minutes.
The login saves your tokens in ~/.smritea/auth.json. Treat that file as a secret. Tokens refresh by themselves. If a refresh fails with a 401, run login again.
Connect your client
Claude
For Claude Code, add the server to the mcpServers section of ~/.claude.json:
{
"mcpServers": {
"smritea": {
"command": "npx",
"args": ["-y", "smritea-mcp", "serve"]
}
}
}You can also install the Claude Code and Cursor plugin, which ships this configuration.
Cursor
Cursor connects to the server over HTTP and server-sent events.
-
Start the server in a terminal and leave it running.
npx -y smritea-mcp serve-sseThe default port is 3000. Pass another port as an argument.
-
Add the server to
~/.cursor/mcp.json:{ "mcpServers": { "smritea": { "url": "http://localhost:3000/sse" } } }
The serve-sse server has no authentication, and it listens on every network interface. Run it only on a machine you trust, and block its port from other machines.
Pick an app
The memory tools work on one app at a time. In your AI client, ask it to use the list_apps tool, then the select_app tool with the app ID you want.
If the selected app has no stored key, select_app creates one for you. The server names the key smritea-plugin- followed by today's date. It counts against your plan's API key limit.
Tools
The table lists the tools the server offers, what each one does, and the input each one requires.
| Tool | What it does | Required input |
|---|---|---|
add_memory | Stores a memory. | content |
search_memories | Searches memories. | query |
get_memory | Returns one memory. | memory_id |
delete_memory | Deletes one memory. You cannot undo it. | memory_id |
select_app | Chooses the app for the other tools. | app_id |
list_apps | Lists your apps. | None |
The server also offers a prompt named recall. It takes a topic.
add_memory accepts optional scope fields: actor_id, actor_type, actor_name, conversation_id and source_type. It also accepts metadata and event_occurred_at. If you leave out actor_id, the server uses your sign-in email. If you set a project name, the server adds it to each memory's metadata as project_name.
search_memories accepts the scope fields, participant_ids, limit, graph_depth, from_time, to_time, valid_at and metadata_filter. It does not offer method or reranker_type. The same limits as the SDK apply. See Memory scope and Time-aware memory.
Set your name and project
Run the setup wizard in a terminal to choose an app, your name, a project name and up to three tags.
npx -y smritea-mcp configureSettings files
The server reads two files. The table says what each file holds and whether you can share it.
| File | Holds | Share it? |
|---|---|---|
~/.smritea/auth.json | Tokens, your email and each app's API key. | No. Keep it secret. |
settings.json | The selected app, base URLs, project name, your name and tags. | Yes. It holds no secret. |
The server calls the United States region by default. If your app is in India, set memory_base_url in settings.json to https://api-in.smritea.ai. See Regions.
Commands
The table lists the smritea-mcp commands and what each one does.
| Command | What it does |
|---|---|
smritea-mcp serve | Runs the server over standard input and output. This is the default. |
smritea-mcp serve-sse [port] | Runs the server over HTTP and server-sent events. |
smritea-mcp login | Signs you in through the browser. |
smritea-mcp configure | Starts the setup wizard. |
The old init command no longer exists.
Related pages
Last updated on



