{"id":25531690,"url":"https://github.com/datalayer/langchain-mcp-client","last_synced_at":"2026-01-19T04:30:17.889Z","repository":{"id":277517134,"uuid":"931368006","full_name":"datalayer/langchain-mcp-client","owner":"datalayer","description":"🦜🔗 LangChain Model Context Protocol (MCP) Client","archived":false,"fork":false,"pushed_at":"2025-02-14T10:41:08.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T10:56:10.765Z","etag":null,"topics":["langchain","mcp-client"],"latest_commit_sha":null,"homepage":"https://datalayer.tech","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datalayer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["datalayer"]}},"created_at":"2025-02-12T06:44:53.000Z","updated_at":"2025-02-14T10:43:18.000Z","dependencies_parsed_at":"2025-02-14T11:06:18.686Z","dependency_job_id":null,"html_url":"https://github.com/datalayer/langchain-mcp-client","commit_stats":null,"previous_names":["datalayer/langchain-mcp-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalayer%2Flangchain-mcp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalayer%2Flangchain-mcp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalayer%2Flangchain-mcp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalayer%2Flangchain-mcp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datalayer","download_url":"https://codeload.github.com/datalayer/langchain-mcp-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758890,"owners_count":19692041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["langchain","mcp-client"],"created_at":"2025-02-20T01:19:33.333Z","updated_at":"2026-01-19T04:30:17.818Z","avatar_url":"https://github.com/datalayer.png","language":"Python","funding_links":["https://github.com/sponsors/datalayer"],"categories":["🤖 AI/ML"],"sub_categories":[],"readme":"\u003c!--\n  ~ Copyright (c) 2023-2024 Datalayer, Inc.\n  ~\n  ~ BSD 3-Clause License\n--\u003e\n\n[![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)\n\n[![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026style=flat\u0026color=1ABC9C)](https://github.com/sponsors/datalayer)\n\n# 🦜 🔗 LangChain MCP Client\n\n[![Github Actions Status](https://github.com/datalayer/langchain-mcp-client/workflows/Build/badge.svg)](https://github.com/datalayer/langchain-mcp-client/actions/workflows/build.yml)\n[![PyPI - Version](https://img.shields.io/pypi/v/langchain-mcp-client)](https://pypi.org/project/langchain-mcp-client)\n\nThis simple [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)\nclient demonstrates the use of MCP server tools by LangChain ReAct Agent.\n- 🌐 Seamlessly connect to any MCP servers.\n- 🤖 Use any LangChain-compatible LLM for flexible model selection.\n- 💬 Interact via CLI, enabling dynamic conversations.\n\n## Conversion to LangChain Tools\n\nIt leverages a utility function `convert_mcp_to_langchain_tools()` from\n[`langchain_mcp_tools`](https://pypi.org/project/langchain-mcp-tools/).  \nThis function handles parallel initialization of specified multiple MCP servers\nand converts their available tools into a list of LangChain-compatible tools\n([List[BaseTool]](https://python.langchain.com/api_reference/core/tools/langchain_core.tools.base.BaseTool.html#langchain_core.tools.base.BaseTool)).\n\n## Installation\n\nThe python version should be 3.11 or higher.\n\n```bash\npip install langchain_mcp_client\n```\n\n## Configuration\n\nCreate a `.env` file containing all the necessary `API_KEYS` to access your LLM.\n\nConfigure the LLM, MCP servers, and prompt example in the `llm_mcp_config.json5` file:\n\n1. **LLM Configuration**: Set up your LLM parameters.\n2. **MCP Servers**: Specify the MCP servers to connect to.\n3. **Example Queries**: Define example queries that invoke MCP server tools. Press Enter to use these example queries when prompted.\n\n## Usage\n\n```bash\nlangchain-mcp-client\n```\n\nBelow an example with [jupyter-mcp-server](https://github.com/datalayer/jupyter-mcp-server):\n\n![](https://assets.datalayer.tech/jupyter-mcp/jupyter-mcp-server-cli.gif)\n\n## Credits\n\nThis initial code of this repo is taken from  from [hideya/mcp-client-langchain-py](https://github.com/hideya/mcp-client-langchain-py) (MIT License).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalayer%2Flangchain-mcp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatalayer%2Flangchain-mcp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalayer%2Flangchain-mcp-client/lists"}