Skip to content
Back to search

langchain-mcp

Model Context Protocol tool support for LangChain

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/rectalogic--langchain-mcp/badge.svg)](/listings/rectalogic--langchain-mcp)

HTML

<a href="/listings/rectalogic--langchain-mcp"><img src="/api/listings/rectalogic--langchain-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 25 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # langchain-mcp
  2. *Note: langchain now has a more official implementation [langchain-mcp-adapters](https://github.com/langchain-ai/langchain-mcp-adapters)*
  3. ![PyPI - Version](https://img.shields.io/pypi/v/langchain-mcp)
  4. [Model Context Protocol](https://modelcontextprotocol.io) tool calling support in LangChain.
  5. Create a `langchain_mcp.MCPToolkit` with an `mcp.ClientSession`,
  6. then `await toolkit.initialize()` and `toolkit.get_tools()` to get the list of `langchain_core.tools.BaseTool`s.
  7. Example:
  8. https://github.com/rectalogic/langchain-mcp/blob/8fa8445a24755bf91789f52718c32361ed916f46/tests/demo.py#L34-L43
  9. ## Demo
  10. You can run the demo against [Groq](https://groq.com/) `llama-3.1-8b-instant`:
  11. ```sh-session
  12. $ export GROQ_API_KEY=xxx
  13. $ uv run tests/demo.py "Read and summarize the file ./LICENSE"
  14. Secure MCP Filesystem Server running on stdio
  15. Allowed directories: [ '/users/aw/projects/rectalogic/langchain-mcp' ]
  16. 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.
  17. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.