Meridian Tunnel API

The Tunnel API from Meridian, for tunnel.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 17

POST /tunnel/active-repo Set Tunnel Active Repo #
POST /tunnel/refresh Refresh Tunnel Tools Route #
GET /tunnel/manifest Get Tunnel Manifest Route #
GET /tunnel/status/{tenant_id} Tunnel Status #
POST /tunnel/openai/diagnostics/{tenant_id} Openai Tunnel Diagnostics #
GET /tunnel/plugins Get Tunnel Plugins #
PUT /tunnel/plugins Put Tunnel Plugins #
GET /tunnel/diagnostics/{tenant_id} Tunnel Diagnostics #
GET /tunnel/launch-matrix/{tenant_id} Tunnel Launch Matrix #
POST /tunnel/plugins/custom Add Custom Plugin #
DELETE /tunnel/plugins/custom Remove Custom Plugin #
GET /tunnel/plugins/check Check Plugin Installed #
POST /tunnel/plugins/install Install Plugin #
GET /tunnel/registry Get Mcp Registry #
GET /tunnel/filesystem-roots Get Tunnel Filesystem Roots #
POST /tunnel/filesystem-roots Add Tunnel Filesystem Root #
DELETE /tunnel/filesystem-roots Remove Tunnel Filesystem Root #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/usemeridian-us:usemeridian-us-tunnel-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

usemeridian-us-tunnel-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Meridian Tunnel API
  description: Multi-session Claude coordinator MCP server.
  version: 0.1.0
