Cover image
Try Now
2025-04-02

Model Context Protocol tool support for LangChain

3 years

Works with Finder

3

Github Watches

15

Github Forks

172

Github Stars

langchain-mcp

Note: langchain now has a more official implementation langchain-mcp-adapters

PyPI - Version

Model Context Protocol tool calling support in LangChain.

Create a langchain_mcp.MCPToolkit with an mcp.ClientSession, then await toolkit.initialize() and toolkit.get_tools() to get the list of langchain_core.tools.BaseTools.

Example:

https://github.com/rectalogic/langchain-mcp/blob/8fa8445a24755bf91789f52718c32361ed916f46/tests/demo.py#L34-L43

Demo

You can run the demo against Groq llama-3.1-8b-instant:

$ export GROQ_API_KEY=xxx
$ uv run tests/demo.py "Read and summarize the file ./LICENSE"
Secure MCP Filesystem Server running on stdio
Allowed directories: [ '/users/aw/projects/rectalogic/langchain-mcp' ]
The file ./LICENSE is a MIT License agreement. It states that the software is provided "as is" without warranty and that the authors and copyright holders are not liable for any claims, damages, or other liability arising from the software or its use.

相关推荐

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • 田中 楓太
  • A virtual science instructor for engaging and informative lessons.

  • 1Panel-dev
  • 💬 MaxKB is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities.

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • adafruit
  • Python code to use the MCP3008 analog to digital converter with a Raspberry Pi or BeagleBone black.

  • open-webui
  • A simple, secure MCP-to-OpenAPI proxy server

  • Dhravya
  • Collection of apple-native tools for the model context protocol.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • idosal
  • Put an end to hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project

    Reviews

    2 (1)
    Avatar
    user_RUlanD0b
    2025-04-17

    Langchain-mcp is an outstanding tool for leveraging language models in applications seamlessly. Created by rectalogic, it simplifies the integration process, making it accessible for developers. With a comprehensive repository available on GitHub, it's a go-to resource for anyone serious about enhancing their projects with advanced language capabilities. Highly recommended for its efficiency and ease of use!