LSD MCP Template

LSD MCP Template

Template for serving FastMCP servers over Streamable HTTP within a LangGraph Server, including an example math_add tool.

Category
Visit Server

README

LSD MCP Template

Template for exposing one or more FastMCP servers from a LangGraph Server custom HTTP route. It is set up for LangSmith Deployments and serves MCP over Streamable HTTP.

The default MCP endpoint is:

/mcp

This template intentionally does not include custom auth. Add auth separately if your deployment needs it.

What's Included

  • Minimal LangGraph health graph so LangGraph Server boots normally.
  • Custom Starlette app mounted through langgraph.json.
  • Lazy MCP app construction so importing the graph server does not build your MCP server.
  • Configurable MCP server registry in src/lsd_mcp_template/mcp_config.py.
  • One example tool: math_add(x: int, y: int).

Local Development

uv sync --group dev
make dev

The local MCP endpoint will be available at:

http://127.0.0.1:1424/mcp

Run tests with:

make test

Defining Your MCP Server

Edit src/lsd_mcp_template/server.py and replace the example tool with your own tools:

from fastmcp import FastMCP


def build_server() -> FastMCP:
    mcp = FastMCP("My MCP Server")

    @mcp.tool(name="my_tool")
    def my_tool(value: str) -> str:
        return value

    return mcp

To expose multiple MCP servers, add more specs in src/lsd_mcp_template/mcp_config.py:

MCP_SERVER_SPECS = (
    MCPServerSpec(
        name="default",
        path="/mcp",
        factory="lsd_mcp_template.server:build_server",
    ),
    MCPServerSpec(
        name="other",
        path="/other-mcp",
        factory="lsd_mcp_template.other_server:build_server",
    ),
)

Each factory must return a fastmcp.FastMCP instance.

Deploy

Use this directory as the repository root for the LangSmith Deployment. The deployment entrypoints are already declared in langgraph.json:

  • Graph: ./src/lsd_mcp_template/graph.py:graph
  • Custom HTTP app: ./src/lsd_mcp_template/webapp.py:app

Set any environment variables your custom tools need in the deployment configuration. The example math_add tool does not require environment variables.

Optional:

export MCP_STATELESS_HTTP=true

When set, the custom route creates the FastMCP Streamable HTTP app in stateless mode.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured