The MCP adapter uses JSON-RPC 2.0 over stdio and calls RelinkRuntime for every operation.
npm run cli -- mcp --file sample.jsonClient configuration:
{
"mcpServers": {
"relink": {
"command": "relink",
"args": [
"mcp",
"--file",
"sample.json"
]
}
}
}The launching process can provide model configuration through RELINK_MODEL_* environment variables, or a caller can pass modelConfig to relink_run.
Runs the model-directed Agent. Arguments include prompt, optional messages, scope, mode, modelConfig, runId, resumeFromRunId, and conversationId. The result includes answer, chunks, progress, state, and the research trace.
When a caller supplies runId, it can cancel an active request through standard notifications/cancelled using the JSON-RPC requestId, or call relink_abort.
Returns entity, interaction, relationship-session, and time-coverage statistics exposed by the Provider.
Returns stable relationship sessions. Use a returned username as scope.sessionId when selecting a session.
Calls Provider text search. Arguments include text, sessionId, from, to, limit, and offset.
Uses action with list, get, or replay for auditing, recovery, and replay without another model call.
Aborts an active runId and retains a resumable snapshot.
Uses action with list, get, create, save, rename, metadata, or delete to manage conversations in dataDir.
Uses action with list, get, summary, create, update, delete, revise, refresh, enable, or clear. Automatic memory stores stable preferences and working styles, not relationship facts as user preferences.
Uses action with list, save, delete, summary, or synthesize. Once enough useful samples exist, aggregated feedback can adjust long-term answer preferences.
Generates a short conversation title. If model configuration is unavailable or generation fails, it returns a deterministic local title without affecting the primary run.
MCP clients should retain state.research.readPages, tool calls, and the final answer as one evidence chain. Present uncertainty and Provider-supplied scope limitations with the answer.
The integrating application is responsible for data authorization, model-secret protection, and tenant isolation.