Model Context Protocol tool calling support for LangChain
Project description
langchain-mcp
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:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_mcp-0.2.1.tar.gz.
File metadata
- Download URL: langchain_mcp-0.2.1.tar.gz
- Upload date:
- Size: 61.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5bf34e609746cf40544b2e509ec927acbdcd4fc1031a1689f4ada52459e113
|
|
| MD5 |
dff81a9fbb42fd663fe68c753989ed7b
|
|
| BLAKE2b-256 |
bc63dc1b4a702de92e298b6b9cebc338c6ac375a0770d67f71613b2fef866198
|
Provenance
The following attestation bundles were made for langchain_mcp-0.2.1.tar.gz:
Publisher:
publish.yml on rectalogic/langchain-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_mcp-0.2.1.tar.gz -
Subject digest:
cb5bf34e609746cf40544b2e509ec927acbdcd4fc1031a1689f4ada52459e113 - Sigstore transparency entry: 175739910
- Sigstore integration time:
-
Permalink:
rectalogic/langchain-mcp@90bf4bea5e21da805ca8091c883edac94a8caabc -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/rectalogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@90bf4bea5e21da805ca8091c883edac94a8caabc -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: langchain_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ddc9b4281cc3eadcc0fcf2151d196ad19038585f9850883ad497254d02ef5b
|
|
| MD5 |
ce44c75f2a39550de3a298a2063f6a36
|
|
| BLAKE2b-256 |
567e6d3d54602b7b798af8e704a6cf22ca123fbdc12562d24c30f173fd03ec54
|
Provenance
The following attestation bundles were made for langchain_mcp-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on rectalogic/langchain-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_mcp-0.2.1-py3-none-any.whl -
Subject digest:
d7ddc9b4281cc3eadcc0fcf2151d196ad19038585f9850883ad497254d02ef5b - Sigstore transparency entry: 175739911
- Sigstore integration time:
-
Permalink:
rectalogic/langchain-mcp@90bf4bea5e21da805ca8091c883edac94a8caabc -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/rectalogic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@90bf4bea5e21da805ca8091c883edac94a8caabc -
Trigger Event:
push
-
Statement type: