Provides seamless integration with the LangSmith observability platform, enabling language models to fetch conversation history, manage prompts, retrieve traces and runs, work with datasets and examples, and access experiment and evaluation data from LangSmith projects.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LangSmith MCP Serverfetch the history of my conversation from thread 'thread-123' in project 'my-chatbot'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π¦π οΈ LangSmith MCP Server

A production-ready Model Context Protocol (MCP) server that provides seamless integration with the LangSmith observability platform. This server enables language models to fetch conversation history and prompts from LangSmith.
π Overview
The LangSmith MCP Server bridges the gap between language models and the LangSmith platform, enabling advanced capabilities for conversation tracking, prompt management, and analytics integration.
π Example Use Cases
The server enables powerful capabilities including:
π¬ Conversation History: "Fetch the history of my conversation with the AI assistant from thread 'thread-123' in project 'my-chatbot'"
π Prompt Management: "Get all public prompts in my workspace"
π Smart Search: "Find private prompts containing the word 'joke'"
π Template Access: "Pull the template for the 'legal-case-summarizer' prompt"
π§ Configuration: "Get the system message from a specific prompt template"
π οΈ Available Tools
The LangSmith MCP Server provides the following tools for integration with LangSmith:
π Prompt Management
Tool Name | Description |
| Fetch prompts from LangSmith with optional filtering. Filter by visibility (public/private) and limit results. |
| Get a specific prompt by its exact name, returning the prompt details and template. |
| Documentation tool for understanding how to create and push prompts to LangSmith (documentation-only). |
π Traces & Runs
Tool Name | Description |
| Fetch LangSmith runs (traces, tools, chains, etc.) from one or more projects using flexible filters, query language expressions, and trace-level constraints. |
| List LangSmith projects with optional filtering and detail level control. Can return simplified or full project information. |
| List LangSmith experiment projects (reference projects) with mandatory dataset filtering. Returns experiment information with key metrics (latency, cost, feedback stats). |
π Datasets & Examples
Tool Name | Description |
| Fetch LangSmith datasets with filtering options by ID, type, name, or metadata. |
| Fetch examples from a LangSmith dataset with advanced filtering options. |
| Read a specific dataset from LangSmith using dataset ID or name. |
| Read a specific example from LangSmith using the example ID and optional version information. |
| Documentation tool for understanding how to create datasets in LangSmith (documentation-only). |
| Documentation tool for understanding how to update dataset examples in LangSmith (documentation-only). |
π§ͺ Experiments & Evaluations
Tool Name | Description |
| Documentation tool for understanding how to run experiments and evaluations in LangSmith (documentation-only). |
π οΈ Installation Options
π General Prerequisites
Install uv (a fast Python package installer and resolver):
curl -LsSf https://astral.sh/uv/install.sh | shClone this repository and navigate to the project directory:
git clone https://github.com/langchain-ai/langsmith-mcp-server.git cd langsmith-mcp-server
π MCP Client Integration
Once you have the LangSmith MCP Server, you can integrate it with various MCP-compatible clients. You have two installation options:
π¦ From PyPI
Install the package:
uv run pip install --upgrade langsmith-mcp-serverAdd to your client MCP config:
{ "mcpServers": { "LangSmith API MCP Server": { "command": "/path/to/uvx", "args": [ "langsmith-mcp-server" ], "env": { "LANGSMITH_API_KEY": "your_langsmith_api_key", "LANGSMITH_WORKSPACE_ID": "your_workspace_id", "LANGSMITH_ENDPOINT": "https://api.smith.langchain.com" } } } }
βοΈ From Source
Add the following configuration to your MCP client settings:
Replace the following placeholders:
/path/to/uv: The absolute path to your uv installation (e.g.,/Users/username/.local/bin/uv). You can find it runningwhich uv./path/to/langsmith-mcp-server: The absolute path to your langsmith-mcp project directoryyour_langsmith_api_key: Your LangSmith API key (required)your_workspace_id: Your LangSmith workspace ID (optional, for API keys scoped to multiple workspaces)https://api.smith.langchain.com: The LangSmith API endpoint (optional, defaults to the standard endpoint)
Example configuration:
Copy this configuration in Cursor > MCP Settings.

π§ Environment Variables
The LangSmith MCP Server supports the following environment variables:
Variable | Required | Description | Example |
| β Yes | Your LangSmith API key for authentication |
|
| β No | Workspace ID for API keys scoped to multiple workspaces |
|
| β No | Custom API endpoint URL (for self-hosted or EU region) |
|
Notes:
Only
LANGSMITH_API_KEYis required for basic functionalityLANGSMITH_WORKSPACE_IDis useful when your API key has access to multiple workspacesLANGSMITH_ENDPOINTallows you to use custom endpoints for self-hosted LangSmith installations or the EU region
π³ Docker Deployment (HTTP-Streamable)
The LangSmith MCP Server can be deployed as an HTTP server using Docker, enabling remote access via the HTTP-streamable protocol.
Building the Docker Image
Running with Docker
The API key is provided via the LANGSMITH-API-KEY header when connecting, so no environment variables are required for HTTP-streamable protocol.
Connecting with HTTP-Streamable Protocol
Once the Docker container is running, you can connect to it using the HTTP-streamable transport. The server accepts authentication via headers:
Required header:
LANGSMITH-API-KEY: Your LangSmith API key
Optional headers:
LANGSMITH-WORKSPACE-ID: Workspace ID for API keys scoped to multiple workspacesLANGSMITH-ENDPOINT: Custom endpoint URL (for self-hosted or EU region)
Example client configuration:
Cursor Integration
To add the LangSmith MCP Server to Cursor using HTTP-streamable protocol, add the following to your mcp.json configuration file:
Optional headers:
Make sure the server is running before connecting Cursor to it.
Health Check
The server provides a health check endpoint:
This endpoint does not require authentication and returns "LangSmith MCP server is running" when the server is healthy.
π§ͺ Development and Contributing π€
If you want to develop or contribute to the LangSmith MCP Server, follow these steps:
Create a virtual environment and install dependencies:
uv syncTo include test dependencies:
uv sync --group testView available MCP commands:
uvx langsmith-mcp-serverFor development, run the MCP inspector:
uv run mcp dev langsmith_mcp_server/server.pyThis will start the MCP inspector on a network port
Install any required libraries when prompted
The MCP inspector will be available in your browser
Set the
LANGSMITH_API_KEYenvironment variable in the inspectorConnect to the server
Navigate to the "Tools" tab to see all available tools
Before submitting your changes, run the linting and formatting checks:
make lint make format
π License
This project is distributed under the MIT License. For detailed terms and conditions, please refer to the LICENSE file.
Made with β€οΈ by the LangChain Team