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

# LangSmith Remote MCP

> Connect MCP-compatible clients to LangSmith over OAuth, no API key or header configuration required.

export const protocol_0 = undefined

export const prefix_0 = "api.smith"

export const suffix_0 = "/mcp"

The LangSmith Remote MCP is a [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server hosted by LangSmith. It exposes the same tools as the [standalone LangSmith MCP Server](/langsmith/langsmith-mcp-server) (conversation history, prompts, runs and traces, datasets, experiments, billing) but with OAuth-based authentication, so MCP-compatible clients connect directly without an API key, a separate deployment, or any header configuration.

The Remote MCP is available on all LangSmith Cloud regions and on [self-hosted LangSmith](/langsmith/self-hosted) deployments running v0.15 or later. Self-hosted deployments on earlier versions should continue to use the [standalone LangSmith MCP Server](/langsmith/langsmith-mcp-server).

## Endpoints

**LangSmith Cloud:**

<table>
  <thead>
    <tr>
      <th>Region</th>

      <th>
        {protocol_0 === false ? "Host" : "URL"}
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>GCP US</td>

      <td>
        <code>
          {`${protocol_0 === false ? "" : "https://"}${prefix_0 || "api.smith"}.langchain.com${suffix_0 || ""}`}
        </code>
      </td>
    </tr>

    <tr>
      <td>GCP EU</td>

      <td>
        <code>
          {`${protocol_0 === false ? "" : "https://"}eu.${prefix_0 || "api.smith"}.langchain.com${suffix_0 || ""}`}
        </code>
      </td>
    </tr>

    <tr>
      <td>GCP APAC</td>

      <td>
        <code>
          {`${protocol_0 === false ? "" : "https://"}apac.${prefix_0 || "api.smith"}.langchain.com${suffix_0 || ""}`}
        </code>
      </td>
    </tr>

    <tr>
      <td>AWS US</td>

      <td>
        <code>
          {`${protocol_0 === false ? "" : "https://"}aws.${prefix_0 || "api.smith"}.langchain.com${suffix_0 || ""}`}
        </code>
      </td>
    </tr>
  </tbody>
</table>

The server discovers the rest of its OAuth metadata via [RFC 8414](https://datatracker.ietf.org/doc/html/rfc8414) at `/.well-known/oauth-authorization-server` on the same host, so a compliant MCP client only needs the URL above.

**Self-hosted LangSmith:**

`https://<your-langsmith-host>/api/mcp`, where `<your-langsmith-host>` is the hostname of your LangSmith instance.

## Authentication

Authentication uses OAuth 2.1 with [Dynamic Client Registration (RFC 7591)](https://datatracker.ietf.org/doc/html/rfc7591). Compatible MCP clients register themselves automatically on first use—there is no client ID to provision and no API key to manage.

After registration:

1. The client opens an authorization URL in your browser.
2. You log in to LangSmith (or use an existing session) and consent.
3. The client receives an access token and refresh token.
4. The access token is automatically refreshed by the client when it expires.

The session is scoped to your LangSmith user and workspace permissions—calls through the MCP server can only view what your account is permitted to view.

## Quickstart

### Claude Code

Add the server to your project's `.mcp.json` (or run `claude mcp add --transport http -s user langsmith https://api.smith.langchain.com/mcp` to install it user-wide):

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "mcpServers": {
    "langsmith": {
      "type": "http",
      "url": "https://api.smith.langchain.com/mcp"
    }
  }
}
```

Then run `/mcp` and select **langsmith** to complete the OAuth flow. Tools become available as `mcp__langsmith__<tool_name>`.

### Deep Agents Code (`dcode`)

Add the server to your user-level `~/.deepagents/.mcp.json` file to make it available in every Deep Agents Code project, or add it to a project-level `.mcp.json` file for only that project. See the [Deep Agents Code MCP tools docs](/oss/python/deepagents/code/mcp-tools) for discovery locations and precedence rules.

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "mcpServers": {
    "langsmith": {
      "url": "https://api.smith.langchain.com/mcp",
      "transport": "http",
      "auth": "oauth"
    }
  }
}
```

Then complete the OAuth login flow in one of two ways:

* In the Deep Agents Code TUI, run `/mcp`, select **langsmith**, and follow the login prompt.
* From your shell, run:

  ```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  dcode mcp login langsmith
  ```

Launch `dcode`, or restart an active session, to load the LangSmith MCP tools. In an interactive session, run `/mcp` to inspect server status and loaded tools.

### Cursor

Add to your Cursor `mcp.json`:

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "mcpServers": {
    "LangSmith": {
      "url": "https://api.smith.langchain.com/mcp"
    }
  }
}
```

Cursor will prompt you to complete the OAuth flow on first use.

### Other clients

Any MCP client supporting the [Streamable HTTP transport](https://spec.modelcontextprotocol.io/specification/2025-03-26/basic/transports/#streamable-http) and OAuth 2.1 with dynamic client registration can connect with just the URL above.

## Known client incompatibilities

<Note>
  **OpenAI Codex CLI** does not work with the LangSmith Remote MCP. Codex omits the [RFC 8707](https://datatracker.ietf.org/doc/html/rfc8707) `resource` parameter required by the [MCP authorization spec](https://modelcontextprotocol.io/specification/draft/basic/authorization) during the OAuth flow, so login appears to succeed but the issued token is not bound to the LangSmith MCP and `initialize` fails with an auth-required error. Two upstream issues affect token exchange and authorize requests in Codex (refer to [openai/codex#20729](https://github.com/openai/codex/issues/20729) and [openai/codex#13891](https://github.com/openai/codex/issues/13891)). In the meantime, use the [LangSmith CLI](vscode-webview://10gvgke5c00vonuvk2psr9q89hcqv6q2583jm92ucepld5716i57/langsmith/langsmith-cli) from Codex—it supports the same projects, traces, runs, datasets, experiments, and threads as the MCP server, with native OAuth login.
</Note>

## Available tools

The Remote MCP exposes the same tool surface as the [standalone server](/langsmith/langsmith-mcp-server#available-tools):

* **Conversation and threads:** `get_thread_history`
* **Prompt management:** `list_prompts`, `get_prompt_by_name`, `push_prompt`
* **Traces and runs:** `fetch_runs`, `list_projects`
* **Datasets and examples:** `list_datasets`, `list_examples`, `read_dataset`, `read_example`, `create_dataset`, `update_examples`
* **Experiments and evaluations:** `list_experiments`, `run_experiment`
* **Billing:** `get_billing_usage`

See the [standalone server reference](/langsmith/langsmith-mcp-server#available-tools) for parameter and pagination details—both servers share the same tool implementations.

## Re-authenticating

If a client loses its session (for example, after revoking access in your LangSmith account, or if the refresh token is invalidated), trigger re-auth from the client:

* **Claude Code:** run `/mcp`, select **langsmith**, choose re-authenticate.
* **Cursor:** disable and re-enable the server in MCP settings.
* **Other clients:** consult the client's MCP settings UI.

## Self-hosted LangSmith

[Self-hosted LangSmith](/langsmith/self-hosted) deployments on v0.15 or later expose the Remote MCP at `https://<your-langsmith-host>/api/mcp`. Configuration, authentication, and tool surface are identical to LangSmith Cloud.

For deployments on earlier versions, run the [standalone LangSmith MCP Server](/langsmith/langsmith-mcp-server) in your own environment and point its `LANGSMITH_ENDPOINT` at your self-hosted instance.

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/langsmith-remote-mcp.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
