# evc-team-relay-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/entire-vc/evc-team-relay-mcp  
**GitHub Stars:** 3  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/evc-team-relay-mcp

## Description
Give AI agents read/write access to your Obsidian vault via MCP

## Tools
Capabilities this server exposes over MCP:

- **authenticate** — Check which auth mode is active (agent key or email/password) and log in if needed.

    Takes no arguments; call it first, once, before any other tool.

    In agent-key mode (RELAY_AGENT_KEY or RELAY_AGENT_KEYS is set): no login
    is needed — each request carries X-Agent-Key directly, this just reports
    which mode is active.

    In email/password mode: logs in with the RELAY_EMAIL and RELAY_PASSWORD
    env vars. The resulting token is managed internally; subsequent tool
    calls use it automatically — you never need to pass it yourself.
    
- **list_shares** — List the shared folders and documents this key or account can access.

    Only lists what auth mode/key was granted — it does not create or change
    access. Example: `list_shares(kind="folder")`.

    In multi-key mode (RELAY_AGENT_KEYS set): returns metadata for every share
    that has a configured key, fetched via per-share agent-key auth.

    RELAY_AGENT_KEYS is typically keyed by share UUID, but the bare
    share-metadata endpoint (/v1/web/shares/{ref}) only resolves web slugs —
    a UUID always 404s there. When that happens this falls back to the
    UUID-addressable files-index endpoint, which proves the share is real
    and reachable but can't report kind/path/visibility (reported as
    kind="unknown", plus a file_count instead).

    A per-share failure (bad key, wrong share, share genuinely gone) is
    NEVER silently dropped — it lands in the response's `errors` field.
    "Couldn't check this share" and "checked, it doesn't exist" must stay
    distinguishable; collapsing both into an empty list is what let a
    config/auth problem read as "you have no shares".

    In single-key mode (RELAY_AGENT_KEY only): returns an empty list — the
    single key is tied to one share but its identity is unknown; call list_files
    or tr_search directly with the known share_id.

    In email/password mode: returns all shares the user has access to.

    Args:
        kind: Filter by share type — "doc" or "folder". Empty for all.
        owned_only: If true, only return shares owned by the user (email/password mode only).

    Returns:
        On full success: a bare JSON array of shares (id, kind, path,
        visibility, user_role — or id/kind="unknown"/file_count for
        UUID-resolved entries).
        If any share failed to resolve: a JSON object
        {"shares": [...], "errors": {share_ref: "reason"}} instead of a
        silently-shortened array.
    
- **list_files** — List every file in a shared folder with its metadata.

    Read-only; does not download file contents (use read_file for that).

    In agent-key mode (RELAY_AGENT_KEYS or RELAY_AGENT_KEY is set): uses the
    agent-key endpoint; share_id may be a UUID or web slug.

    In email/password mode: share_id must be a UUID.

    Args:
        share_id: UUID or web slug of the folder share, e.g.
            "a1b2c3d4-..." or "research-vault".

    Returns:
        Object with share_id and files map (path -> metadata). The exact set
        of metadata keys per file is server-controlled, hence the loose
        dict[str, Any] shape rather than a strict per-field schema.
    
- **tr_search** — Find files in a shared folder by a case-insensitive match on path or name.

    Read-only; does not download file contents (use read_file for that).
    Example: `tr_search(share_id="research-vault", query="roadmap")`.

    In agent-key mode (RELAY_AGENT_KEY is set): share_id may be UUID or web slug.
    In email/password mode: share_id must be a UUID.

    Args:
        share_id: UUID or web slug of the folder share.
        query: Search string matched case-insensitively against file paths.
        limit: Max results to return (default 20).

    Returns:
        JSON list of matching files:
        [{"id": doc_id_or_null, "title": filename_without_ext, "path": full_path,
          "relay_url": "relay://<slug>/<path>", "updated_at": null}]
    
- **read_file** — Read one file from a shared folder by its path.

    Read-only. Returns the full file content in one response — there is no
    partial/range read.

    In agent-key mode (RELAY_AGENT_KEY is set): fetches via the agent-key
    download endpoint; share_id may be a UUID or web slug.

    In email/password mode: fetches via the same CAS download endpoint used by
    agent-key mode, over Bearer JWT instead of X-Agent-Key; share_id must be a UUID.

    Args:
        share_id: UUID or web slug of the folder share.
        file_path: File path within the folder (e.g. "Marketing/plan.md").

    Returns:
        {"path", "content", "format"} on success, or {"error": ...} if the
        file doesn't exist — two distinct shapes on the same 200-equivalent
        outcome, hence dict[str, Any] rather than a strict per-field schema
        (a stricter schema would reject the error shape as invalid output).
    
- **read_document** — Reserved for live document content; not yet available on the server, use read_file.

    Always raises: the control-plane has no REST route for reading a
    document's live content by ID for either DOC-kind shares or a
    folder-share file's doc_id (that concept doesn't exist in the current
    CAS-based folder sync model). This is a genuine backend gap, not an
    agent-key-vs-JWT restriction. Use read_file for folder shares instead —
    it works in both agent-key and JWT mode.

    Args:
        share_id: UUID of the share (for ACL check).
        doc_id: Document UUID. Defaults to share_id for doc shares.
        key: Yjs shared type key. Default "contents".
    
