Skip to content

fix(platform): add Swagger (type 7) to McpServerType#1762

Merged
PopescuTudor merged 1 commit into
mainfrom
fix/mcp-server-type-swagger
Jun 25, 2026
Merged

fix(platform): add Swagger (type 7) to McpServerType#1762
PopescuTudor merged 1 commit into
mainfrom
fix/mcp-server-type-swagger

Conversation

@PopescuTudor

Copy link
Copy Markdown
Collaborator

Problem

The backend exposes a Swagger MCP server type — a user-provided Swagger/OpenAPI spec served as an MCP server — with enum value 7, but McpServerType (in uipath-platform) stops at Platform = 6. McpService.retrieve_async validates the Orchestrator response into McpServer, so any agent that resolves a Swagger MCP server crashes:

pydantic_core.ValidationError: 1 validation error for McpServer
type
  Input should be 0, 1, 2, 3, 4, 5 or 6 [type=enum, input_value=7]

This surfaced on a coded agent calling a registered Swagger MCP (an "Employee Directory" OpenAPI server) — mcp.retrieve_async failed before tools could be listed.

Change

Add Swagger = 7 to McpServerType, matching the Orchestrator/AgentHub enum (UiServer.cs: Swagger = 7 // User-provided Swagger/OpenAPI spec exposed as MCP server).

The MCP client connects via mcp_url and does not branch on type, so accepting the value is sufficient for the server to load its tools — no further handling needed.

Tests

  • McpServerType.Swagger == 7
  • McpServer.model_validate({"type": 7, …}) validates (regression for backend server types newer than the SDK enum).
  • uv sync --locked, ruff, mypy, and the mcp-service test module pass.

Versioning

Bumps uipath-platform 0.1.76 → 0.1.77 (+ refreshes the editable entry in uipath/uipath-platform lockfiles).

🤖 Generated with Claude Code

https://claude.ai/code/session_01ELDu3m5eaURJrMVarc8VfY

The backend exposes a Swagger MCP server type (a user-provided Swagger/OpenAPI
spec served as an MCP server) with enum value 7, but McpServerType stopped at
Platform = 6. mcp.retrieve_async validates the response into McpServer, so any
agent that resolves a Swagger MCP server fails with:

    1 validation error for McpServer
    type: Input should be 0, 1, 2, 3, 4, 5 or 6 [input_value=7]

Add Swagger = 7, matching the Orchestrator/AgentHub enum. The MCP client
connects via mcp_url and does not branch on type, so accepting the value is
sufficient for the server to load.

Bumps uipath-platform 0.1.76 -> 0.1.77.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELDu3m5eaURJrMVarc8VfY
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jun 25, 2026
@sonarqubecloud

Copy link
Copy Markdown

@PopescuTudor PopescuTudor merged commit 8cfb822 into main Jun 25, 2026
92 of 94 checks passed
@PopescuTudor PopescuTudor deleted the fix/mcp-server-type-swagger branch June 25, 2026 08:32
@PopescuTudor

Copy link
Copy Markdown
Collaborator Author

Superseded: McpServerType.Swagger = 7 already landed on main and is released in uipath-platform 0.1.77 on PyPI, so this change is redundant and the version bump collides. Closing.

@PopescuTudor

Copy link
Copy Markdown
Collaborator Author

Correction to my previous comment: this PR was in fact already merged and released as uipath-platform 0.1.77 — disregard the 'superseded/redundant' note above. The Swagger (type 7) enum value is live on PyPI.

viswa-uipath pushed a commit that referenced this pull request Jun 26, 2026
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants