Vilix
← Back to docs
Reference

How the Vilix MCP works

A plain-English overview of the Vilix MCP — connection URL, OAuth sign-in, and the two tools your AI uses to read and write your memory. With a developer reference for connecting your own MCP client.

Vilix is a memory layer that any MCP-capable AI tool can read from and write to. This page explains how that connection actually works — first in plain English for anyone using Vilix, then in more detail for developers building their own MCP client.

Part 1 — The overview

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI tools like ChatGPT, Claude, Cursor, and Perplexity talk to outside services through a single uniform interface. Instead of every AI app inventing its own plugin system, MCP gives them all a common language for connecting to memory, files, calendars, databases, and other services.

Vilix exposes a memory layer through MCP. When your AI tool is connected to Vilix, it can pull context from your past conversations before it answers you — and save the new exchange after.

What Vilix exposes

The whole Vilix MCP surface is two tools:

  • get_context — your AI calls this before it replies. It passes the user’s latest message. Vilix runs retrieval and returns recent messages, related memories, related past conversations, and any active instructions you’ve set.
  • save_turn — your AI calls this after it generates the final reply, before sending it to you. It passes the user message, the assistant message, and a source label (which tool the exchange happened in). Optionally, it reuses the chat_id from an earlier save so the conversation stays grouped.

That’s it. Two calls. Read before, write after.

The flow

user message
  → get_context(user_prompt)
    → recent_messages, user_memories, related_conversations, instruction
  → AI generates reply (using that context)
  → save_turn(user_message, assistant_message, source, chat_id?)
  → reply is sent to the user

How you connect

Vilix uses OAuth — there’s no token to generate, copy, or paste. The setup for any MCP-capable AI tool is the same three steps:

  1. Open your AI tool’s MCP / integrations settings.
  2. Paste the Vilix MCP URL.
  3. Approve the OAuth sign-in prompt in your browser.

That’s the entire setup. From then on, the tool stays connected and your memory follows you wherever you use it.

The URL

That single URL is everything an MCP client needs to find Vilix and start the OAuth flow.

MCP URLurl
https://api.getvilix.com/mcp/sse

Per-tool screenshots and walk-throughs for Claude, ChatGPT, Cursor, and Perplexity live on the Get started page.

Part 2 — For developers

If you’re building or configuring an MCP client and you want to integrate with Vilix directly, this section has the protocol-level details.

Transport

Vilix speaks MCP over HTTP with Server-Sent Events (SSE).

MethodPathPurpose
GET/mcp/sseServer-to-client SSE stream
POST/mcp/messages/...Client-to-server JSON-RPC messages
GET/mcp/healthLiveness probe (no auth required)

Base host: https://api.getvilix.com.

stdio transport is not supported — Vilix is a hosted service, so a remote HTTP transport is the only mode.

Protocol

Standard JSON-RPC 2.0 as defined by the Model Context Protocol specification. There is no custom envelope and no proprietary extension fields. If your MCP client speaks the spec, it speaks to Vilix.

Authentication

Vilix uses OAuth 2.0. Every request to the MCP endpoints must carry:

Authorization: Bearer <access_token>

You get that access token by walking through the OAuth sign-in flow. If your MCP client supports OAuth (ChatGPT, Claude.ai, Cursor, Perplexity all do), discovery is automatic — you just point the client at the MCP URL and it handles authorization, token exchange, and refresh on its own.

A few things worth knowing:

  • No API keys. There is no static “Vilix API key” you generate and paste. Authentication is OAuth and only OAuth on the MCP endpoints.
  • Refresh is handled by the client. OAuth access tokens are short-lived. MCP clients exchange the refresh token automatically when the access token expires — you don’t have to do anything.
  • Expired tokens return 401. If you ever see a 401, the fix is to re-run the OAuth sign-in flow.

Tool reference

get_context

Call this before generating a reply. Vilix runs retrieval and returns the context your AI should use to ground the answer.

Input:

FieldTypeRequiredNotes
user_promptstringyesThe user’s latest message. Pass it verbatim — Vilix handles its own retrieval.

Output: A text content block describing recent messages, user memories, related past conversations, and any active instruction memories. The shape is intentionally simple — your AI consumes it as context, the same way it consumes a system prompt.

save_turn

Call this after you’ve generated the final assistant reply, before sending it to the user. Persists the exchange and triggers Vilix’s memory extraction in the background.

Input:

FieldTypeRequiredNotes
user_messagestringyesThe user’s message for this turn.
assistant_messagestringyesYour final reply for this turn.
sourcestringyesWhich tool the exchange happened in (e.g. "ChatGPT", "Claude", "Cursor").
chat_idstringnoReuse the chat_id returned by an earlier save_turn in the same conversation so the turns stay grouped. Omit it for the first turn.

Output: An acknowledgement that includes the chat_id for the conversation. Pass that chat_id back on subsequent save_turn calls in the same chat.

Example request and response

A typical get_context call over JSON-RPC:

Request

POST /mcp/messages/... HTTP/1.1
Host: api.getvilix.com
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_context",
    "arguments": {
      "user_prompt": "Continue helping me with my launch plan."
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{ recent_messages: [...], user_memories: [...], related_conversations: [...], instruction: \"...\" }"
      }
    ]
  }
}

The response is intentionally returned as a single text block so any MCP-capable model can consume it as context regardless of how it handles structured tool output.

Health check

GET https://api.getvilix.com/mcp/health

Returns 200 OK when the service is up. No Authorization header required. Use it for uptime monitoring or as a connection smoke test.

Errors

StatusWhenWhat to do
401 UnauthorizedMissing, invalid, or expired bearer token.Re-run the OAuth sign-in flow in your MCP client.
403 Forbidden / tool-level subscription_requiredAccount is on an expired trial or otherwise lacks an active entitlement. Response includes an upgrade_url.Open the upgrade_url to renew, or wait until the trial resets.
503 Service UnavailableVilix is temporarily unavailable.Retry with backoff.

Vilix does not apply a per-request rate limit today. Access to the tools is gated by your account’s subscription/trial status, not by request volume.

Best practices

  • Call order matters. get_context before you compose the reply; save_turn after the reply is finalized but before you send it to the user. Returning a reply without saving it leaves your memory thin.
  • Reuse chat_id. Within a single conversation, capture the chat_id from the first save_turn and pass it back on every later save_turn in that chat. This keeps turns grouped for retrieval.
  • Set source honestly. It’s the label Vilix uses to mark where a memory came from — useful when retrieval surfaces past context and the model needs to know whether something happened in ChatGPT, Claude, Cursor, etc.
  • Don’t paraphrase the user message into get_context. Pass user_prompt verbatim. Vilix’s retrieval is tuned for the raw input.
  • Use a system-prompt to enforce the pattern. The recommended prompt that wires get_context / save_turn into a model’s reply cycle is on the Get started page.

Part 3 — Where to go next

  • Get started — per-tool setup steps for Claude, ChatGPT, Cursor, and Perplexity, plus the system prompt that enforces the call order.
  • Using the Vilix dashboard — a walkthrough of app.getvilix.com: search, export, deletion, plan and billing.
  • Security — data handling, isolation, export, and deletion.

Need help?

Email support@getvilix.com for setup help, connection issues with ChatGPT / Claude / Cursor / Perplexity, billing, or account questions.

For vulnerability reports or security concerns, write to security@getvilix.com.

Need help? Email support@getvilix.com for setup, connection issues with ChatGPT / Claude / Cursor / Perplexity, billing, or account questions. For vulnerability reports or security concerns, write to security@getvilix.com.