agent: add mcp tools helpers#354
Merged
edis-uipath merged 1 commit intomainfrom Dec 17, 2025
Merged
Conversation
There was a problem hiding this comment.
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.0andlangchain-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.
fd58216 to
356c164
Compare
ionmincu
approved these changes
Dec 17, 2025
61f9cff to
e99ee64
Compare
e99ee64 to
0a1c8e6
Compare
mjnovice
pushed a commit
that referenced
this pull request
Mar 31, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
create_mcp_tools()async context manager to connect to UiPath MCP servers and load LangChain-compatible toolsmcp==1.24.0andlangchain-mcp-adapters==0.2.1httpx.Client()usage patterns