{
"mcpServers": {
"lc2mcp": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Convert LangChain tools to FastMCP tools
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 67 days ago. 71 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Lc2mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Convert LangChain tools to FastMCP tools — in one line of code.
Stop rewriting your tools. Just adapt them.
lc2mcp is a lightweight adapter that converts existing LangChain tools into FastMCP tools, enabling you to quickly build MCP servers accessible to Claude, Cursor, and any MCP-compatible client.
| Feature | Description | |---------|-------------| | 🔄 Instant Conversion | One function call to convert any LangChain tool to FastMCP tool | | 📦 Ecosystem Access | Unlock 1000+ LangChain community tools (Search, Wikipedia, SQL, APIs...) | | 🎯 Zero Boilerplate | Automatic Pydantic → JSON Schema conversion | | 🔐 Context Injection | Pass auth, user info, and request context to tools | | 📊 Progress & Logging | Full support for MCP progress notifications and logging | | 🏷️ Namespace Support | Prefix tool names and handle conflicts automatically |
pip install lc2mcp
from langchain_core.tools import tool
from fastmcp import FastMCP
from lc2mcp import register_tools
@tool
def get_weather(city: str) -> str:
"""Get current weather for a city."""
return f"Sunny, 25°C in {city}"
mcp = FastMCP("weather-server")
register_tools(mcp, [get_weather]) # ← That's it!
if __name__ == "__main__":
mcp.run()
Your tool is now available to Claude, Cursor, and any MCP client.
To include parameter descriptions in the MCP tool schema, you have two options:
Option 1: Use parse_docstring=True (Recommended for simplicity)
@tool(parse_docstring=True)
def get_weather(city: str, unit: str = "celsius") -> str:
"""Get current weather for a city.
Args:
city: The name of the city to query
unit: Temperature unit (celsius or fahrenheit)
"""
return f"Sunny, 25°C in {city}"
Option 2: Use args_schema (Recommended for complex types)
from pydantic import BaseModel, Field
class WeatherInput(BaseModel):
city: str = Field(description="The name of the city to query")
unit: str = Field(default="celsius", description="Temperature unit")
@tool(args_schema=WeatherInput)
def get_weather(city: str, unit: str = "celsius") -> str:
"""Get current weather for a city."""
return f"Sunny, 25°C in {city}"
Note: Without
parse_docstring=Trueorargs_schema, parameter descriptions from docstrings will not be extracted.
┌─────────────────┐ ┌─────────────┐ ┌─────────────────┐
│ LangChain Tool │ ───▶ │ lc2mcp │ ───▶ │ FastMCP Tool │
│ (@tool, etc.) │ │ (adapter) │ │ │
└─────────────────┘ └─────────────┘ └────────┬────────┘
│
▼
┌─────────────────┐
│ FastMCP Server │
└────────┬────────┘
│
▼
┌───────────────────────┐
│ MCP Clients │
│ (Claude, Cursor, ...) │
└───────────────────────┘
LangChain and MCP ecosystems can be connected in both directions:
| Direction | Tool | Description | |-----------|------|--------