langsmith
MCP server from langchain-ai/langsmith-mcp-server
claude mcp add --transport stdio langchain-ai-langsmith-mcp-server uv run langsmith_mcp_server/server.py \ --env LANGSMITH_API_KEY="your_langsmith_api_key" \ --env LANGSMITH_ENDPOINT="https://api.smith.langchain.com" \ --env LANGSMITH_WORKSPACE_ID="your_workspace_id"
How to use
The LangSmith MCP Server provides a production-ready integration with the LangSmith observability platform via the Model Context Protocol (MCP). It exposes a suite of tools that allow you to fetch conversation history, manage prompts, retrieve traces and runs, access datasets and examples, and inspect experiments and billing usage within LangSmith. Clients can connect to the server over an HTTP-streamable MCP transport, sending requests to the available tools such as get_thread_history, list_prompts, fetch_runs, list_projects, list_datasets, read_dataset, and get_billing_usage. When using the hosted version, you simply point your client to the provided URL and include your LangSmith API key in the LANGSMITH-API-KEY header. When running locally or self-hosted, you configure the MCP client to invoke the LangSmith server executable and supply any necessary API keys or workspace details via environment variables. The server handles pagination (character-based) for page-sized responses in relevant tools, ensuring responses stay within size limits.
How to install
Prerequisites:
- Python 3.10 (as indicated in the README)
- uv installer for Python (install per the project instructions)
Option 1: Install the hosted/local server from source
- Install uv (if not already installed): curl -LsSf https://astral.sh/uv/install.sh | sh
- Clone the repository and navigate to the project directory: git clone https://github.com/langchain-ai/langsmith-mcp-server.git cd langsmith-mcp-server
- Run the server from source (example): uv run langsmith_mcp_server/server.py
Option 2: Install via PyPI (if you prefer installing the MCP server package)
- Install the package: uv run pip install --upgrade langsmith-mcp-server
- Run the server using your environment configuration similar to the PyPI usage instructions in the README.
Additional setup (if needed):
- Set environment variables such as LANGSMITH_API_KEY, LANGSMITH_WORKSPACE_ID, and LANGSMITH_ENDPOINT to connect to LangSmith.
- If deploying in a container or hosting environment, ensure port exposure and networking are configured for your MCP client to reach the server.
Additional notes
Tips and common considerations:
- The server uses character-based pagination for thread histories and certain runs fetches; always provide page_number on each request and honor total_pages to paginate.
- If you are using the hosted/remote instance, you only need to supply the LANGSMITH-API-KEY header in your client configuration; workspace and endpoint are optional if using the default LangSmith cloud endpoint.
- When running locally, keep your API key secure and do not commit it to version control.
- The available tools cover: Conversation history (get_thread_history), Prompt management (list_prompts, get_prompt_by_name, push_prompt), Traces & Runs (fetch_runs, list_projects), Datasets & Examples (list_datasets, list_examples, read_dataset, read_example, create_dataset, update_examples), Experiments & Evaluations (list_experiments, run_experiment), and Billing (get_billing_usage).
- For long-running or large results, rely on the provided pagination parameters to manage response sizes and client consumption.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP