Anthropic API (no MCP)
You don't need an MCP-capable IDE to use Mneva. If you're building directly against the Anthropic SDK (or any LLM SDK), call the REST API yourself and feed the results back as tool results in your message loop.
Why bother
- You're building your own coding agent and want a memory layer
- You're running headless / scripted / CI-style agents
- You want to mix Mneva with other tools your agent uses, without an MCP wrapper
Pattern
Standard Anthropic tool-use loop:
- Define a tool schema for each Mneva endpoint you want to expose
- When Claude returns a
tool_useblock, call the corresponding/v1/*endpoint - Pass the JSON response back as the
tool_result - Continue the loop
The 16 tool schemas are documented under MCP Tools. Schemas there are zod; converting to JSON Schema for the Anthropic SDK is mechanical.
A minimal example
The Mneva side is plain HTTP — one POST per tool call your agent makes:
curl -X POST https://mneva.dev/v1/remember \
-H "x-mneva-key: $MNEVA_KEY" \
-H "content-type: application/json" \
-d '{"text":"<what to remember>"}'
curl -X POST https://mneva.dev/v1/recall \
-H "x-mneva-key: $MNEVA_KEY" \
-H "content-type: application/json" \
-d '{"query":"<what to recall about>"}'
The Anthropic loop is the standard tool-use shape — see the Anthropic tool-use docs for the canonical pattern. In short:
- Declare a tool schema per Mneva endpoint you want to expose (JSON Schema shape).
- Pass
tools=[...]tomessages.create(...). - When the response has
stop_reason == "tool_use", walkresp.content. For eachtool_useblock, POST tohttps://mneva.dev/v1/+ the tool name, with the block's input as the JSON body, and append atool_resultcontent block back. - Continue the loop until
stop_reason != "tool_use".
Each tool schema lines up with one /v1/* endpoint documented under REST API. The pattern works for any LLM SDK that supports tool use — the schema shape and loop are SDK-specific; the Mneva side is HTTP regardless.