- **upsert_file** — Create or overwrite a file in a shared folder; it syncs into subscribers' vaults. Agent key only.

    **Write access is agent-key-only by design** — this is the sanctioned,
    permanent policy (not a temporary gap): agent-key mode is the only
    authorized write path in this MCP server.

    **Agent key mode** (RELAY_AGENT_KEY is set):
    - share_id may be the share UUID or web slug (e.g. "research-vault")
    - Folder shares use /sync-upload → file enters the CRDT sync store and
      appears in subscribers' local Obsidian vaults on the next sync cycle
    - Doc shares fall back to /upload (web-publish only)
    - list_files, read_file, and tr_search also work with the same agent key

    **Email/password (JWT) mode** — always raises; intentionally read-only.
    There is no write route reachable by JWT for an arbitrary (non-web-
    published) folder share, and even if one existed, JWT mode stays
    read-only by policy. Use agent-key mode for writes.

    Args:
        share_id: Share UUID (email/password mode) or web slug (agent key mode).
        file_path: File path within the share (e.g. "notes/todo.md").
        content: Full text content to write.

    Returns:
        Object with path, size/operation, and optional public_url (agent-key
        mode). The exact set of keys is server-controlled (plus the
        "operation" key added here), hence dict[str, Any].
    
- **write_document** — Reserved for live document writes; not yet available on the server, use upsert_file.

    Always raises: the control-plane has no REST route for writing a
    document's live content by ID (doc-share content is CRDT/WebSocket-only).
    This is a genuine backend gap in BOTH agent-key and JWT mode, not an
    agent-key-vs-JWT restriction — but were a route ever added, per the
    sanctioned write policy (agent-key writes only) JWT mode would still be
    read-only.

    Args:
        share_id: UUID of the share (for ACL check).
        doc_id: Document UUID.
        content: Full text content to write (replaces entire document).
        key: Yjs shared type key. Default "contents".
    
- **delete_file** — Reserved for per-file deletion; not yet available on the server.

    Always raises: the control-plane has no DELETE route for an individual
    folder-share file in ANY auth mode (agent-key or JWT) — this isn't a
    JWT-vs-agent-key gap, per-file deletion simply isn't implemented
    server-side yet. Note this is independent of the agent-key-only write
    policy that governs upsert_file: even once/if a delete route lands, it
    would follow that same policy (agent-key-only, JWT read-only).

    Args:
        share_id: UUID of the folder share.
        file_path: File path within the folder (e.g. "old-note.md").
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "evc-team-relay-mcp": {
    "command": "uvx",
    "args": ["evc-team-relay-mcp"],
    "env": {
      "RELAY_CP_URL": "",
      "RELAY_AGENT_KEY": "",
      "RELAY_AGENT_KEYS": "",
      "RELAY_EMAIL": "",
      "RELAY_PASSWORD": ""
    }
  }
}
```

**Requires environment variables:** `RELAY_CP_URL`, `RELAY_AGENT_KEY`, `RELAY_AGENT_KEYS`, `RELAY_EMAIL`, `RELAY_PASSWORD` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What evc-team-relay-mcp does

evc-team-relay-mcp exposes Team Relay shares to MCP clients so agents can work with files synchronized to Obsidian vaults. It can identify accessible shares, enumerate files in a folder share, search paths and filenames, read complete file contents, and create or replace files when an agent key is configured.

The server communicates with the Team Relay control plane rather than executing shell commands. File writes to folder shares enter the relay sync flow and become available to subscribed vaults on a later sync cycle. The server is suitable for agents that need structured access to shared notes and project files.

## How it works

Call `authenticate` before other tools. In agent-key mode, requests carry `X-Agent-Key` and no login is required. In email/password mode, the server logs in with the configured credentials and manages the resulting token and refresh lifecycle internally.

A typical read workflow is:

1. Use `list_shares` to discover accessible shares when the authentication mode supports it.
2. Call `list_files` or `tr_search` for a folder share.
3. Call `read_file` with the share identifier and path.
4. Use `upsert_file` to create or replace a file when operating with an agent key.

The server can run over MCP stdio or as a streamable HTTP endpoint. HTTP mode listens on localhost by default. An SSH tunnel is recommended when the client and server run on different machines. If binding publicly or behind a reverse proxy, the surrounding network must provide protection because the MCP HTTP endpoint has no built-in authentication.

## Setup and configuration

Install from PyPI with `uvx`, which downloads and runs the package, or install from source with `uv sync` or `pip install .`. Configure the MCP client with `uvx evc-team-relay-mcp`, or use the source command based on `uv run` and `relay_mcp.py`.

Set `RELAY_CP_URL` to the Team Relay control-plane base URL. Choose one authentication method: `RELAY_AGENT_KEY` or `RELAY_AGENT_KEYS` for agent-key access, or `RELAY_EMAIL` and `RELAY_PASSWORD` for account access. Agent keys support both reading and the `upsert_file` write path; email/password mode is read-only.

## Tools and capabilities

- `authenticate`: Reports the active authentication mode and performs email/password login when needed.
- `list_shares`: Lists accessible document or folder shares, with optional kind and ownership filters.
- `list_files`: Returns file metadata for a shared folder without downloading contents.
- `tr_search`: Finds files by a case-insensitive path or filename match.
- `read_file`: Returns the full content of a file in one response.
- `upsert_file`: Creates or overwrites a folder-share file using agent-key authentication.

## Limitations and notes

`read_file` has no partial or range-read support. Share identifier rules depend on authentication: agent-key requests can use a UUID or web slug, while email/password requests require a UUID for folder operations. In single-key mode, `list_shares` cannot identify the share associated with the key, so callers should use the known share ID with file tools.

`read_document`, `write_document`, and `delete_file` are unavailable and always raise because the corresponding backend routes do not exist. Live document content uses a CRDT/WebSocket model without a REST bridge, and individual file deletion has no server-side delete route. Switching authentication modes does not enable these tools. Email/password mode also cannot write; `upsert_file` is intentionally restricted to agent-key mode.

_Full upstream README: https://allmcps.com/mcp/evc-team-relay-mcp/readme_

