Title: LangSmith Remote MCP - Docs by LangChain
URL Source: https://docs.langchain.com/langsmith/langsmith-remote-mcp
Markdown Content:
The LangSmith Remote MCP is a Model Context Protocol (MCP) server hosted by LangSmith. It exposes the same tools as the standalone LangSmith MCP Server (conversation history, prompts, runs and traces, datasets, experiments, billing) without a separate deployment. Interactive MCP clients connect over OAuth with no API key or header configuration; programmatic clients can authenticate with a LangSmith API key via the X-Api-Key header.The Remote MCP is available on all LangSmith Cloud regions, on BYOC data planes, and on self-hosted LangSmith deployments running v0.16 or later (self-hosted additionally requires configuring a signing JWKS—see Self-hosted LangSmith). Self-hosted deployments on earlier versions should continue to use the standalone LangSmith MCP Server.
Endpoints
LangSmith Cloud:
| Region | URL |
|---|
| GCP US | https://api.smith.langchain.com/mcp |
| GCP EU | https://eu.api.smith.langchain.com/mcp |
| GCP APAC | https://apac.api.smith.langchain.com/mcp |
| AWS US | https://aws.api.smith.langchain.com/mcp |
The server discovers the rest of its OAuth metadata via RFC 8414 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.BYOC:https://<data_plane_url>/api/mcp, where <data_plane_url> is the URL of your BYOC data plane.
Authentication
The Remote MCP supports two authentication methods. Use OAuth for interactive MCP clients (Claude Code, Cursor, and similar), and an API key for programmatic or headless clients that can’t complete a browser-based login.
OAuth
OAuth 2.1 with Dynamic Client Registration (RFC 7591) is the default for interactive clients. Compatible MCP clients register themselves automatically on first use—there is no client ID to provision and no API key to manage.After registration:
- The client opens an authorization URL in your browser.
- You log in to LangSmith (or use an existing session) and consent.
- The client receives an access token and refresh token.
- 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.
API key
Send a LangSmith API key in the X-Api-Key header on every request. This suits backend services, scripts, and SDKs, for example, the AI SDK, where the interactive OAuth flow is not practical.Requests are authorized as the user that owns the API key, scoped to that key’s workspace and permissions—the same authorization the key has elsewhere in the LangSmith API. Tools that accept a workspace_id argument can target a specific workspace; otherwise the key’s own workspace is used.
Known client incompatibilities
Available tools
The Remote MCP exposes the same tool surface as the standalone server:
- 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 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 deployments on v0.16 or later expose the Remote MCP at https://<your-langsmith-host>/api/mcp. Once enabled, authentication and the tool surface are identical to LangSmith Cloud.
Enabling Remote MCP
The Remote MCP and its OAuth Authorization Server are wired automatically when config.hostname is set, but they stay inert (404) until you provide a signing JWKS. This is the one piece of configuration LangSmith Cloud handles for you. To enable it:
- Generate an Ed25519 (OKP) JWKS. RSA keys are rejected. For example, with
step:
- Provide it to the chart as
config.signingJwks (stored in the chart secret), or as the key langsmith_signing_jwks in your existing secret:
After upgrading, the OAuth discovery endpoints and /api/mcp become live. Verify with:
For deployments on earlier versions, run the standalone LangSmith MCP Server in your own environment and point its LANGSMITH_ENDPOINT at your self-hosted instance.