MCP Server & History Recall
Stravia serves a Streamable HTTP Model Context Protocol (MCP) endpoint at /mcp and supports read-only History recall (stravia://history/) via transparent API key injection.
Prerequisites
- Active API key:
- Enable MCP access (
mcp_access_enabled) to authorize/mcpconnections. - Enable Transparent tool injection with
history_recallselected to let inference turns query past interactions.
- Enable MCP access (
- Configured capability backends: Tools appear in
tools/listonly when both the platform capability and key permission are enabled.
Steps
Connect an MCP client to
/mcpOpen Setup → Connect clients and switch to the MCP tab to copy the endpoint URL (
http://127.0.0.1:23471/mcpor your public HTTPS reverse proxy URL), check whether your selected API key has MCP access enabled, and copy ready-to-usemcpServersJSON orcURLsnippets withAuthorization: Bearer <your-api-key>. Stravia validates the key's spend limit and RPM before servingtools/listandtools/call.Use the
StraviaReadbodyinput formatStraviaReadtakes only two top-level keys: requiredpathand an optionalbodyobject (question,attachments,allowed_domains,wait). Legacy flat arguments (allowed_domainsorwaitat the top level) are rejected:{ "path": "stravia://search", "body": { "question": "Stravia v0.7.8 release notes", "allowed_domains": ["github.com"] } }jsonFor slow tool executions that return
stravia://tool-executions/<id>after the 60-second synchronous wait window, poll the execution handle withStraviaReadandbody.wait(canceling the read request stops waiting without canceling the running tool execution).Enable History Recall (
stravia://history/)When
history_recallis enabled under an API key's Transparent tool injection settings, models can search and inspect prior interactions belonging to that same API key:URI pattern Contents stravia://history/Conversation threads for the caller's API key, newest activity first stravia://history/<root-id>/Individual turns inside a thread, ordered chronologically stravia://history/<root-id>/<interaction-id>Full transcript for a single turn stravia://history/<root-id>/<interaction-id>/tools/<n>1-indexed arguments and output for tool call n(as retained)- Directories and transcripts support
body.questionsearch; tool files can be read directly by range/cursor (:rawand:downloadare not supported on history paths), and tool outputs are excluded from the search index. - History recall is read-only and never exposed over
/mcpor explicitStraviaReadcalls outside transparent injection.
Retention, gaps, and shared-key privacyHistory recall reads from Request history (
Interaction Observation), so entries obeylog_retention_days(default 7 days) and manual clears. Anyone sharing the same API key can inspect prior prompts and tool results recorded under that key, and recalled web/tool text remains untrusted input.- Directories and transcripts support
Verify
Send an MCP tools/list request with your API key and confirm only enabled capabilities appear; for history_recall, run two turns under the same API key and ask the model to look up a detail from the earlier turn.
Troubleshooting
- MCP returns
401or emptytools/list: Confirmmcp_access_enabledis checked on the API key and the underlying capability (e.g., Web search or Media generation) is enabled and valid. StraviaReadrejectsallowed_domainsorwait: Movequestion,attachments,allowed_domains, andwaitinside the nestedbodyobject.
Next
- Web Search & Fetch — configure the backend behind
StraviaSearchandstravia://search. - Media Understanding & Generation — configure
StraviaInspectMediaandStraviaGenerateImage.