> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joystream.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add your own MCP server

> Register an MCP server you host or subscribe to, attach its key, and confirm its tools are available.

The catalog ships with a curated set of servers. To use one of your own — an internal service, or a commercial MCP endpoint you subscribe to — register it as an endpoint.

<Steps>
  <Step title="Register the endpoint">
    For an HTTP-transport server:

    ```bash theme={null}
    jstm mcp add-endpoint ledger-tools \
      --transport streamable-http \
      --url https://tools.acme.internal/mcp \
      --scope workspace
    ```

    For a server you run as a local process:

    ```bash theme={null}
    jstm mcp add-endpoint local-indexer \
      --transport stdio \
      --command /usr/local/bin/indexer \
      --args --port --args 9001 \
      --env INDEX_ROOT=/data \
      --scope personal
    ```

    Choose the scope deliberately: `personal` for yourself, `workspace` for your team, `org` for everyone in the organization.

    The server derives a qualified name from the name you gave it, of the form `endpoint/<workspace_id>/<slug>`. That's what the remaining commands take.

    <Note>
      Registration succeeds even if the server can't be reached or authenticated yet. It registers with an empty tool list, and introspection fills that in once it can connect.
    </Note>
  </Step>

  <Step title="Attach a key">
    Most real servers need authentication:

    ```bash theme={null}
    jstm mcp connect-key endpoint/acme-corp-finance/ledger-tools --api-key <key>
    ```

    If the server expects the key somewhere other than a bearer token:

    ```bash theme={null}
    jstm mcp connect-key endpoint/acme-corp-finance/ledger-tools \
      --api-key <key> --auth-scheme header --auth-name X-API-Key
    ```

    `connect-key` introspects automatically after attaching, so a successful call also tells you the server's tools.

    This is an idempotent upsert — run it again to rotate the key.
  </Step>

  <Step title="Confirm the tools">
    ```bash theme={null}
    jstm mcp introspect endpoint/acme-corp-finance/ledger-tools
    ```

    An empty tool list after a successful key attach usually means the key lacks permission for the tools you expect, rather than that the server has none.
  </Step>

  <Step title="Confirm it wins resolution">
    ```bash theme={null}
    jstm registry resolve mcp endpoint/acme-corp-finance/ledger-tools
    ```

    If a name collides across tiers, the most specific wins. This shows you which entry an agent will actually get, and what it beat.
  </Step>
</Steps>

## Using it in an agent

Once the server has tools, reference it when planning:

```bash theme={null}
jstm agent plan --new
```

```text theme={null}
Use the ledger-tools MCP server to reconcile yesterday's bank statements
against the general ledger, and open a ticket for anything that doesn't match.
```

Then check the agent can actually reach it:

```bash theme={null}
jstm agent readiness reconcile-statements
```

## Rotating and removing

```bash theme={null}
# Rotate the key
jstm mcp connect-key endpoint/acme-corp-finance/ledger-tools --api-key <new-key>

# Remove the key, keeping the registration
jstm mcp disconnect-key endpoint/acme-corp-finance/ledger-tools

# Re-validate and re-introspect an existing endpoint in place
jstm mcp add-endpoint ledger-tools --update

# Remove it entirely
jstm mcp remove-endpoint endpoint/acme-corp-finance/ledger-tools
```

`disconnect-key` is idempotent and reports `removed=false` when there was nothing to remove.

## See also

* [Skills and MCP servers](/concepts/skills-and-mcp) — the model.
* [`jstm mcp`](/cli/mcp) — full reference.
* [Add skill and MCP repositories](/guides/add-skill-and-mcp-repositories) — for whole repositories rather than single endpoints.
