Skip to main content
Deprecated—use the LangSmith Remote MCP instead.LangSmith now hosts an OAuth-authenticated remote MCP server on LangSmith Cloud and on self-hosted LangSmith v0.15 or later. Cloud endpoints:
Region
GCP US
GCP EU
GCP APAC
AWS US
Self-hosted endpoint: https://<your-langsmith-host>/api/mcp.It exposes the same tool surface as the standalone server documented on this page, but authenticates via OAuth 2.1 with dynamic client registration—no API key, no separate deployment, no header configuration.The standalone server documented below remains the supported path for self-hosted deployments on versions earlier than v0.15 and for users who prefer running the server themselves.
The LangSmith MCP Server is a Model Context Protocol (MCP) server that integrates with LangSmith. It lets MCP-compatible clients (for example, AI coding assistants) read conversation history, prompts, runs and traces, datasets, experiments, and billing usage from your LangSmith workspace.

Example use cases

  • Conversation history: “Fetch the history of my conversation from thread ‘thread-123’ in project ‘my-chatbot’”
  • Prompt management: “Get all public prompts” or “Pull the template for the ‘legal-case-summarizer’ prompt”
  • Traces and runs: “Fetch the latest 10 root runs from project ‘alpha’” or “Get all runs for a trace by UUID”
  • Datasets: “List datasets of type chat” or “Read examples from dataset ‘customer-support-qa’”
  • Experiments: “List experiments for dataset ‘my-eval-set’ with latency and cost metrics”
  • Billing: “Get billing usage for September 2025”
Use the server in code or Fleet

Quickstart (hosted)

A hosted version of the LangSmith MCP Server is available over HTTP, so you can connect without running the server yourself.
  • URL: https://langsmith-mcp-server.onrender.com/mcp
  • Authentication: Send your LangSmith API key in the LANGSMITH-API-KEY header.
The hosted instance is for LangSmith Cloud. For a self-hosted LangSmith instance, run the server yourself and point it at your endpoint (see Docker deployment).
Example (Cursor mcp.json):
Optional headers: LANGSMITH-WORKSPACE-ID, LANGSMITH-ENDPOINT (same as in Environment variables).

Available tools

Conversation and threads

Prompt management

Traces and runs

Datasets and examples

Experiments and evaluations

Billing

Pagination (character-based)

Tools that return large payloads use character-budget pagination so responses stay within a size limit:
  • Used by: get_thread_history and fetch_runs (when trace_id is set).
  • Parameters: Send page_number (1-based) on each request. Optional: max_chars_per_page (default 25000, max 30000), preview_chars (truncate long strings with ”… (+N chars)”).
  • Response: Includes page_number, total_pages, and the page payload. Request more by calling again with page_number = 2, then 3, up to total_pages.
  • Benefits: Pages are built by character count, not item count; no cursor or server-side state—just page numbers.

Installation (run locally)

If you prefer to run the server locally (or use a self-hosted LangSmith endpoint), install it and configure your MCP client.

Prerequisites

  1. Install uv (Python package installer):
  2. Install the package:

MCP client configuration

Add the server to your MCP client config. Use the path from which uvx for the command value. PyPI / uvx:
From source (clone langsmith-mcp-server first):
Replace /path/to/uv, /path/to/uvx, and /path/to/langsmith-mcp-server with your actual paths.

Docker deployment (HTTP-streamable)

You can run the server as an HTTP service with Docker so clients connect via the HTTP-streamable protocol.
  1. Build and run:
    Use the langsmith-mcp-server repository for the Dockerfile and context.
  2. Connect your MCP client to http://localhost:8000/mcp with the LANGSMITH-API-KEY header (and optional LANGSMITH-WORKSPACE-ID, LANGSMITH-ENDPOINT).
  3. Health check (no auth):
For full Docker and HTTP-streamable details, see the LangSmith MCP Server repository.

Deployment overview

Use the hosted MCP server to connect to LangSmith Cloud (smith.langchain.com, eu.smith.langchain.com, apac.smith.langchain.com, or aws.smith.langchain.com). To connect to Cloud or self-hosted LangSmith, run the server locally and set LANGSMITH_ENDPOINT. For self-hosted deployments, you can also run the server via the Docker image inside your VPC.

Environment variables

For the hosted server, use the same names as headers: LANGSMITH-API-KEY, LANGSMITH-WORKSPACE-ID, LANGSMITH-ENDPOINT.

TypeScript implementation

A community-maintained TypeScript/Node.js port of the official Python server is available. To run it: LANGSMITH_API_KEY=your-key npx langsmith-mcp-server. Source and package: GitHub · npm. Maintained by amitrechavia.