tags:
- name: Tunnel
paths:
  /tunnel/active-repo:
    post:
      summary: Set Tunnel Active Repo
      description: 'Send a set_active_repo control message to the tenant''s extract WebSocket.


        The tunnel client''s _run_extract_pool_connection handles this message and

        updates SerenaPool.default_repo_path at runtime — no tunnel restart needed.

        Returns 503 when no extract tunnel is connected, 404 when auth fails.


        46fd16f1 — delegates to :func:`send_active_repo_control` instead of sending

        the WebSocket message itself, so this HTTP entry point ALSO updates

        ``_tenant_active_repo`` (previously it only pushed the WS control message,

        leaving the server-side cache stale — a worktree-scoped caller that

        switched repos through this REST endpoint would see subsequent

        ``call_tunnel_tool`` calls without an explicit ``repo_path`` [e.g.

        ``prospect_symbol``''s Serena rung] keep routing to whatever repo was

        active BEFORE this call, silently querying the wrong checkout).'
      operationId: set_tunnel_active_repo_tunnel_active_repo_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/refresh:
    post:
      summary: Refresh Tunnel Tools Route
      description: 'Force a synchronous tunnel-tool re-aggregation and return the manifest.


        The explicit refresh operation the dashboard (Settings → Tunnel Plugins

        status card) and any HTTP-capable connector can call instead of guessing

        at a TTL: it atomically invalidates the routing cache, re-fetches every

        healthy slot''s tools, and returns the resulting

        :func:`tunnel_manifest_snapshot` — the same shape surfaced by

        ``GET /tunnel/status/{tenant_id}`` and the MCP ``tools/list`` ``_meta``

        block, so a caller can diff ``manifest_hash`` against what it last saw.


        No tunnel connected is not an error here — it returns a snapshot with

        ``has_active_tunnel: false`` and a null ``manifest_hash`` (nothing to

        aggregate), same as any other read of tunnel state.'
      operationId: refresh_tunnel_tools_route_tunnel_refresh_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/manifest:
    get:
      summary: Get Tunnel Manifest Route
      description: 'Read-only tools/list manifest snapshot for this tenant (49d8244d).


        Unlike ``POST /tunnel/refresh``, this never forces a rebuild — it reports

        whatever the last ``list_tunnel_tools``/``refresh_tunnel_manifest`` call

        left behind (see :func:`tunnel_manifest_snapshot`). Safe to poll cheaply

        and often (a startup diagnostic, a dashboard auto-refresh, a connector

        health check) without paying the fan-out cost of a real slot

        re-aggregation on every call — use ``POST /tunnel/refresh`` when a forced

        rebuild is actually wanted.'
      operationId: get_tunnel_manifest_route_tunnel_manifest_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/status/{tenant_id}:
    get:
      summary: Tunnel Status
      description: 'Return whether the tenant currently has an active tunnel socket.


        89a06e40 — ``request`` is a NEW parameter (this route previously took

        only ``tenant_id``), added to reach ``request.app.state.db`` for the

        ``profile_binding`` field below. Defaulted to ``None`` rather than made

        required: several existing tests (``test_slot_reprobe.py``,

        ``test_tunnel_bridge.py``, ``test_w5_9665538a_meridian_docs_slot.py``)

        call this function directly as a plain coroutine (``tn.tunnel_status(tid)``),

        not through FastAPI''s HTTP layer — FastAPI still injects the real

        ``Request`` for actual HTTP calls regardless of the default (it

        recognizes the ``Request`` type annotation, not the absence of a

        default), so this stays a non-breaking change for both calling styles.

        ``profile_binding`` degrades to ``None`` (see below) when ``request`` is

        ``None``, exactly like every other best-effort field in this response.


        4bea8629 — SECURITY FIX: this route previously had NO auth at all

        (see the "no auth required" note that used to head this section),

        unlike its documentary-tenant_id siblings ``/tunnel/diagnostics/{tenant_id}``

        and ``/tunnel/launch-matrix/{tenant_id}`` (which resolve the REAL caller

        via ``_get_tenant_from_request`` and treat the path''s ``tenant_id`` as

        informational only). Anyone who knew or guessed a ``tenant_id`` could

        fetch this response — live per-slot health, config generation, and

        in-flight request counts for that tenant. Fix: in hosted mode, resolve

        the caller''s own tenant the same way, and hard-require it match the

        path''s ``tenant_id`` (mirroring ``tunnel_ws``''s own WS-side check and

        the tunnel HTTP/WS proxy routes'' 5de3d422 fix). A direct, non-HTTP call

        (``request is None`` — see above) is unaffected, same as the

        ``profile_binding`` degrade. ``/tunnel/openai/diagnostics/{tenant_id}``

        is intentionally unauthenticated per its own docstring and is NOT

        touched by this fix.'
      operationId: tunnel_status_tunnel_status__tenant_id__get
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Tunnel Status Tunnel Status  Tenant Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tunnel
  /tunnel/openai/diagnostics/{tenant_id}:
    post:
      summary: Openai Tunnel Diagnostics
      description: 'Compose OpenAI Secure MCP Tunnel adapter diagnostics for *tenant_id*,

        alongside Meridian''s own tunnel socket state (see :func:`tunnel_status`).


        Body (all optional): ``{"openai_tunnel_config": {...}, "reported_status":

        {...}}``. ``openai_tunnel_config`` is validated via

        ``openai_tunnel_adapter.normalize_config`` — a malformed config yields a

        400 with the validation error, never a partial/best-guess diagnostics

        response. ``reported_status`` optionally carries a live ``{"state": ...,

        "detail": ...}`` health report from wherever actually probes the OpenAI

        tunnel (out of scope for this item; see the adapter module''s docstring).

        Omitting both reports ``not_configured`` — no auth required, mirroring

        :func:`tunnel_status`''s own lightweight, read-only status check.'
      operationId: openai_tunnel_diagnostics_tunnel_openai_diagnostics__tenant_id__post
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tunnel
  /tunnel/plugins:
    get:
      summary: Get Tunnel Plugins
      description: 'Return the current tenant''s resolved tunnel plugins + raw override config.


        The dashboard''s Settings → Tunnel Plugins section renders ``plugins`` (the

        three slots with overrides applied) and round-trips ``config`` (the raw

        per-tenant overrides). Live tunnel sockets feed the per-slot status dots.'
      operationId: get_tunnel_plugins_tunnel_plugins_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
    put:
      summary: Put Tunnel Plugins
      description: 'Persist the tenant''s tunnel plugin overrides (Settings → Tunnel Plugins).


        Accepts ``{"config": }`` or a bare overrides dict/list. The config

        is normalized before storage; an empty result clears overrides (NULL → the

        built-in defaults).


        Every write bumps the tenant/hostname-scoped runtime configuration

        generation (02dbd8b4) and reports back whether it is safe to treat as

        already-applied or whether a running tunnel needs a restart to pick it up

        — see ``config_generation`` in the response. A no-op save (identical

        effective config) does not advance the generation or flag a restart.'
      operationId: put_tunnel_plugins_tunnel_plugins_put
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/diagnostics/{tenant_id}:
    get:
      summary: Tunnel Diagnostics
      description: 'Layered, read-only tunnel/connector diagnostics for one tenant (f1e0df55).


        Aggregates dashboard-persisted config, live per-slot process state,

        client-reported per-slot health, the server routing cache, and the

        tools/list discovery-changed marker into ONE snapshot — see

        :func:`build_tunnel_diagnostics` for the full field-by-field contract.

        ``tenant_id`` in the path is documentary only (matches the sibling

        ``/tunnel/status/{tenant_id}`` route''s shape); the actual tenant is

        resolved from the request''s own auth, same as ``/tunnel/plugins``.


        ece2ac0a — hosted callers must be authenticated: with no tenant this used

        to return the process-wide (untenanted) diagnostics snapshot to anyone.'
      operationId: tunnel_diagnostics_tunnel_diagnostics__tenant_id__get
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tunnel
  /tunnel/launch-matrix/{tenant_id}:
    get:
      summary: Tunnel Launch Matrix
      description: 'Read-only, repeatable launch matrix across every in-scope project (ba31dedf).


        Same auth/hostname-resolution contract as ``/tunnel/diagnostics/{tenant_id}``

        (``tenant_id`` in the path is documentary only); joins that diagnostic

        snapshot with this request''s project set — see :func:`build_launch_matrix`

        for the full field-by-field contract. A DB error while listing projects

        degrades to an empty project set (diagnostics-only response) rather than

        failing the request — matches ``get_tunnel_filesystem_roots``''s existing

        best-effort convention for this same tenant/project join.


        ece2ac0a — hosted callers must be authenticated. The ``_db`` call below is

        wrapped in a broad ``except`` (best-effort project listing), so it cannot

        be relied on to refuse an anonymous caller; refuse explicitly first.'
      operationId: tunnel_launch_matrix_tunnel_launch_matrix__tenant_id__get
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tunnel
  /tunnel/plugins/custom:
    post:
      summary: Add Custom Plugin
      description: '9811d04c — persist a chosen custom plugin into the tenant''s tunnel config.


        Body: ``{"name": str, "command": str|list, "port"?: int, "env"?: {..}}``.

        ``?hostname=X`` scopes it to that machine (else the per-tenant default). The

        name is validated (safe charset, no built-in slot/plugin collision) and the

        command must be non-empty; a missing/blank port is auto-assigned. Merges into

        the existing config (reusing the ``tunnel_plugins`` JSON blob — no new table)

        so ``resolve_custom_plugins`` picks it up on the next tunnel (re)start.

        Returns the updated ``custom`` list.'
      operationId: add_custom_plugin_tunnel_plugins_custom_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
    delete:
      summary: Remove Custom Plugin
      description: '9811d04c — remove a persisted custom plugin by name.


        Name comes from ``?name=`` or a ``{"name": ...}`` JSON body. ``?hostname=X``

        scopes to that machine. Built-in slot overrides are left untouched (only a

        non-built-in entry with a matching name is dropped). Returns the updated

        ``custom`` list. Removing a name that isn''t a custom plugin is a no-op 404.'
      operationId: remove_custom_plugin_tunnel_plugins_custom_delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/plugins/check:
    get:
      summary: Check Plugin Installed
      description: 'Check whether a plugin binary is available on the server''s PATH.


        Query params:

        command — the install command string (e.g. "uvx mcp-server-fetch")


        Returns {"installed": bool, "command": str}. Self-hosted only — on hosted

        deployments the binary lives on the user''s machine (via the tunnel client),

        so this endpoint reports the server-side availability.'
      operationId: check_plugin_installed_tunnel_plugins_check_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/plugins/install:
    post:
      summary: Install Plugin
      description: 'Run a plugin install command on the server machine (self-hosted deployments).


        Body: {"command": "uvx mcp-server-fetch"}


        Validates that the command starts with uvx or npx to prevent arbitrary

        execution. Returns {"ok": bool, "output": str}.


        ece2ac0a — refused outright in hosted mode. It used to "still run" there,

        unauthenticated: ``npx -y --help`` / ``uvx --help`` download

        AND execute the named package''s code, so anyone could run arbitrary code

        on the hosted server. A hosted user''s plugins run on their own machine via

        the tunnel, so there is nothing legitimate to install server-side; the

        dashboard already shows a copy-to-clipboard fallback for hosted users.'
      operationId: install_plugin_tunnel_plugins_install_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/registry:
    get:
      summary: Get Mcp Registry
      description: 'Proxy the official MCP Registry API to avoid browser CORS restrictions.


        Returns a page of MCP servers with: id, name, description, install_command,

        homepage. Pass ?cursor= for subsequent pages and ?limit=N (default 20,

        max 50). Requires no auth — the registry is public.'
      operationId: get_mcp_registry_tunnel_registry_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
  /tunnel/filesystem-roots:
    get:
      summary: Get Tunnel Filesystem Roots
      description: 'Return the directories the tunnel''s filesystem connector may read.


        The dashboard stores these per-project under ``executor_config.filesystem_roots``

        (Settings → Executor Config). The tunnel is tenant-scoped, so this unions the

        roots across all of the tenant''s projects. An empty list means the client

        falls back to the user''s home directory (current default behaviour). Best-effort:

        any DB error yields an empty list rather than failing the tunnel.


        Also returns ``known_repo_paths`` — the union of ``executor_config.repo_path``

        across all projects. The tunnel client uses these as implicitly-trusted roots

        for the silent path auto-add (item 3 of dynamic-fs-roots feature).


        b970fe07 — additionally returns ``serena_repo_path`` (first non-empty

        ``executor_config.serena_repo_path`` across projects — Serena''s default

        ``--project``) and ``codebase_code_dirs`` (deduped union of

        ``executor_config.codebase_code_dirs`` — the code-intel slot''s auto-index

        dirs). Both are fall-back-safe: the client applies them only when the

        corresponding CLI flag (``--repo`` / ``--code-dir``) is absent.'
      operationId: get_tunnel_filesystem_roots_tunnel_filesystem_roots_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
    post:
      summary: Add Tunnel Filesystem Root
      description: 'live-fs-roots — add a served filesystem root and push it live.


        Body: ``{"path": "..."}`` (``"root"`` is also accepted). The path is

        normalized (surrounding quotes/whitespace stripped) and rejected if empty.

        It is appended to the tenant''s persisted ``executor_config.filesystem_roots``

        (deduped, order preserved), then pushed to the running tunnel via

        ``add_fs_roots`` so the connector serves it WITHOUT a restart. Returns the

        updated union of ``roots`` plus ``live`` (the control-send status).'
      operationId: add_tunnel_filesystem_root_tunnel_filesystem_roots_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
    delete:
      summary: Remove Tunnel Filesystem Root
      description: 'live-fs-roots — remove a served filesystem root and apply it live.


        Path comes from a ``{"path": ...}`` JSON body (``"root"`` accepted too) or a

        ``?path=`` query param. It is normalized then stripped from the tenant''s

        persisted ``executor_config.filesystem_roots`` across all projects. Because

        ``add_fs_roots`` only ADDS, removal is pushed live with ``set_fs_roots`` (a

        full-list replace) so the running connector stops serving it WITHOUT a

        restart. Returns the updated union of ``roots`` plus ``live`` status.'
      operationId: remove_tunnel_filesystem_root_tunnel_filesystem_roots_delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tunnel
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError