Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

Run Telys as a Model Context Protocol server so AI clients like Claude Desktop and Cursor can search and write on-device memory through 19 tools covering the full memory surface.

telys mcp runs Telys as a Model Context Protocol (MCP) server over stdio, exposing the full Telys memory surface — 19 tools — to any MCP client. Point Claude Desktop, Cursor, Codex, or your own agent at it and the model gains a durable, on-device memory it can search, write, maintain, and index in natural language — no code, nothing leaving the machine. Introspection (initialize/tools/list) needs no credentials; tool execution requires the one-time free telys login (free community license) — fully offline thereafter.

telys mcp

The command starts a JSON-RPC 2.0 server named telys on stdin/stdout, speaking protocol version 2025-06-18. It runs in the foreground, prints nothing, and waits for a client. You rarely run it by hand — the client spawns it from the config on the client pages. Pass --path to override where memory lives (see below).

The MCP server drives the same signed native runtime as the SDK, so install and verify the runtime first. Run telys login (or telys runtime install), then telys runtime verify. Without the runtime, every tool call errors. See Verify your install.

The store and the embedder

The server reads and writes one on-disk memory directory and uses one built-in embedder. Both are fixed so an assistant works with zero configuration.

Setting
Value
How to change it

Memory directory

$TELYS_MEMORY_PATH, else ~/.telys/memory

Set TELYS_MEMORY_PATH in the client's env, or pass --path in args

Default embedder

AlgentaMultigramEmbedder (384-d hint)

Not configurable over MCP — use the SDK for other embedders

Partition key

scope (see auto-created collections below)

partition_by argument on telys_create_collection

The default embedder is lexical (multigram-hash) and needs the native kernel that ships with the runtime. Its dimension comes from the kernel; 384 is a hint, not a hard constant. For dense or bring-your-own embedders, drive Telys from the SDK — the MCP surface is deliberately fixed.

The tools at a glance

The server registers 19 tools — a full replica of the SDK surface that makes sense for a text-mode LLM caller: CRUD, filtered queries, lexical search, compaction / IVF / tuning, plus a repo auto-indexer.

Tool
What it does
Required arguments
Returns

Semantic + lexical search over a Telys memory collection

collection, query

{ collection, query, hits: [{ id, score, metadata? }] }

Add text documents to a Telys memory collection (created if absent)

collection, texts

{ added, collection }

Create a Telys memory collection

name

{ created, dim, partition_by }

List Telys memory collections

—

{ collections: [...] }

Stats for a Telys memory collection

collection

{ collection, stats: {...} }

telys_upsert

Add-or-replace text rows by id (versioned update; never a duplicate physical row)

collection, texts, ids

{ upserted, collection }

telys_update

Replace the vector/metadata of EXISTING ids by re-embedding new texts

collection, texts, ids

{ updated, collection }

telys_delete

Tombstone rows by external id so they no longer appear in queries

collection, ids

{ deleted, collection }

telys_ids

Return live external ids in a collection, optionally scoped by a where filter

collection

{ collection, ids: [...] }

telys_count

Return the live row count (post-tombstone) for a collection, optionally where-scoped

collection

{ collection, count }

telys_get

Exact row lookup by external id (no similarity search); for auto-indexed repo rows it re-reads the exact source slice from disk

collection, ids

{ collection, rows: [{ id, found, metadata?, text? }] }

telys_search_lexical

On-device BM25 lexical search (requires the collection to have been created with lexical=True + telys_build_lexical run)

collection, query

{ collection, query, hits: [{ id, score, metadata? }] }

telys_compact

Flush tombstones + merge delta segment into the base layout

collection

{ compacted }

telys_build_ivf

Build per-partition IVF indexes; calibrates nprobe to a recall floor

collection

{ ivf_built, min_rows, target_recall }

telys_build_lexical

Fit BM25 lexical index over retained tokens (needs lexical=True at create-time)

collection

{ lexical_built, k1, b }

telys_tune

Produce (and optionally apply) a TuningPlan via the collection's Tuner

collection

{ collection, plan }

telys_index_repo

Walk a repo directory (respects .gitignore on git checkouts), chunk each text file, and ingest into a collection — idempotent + incremental

—

{ status, collection, repo_id, files_tracked, ... }

telys_repo_search

Search the auto-indexed repo collection; re-indexes the server workspace on every call, so results are always fresh

query

{ collection, query, index_status, hits }

telys_workspace_info

Report the server's configured workspace, repo_id, indexed collection, and file count

—

{ workspace, repo_id, collection, files_tracked, persistent_index }

telys_search also takes an optional top_k (default 5) and a where filter. The filter is a single-key equality object, e.g. {"tenant_id": "acme"} — no multiple keys, ranges, or boolean operators. The SDK exposes the same equality model through Eq. telys_add takes optional ids and metadata arrays; an auto-created collection uses partition_by="scope" and is saved to disk. Every mutating tool — telys_add, telys_upsert, telys_update, telys_delete, telys_compact, telys_build_ivf, and telys_build_lexical — persists the store to disk after the operation.

How a call looks on the wire

A client initializes the session, then calls a tool by name with its arguments:

Every result uses the standard MCP content envelope: the tool's JSON payload is returned as a text block, and isError reports success:

On failure, isError is true and the text block carries a "<Type>: <message>" string (for example ValueError: collection 'notes' does not exist (create it first)). Clients surface that string as the tool result, so the model can read and react to the error.

When to use MCP vs the SDK

Use MCP when a person talks to an AI assistant that should remember and recall across turns and sessions. Use the SDK when your own code needs full control.

  • Give Claude Desktop, Cursor, or Codex long-term memory it manages itself.

  • Natural-language, no-code: the model picks the tool and fills the arguments.

  • The full memory surface — CRUD, filtered queries, lexical search, maintenance, and repo auto-indexing — with every mutating tool persisted to disk.

  • Fully on-device and offline after the one-time free telys login (device authorization); no API key in the client config.

Start at Install the MCP server.

  • You need raw-vector add/search, snapshots, or apply_tuning.

  • You want dense or bring-your-own embeddings, or precise Eq filtering.

  • You are building an application, batch pipeline, or a remote serve deployment.

Start at Quickstart: your first collection.

Both share the same on-disk format, so a collection built over MCP is readable from the SDK and vice versa — point both at the same memory directory.

Next steps

Last updated

Was this helpful?