Skip to main content
The LangSmith Tool Server is our MCP Framework that powers the tools available in the LangSmith Agent Builder. This framework enables you to build and deploy custom tools that can be integrated with your agents. It provides a standardized way to create, deploy, and manage tools with built-in authentication and authorization. The PyPi package that defines the framework is available here.

Quick start

Install the LangSmith Tool Server and LangChain CLI:
Create a new toolkit:
This creates a toolkit with the following structure:
Define your tools using the @tool decorator:
Run the server:
Your tool server will start on http://localhost:8000.

Simple client example

Here’s a simple example that lists available tools and calls the add tool:

Adding OAuth authentication

For tools that need to access third-party APIs (like Google, GitHub, Slack, etc.), you can use OAuth authentication with Agent Auth. Before using OAuth in your tools, you’ll need to configure an OAuth provider in your LangSmith workspace settings. See the Agent Auth documentation for setup instructions. Once configured, specify the auth_provider in your tool decorator:
Tools with auth_provider must:
  • Have context: Context as the first parameter
  • Specify at least one scope
  • Use context.token to make authenticated API calls

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.