> For the complete documentation index, see [llms.txt](https://docs.telys.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.telys.ai/cli/mcp.md).

# telys mcp

Reference for telys mcp — run the stdio MCP server (with optional traffic auditing), or install, uninstall, and inspect its configuration in Claude, Cursor, Codex, Claude Desktop, and Qwen Code.

Run Telys as an MCP (Model Context Protocol) server so an assistant can search and write your on-device memory, and manage its configuration in supported clients. The server speaks JSON-RPC 2.0 over stdio (protocol version `2025-06-18`) and exposes 19 tools over a single memory store.

## Synopsis

```
telys mcp [--path PATH] [--workspace DIR] [--persistent-index] [--monitor] [--monitor-log PATH]   # run the stdio server
telys mcp install   [--name NAME] [--client CLIENT] [--scope SCOPE]
telys mcp uninstall [--name NAME] [--client CLIENT] [--scope SCOPE]
telys mcp status    [--name NAME]
```

## `telys mcp` (run the server)

Bare `telys mcp` runs the server in the foreground over stdio. Clients launch it themselves; you rarely run it by hand except to smoke-test.

| Flag                 | Value | Default                                   | Meaning                                                                                                                                             |
| -------------------- | ----- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--path`             | dir   | `$TELYS_MEMORY_PATH` or `~/.telys/memory` | Memory store the server operates on.                                                                                                                |
| `--workspace`        | dir   | `$TELYS_MCP_WORKSPACE`, else none         | Repo root the auto-indexer maps for `telys_repo_search`. When unset, the LLM must pass `path` per call to `telys_index_repo` / `telys_repo_search`. |
| `--persistent-index` | flag  | off                                       | Persist the auto-index fingerprint cache under the memory dir so a restart skips re-embedding an unchanged repo.                                    |
| `--monitor`          | flag  | off                                       | Append every JSON-RPC request/response to `<memory dir>/mcp-monitor.jsonl` — audit which tools the assistant host actually calls.                   |
| `--monitor-log`      | file  | `<memory dir>/mcp-monitor.jsonl`          | Where `--monitor` writes (implies `--monitor`).                                                                                                     |

```bash
telys mcp                      # serve the default memory store over stdio
telys mcp --path ./project-memory
telys mcp --workspace ~/src/myrepo   # map a repo for telys_repo_search
telys mcp --monitor                  # audit host tool usage to mcp-monitor.jsonl
```

Each monitor line is JSON: `{"ts": <unix>, "dir": "in"|"out", "msg": <json-rpc message>}`. Writes are best-effort — auditing never breaks the server, and the served byte stream is unchanged.

It exposes 19 tools — a full replica of the SDK's text surface: CRUD, filtered queries, lexical search, maintenance, and a repo auto-indexer (full list in the [MCP overview](/mcp/overview.md#the-tools-at-a-glance)) — and uses the on-device multigram lexical embedder by default. `where` filters accept a single-key equality object only.

## `telys mcp install`

Write launcher configuration so a client starts `telys mcp` automatically.

| Flag       | Value                                                                  | Default | Meaning                                                    |
| ---------- | ---------------------------------------------------------------------- | ------- | ---------------------------------------------------------- |
| `--name`   | string                                                                 | `telys` | Server name to register in the client.                     |
| `--client` | `claude` \| `cursor` \| `codex` \| `claude-desktop` \| `qwen` \| `all` | `all`   | Which client(s) to configure.                              |
| `--scope`  | `user` \| `project`                                                    | `user`  | Configure the current user globally, or just this project. |

{% tabs %}
{% tab title="All clients" icon="plug" %}

```bash
telys mcp install
```

Registers a `telys` server in every supported client found on this machine.
{% endtab %}

{% tab title="One client, project scope" icon="folder" %}

```bash
telys mcp install --client cursor --scope project
```

Writes project-scoped config, available only inside the current project.
{% endtab %}

{% tab title="Custom name" icon="tag" %}

```bash
telys mcp install --name work-memory --client claude-desktop
```

Registers the server under a custom name — useful when you run more than one store.
{% endtab %}
{% endtabs %}

## `telys mcp uninstall`

Remove the configuration written by `install`. Match the same `--name`, `--client`, and `--scope` you installed with.

```bash
telys mcp uninstall --client cursor --scope project
telys mcp uninstall            # remove the default `telys` server everywhere
```

## `telys mcp status`

Report where the server is currently configured.

| Flag     | Value  | Default | Meaning                  |
| -------- | ------ | ------- | ------------------------ |
| `--name` | string | `telys` | Server name to look for. |

```bash
telys mcp status
telys mcp status --name work-memory
```

{% hint style="info" %}
The MCP server reads and writes `$TELYS_MEMORY_PATH` (or `~/.telys/memory`), and the repo auto-indexer maps `$TELYS_MCP_WORKSPACE` (or `--workspace`). For an isolated per-client store, install with a distinct `--name` and launch it with `--path`.
{% endhint %}

## Exit codes

| Code | Meaning                                                       |
| ---- | ------------------------------------------------------------- |
| `0`  | Server ran, or the install/uninstall/status action succeeded. |
| `1`  | Runtime not available, or the requested client was not found. |
| `2`  | Usage error (an invalid `--client` or `--scope`).             |

## See also

* [MCP overview](/mcp/overview.md) — what the server does and its 19 tools.
* [Install the MCP server](/mcp/install-server.md) — the guided walkthrough.
* [Claude Desktop](/mcp/client-claude-desktop.md) and [Cursor & VS Code](/mcp/client-cursor-vscode.md) — per-client setup.
* [MCP configuration & scoping](/mcp/configuration-and-scoping.md) — user vs. project scope in depth.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.telys.ai/cli/mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
