Skip to content

agent: add mcp tools helpers#354

Merged
edis-uipath merged 1 commit intomainfrom
feature/add_mcp_tools_helpers
Dec 17, 2025
Merged

agent: add mcp tools helpers#354
edis-uipath merged 1 commit intomainfrom
feature/add_mcp_tools_helpers

Conversation

@edis-uipath
Copy link
Copy Markdown
Contributor

@edis-uipath edis-uipath commented Dec 17, 2025

Added a helper that creates langchain tools from a mcp server
It receives a list of mcp configuration objects of servers hosted in UiPath and connect to them to load the tools with a max degree of parallelism of 5 during initialization. Handles the cleanup with AsyncExitStack.

This PR adds MCP (Model Context Protocol) tools helpers to enable integration with UiPath-hosted MCP servers. The implementation provides async context management for connecting to multiple MCP servers with controlled concurrency and automatic cleanup.

Key Changes:

  • Added create_mcp_tools() async context manager to connect to UiPath MCP servers and load LangChain-compatible tools
  • Introduced pinned dependencies: mcp==1.24.0 and langchain-mcp-adapters==0.2.1
  • Added custom linting script and GitHub workflow step to enforce proper httpx.Client() usage patterns

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds MCP (Model Context Protocol) tools helpers to enable integration with UiPath-hosted MCP servers. The implementation provides async context management for connecting to multiple MCP servers with controlled concurrency and automatic cleanup.

Key Changes:

  • Added create_mcp_tools() async context manager to connect to UiPath MCP servers and load LangChain-compatible tools
  • Introduced dependencies: mcp>=1.24.0 and langchain-mcp-adapters>=0.2.1
  • Added custom linting script and GitHub workflow step to enforce proper httpx.Client() usage patterns

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/uipath_langchain/agent/tools/mcp_tool.py New module implementing MCP server connection and tool loading with concurrency control and deduplication
src/uipath_langchain/agent/tools/__init__.py Export the new create_mcp_tools function
pyproject.toml Added mcp and langchain-mcp-adapters dependencies
uv.lock Lock file updates for new dependencies (cffi, cryptography, mcp, etc.)
scripts/lint_httpx_client.py New AST-based linter to enforce get_httpx_client_kwargs() usage
.github/workflows/lint.yml Added linting step for httpx.Client() usage
.github/copilot-instructions.md Documentation on proper httpx client initialization patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/uipath_langchain/agent/tools/mcp_tool.py
Comment thread src/uipath_langchain/agent/tools/mcp_tool.py
Comment thread src/uipath_langchain/agent/tools/mcp_tool.py Outdated
@edis-uipath edis-uipath force-pushed the feature/add_mcp_tools_helpers branch 2 times, most recently from fd58216 to 356c164 Compare December 17, 2025 14:27
@edis-uipath edis-uipath force-pushed the feature/add_mcp_tools_helpers branch 4 times, most recently from 61f9cff to e99ee64 Compare December 17, 2025 15:41
@edis-uipath edis-uipath force-pushed the feature/add_mcp_tools_helpers branch from e99ee64 to 0a1c8e6 Compare December 17, 2025 15:42
@edis-uipath edis-uipath merged commit 760dd20 into main Dec 17, 2025
33 of 36 checks passed
@edis-uipath edis-uipath deleted the feature/add_mcp_tools_helpers branch December 17, 2025 16:13
@edis-uipath edis-uipath changed the title agent: Add mcp tools helpers agent: add mcp tools helpers Dec 17, 2025
mjnovice pushed a commit that referenced this pull request Mar 31, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants