Skip to main content

No project description provided

Project description

Datalayer

Become a Sponsor

🦜 🔗 Langchain MCP Client

Github Actions Status PyPI - Version

This simple Model Context Protocol (MCP) client demonstrates the use of MCP server tools by LangChain ReAct Agent.

It leverages a utility function convert_mcp_to_langchain_tools() from langchain_mcp_tools.
This function handles parallel initialization of specified multiple MCP servers and converts their available tools into a list of LangChain-compatible tools (List[BaseTool]).

This is an adpated version of: https://github.com/hideya/mcp-client-langchain-py.

Usage

python langchain_mcp_client/cli_chat.py

.env file is required with the all the necessary API_KEYS.

Models to invoke and MCP servers to use can be configured in llm_mcp_config.json5.

At the prompt, you can simply press Enter to use example queries that perform MCP server tool invocations.- Example queries can also be configured in llm_mcp_config.json5.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_mcp_client-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file langchain_mcp_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_mcp_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 883be04f83f03a64a1f785da41127ae877fa134a15385faa0e703ea907f9040c
MD5 1d73f4ee3665cfd2218e1b883341f32d
BLAKE2b-256 c4994b0a095ce9f94d32d7dbc5130695fc6d5bf3c70ac2fb69a0b4d248871044

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page