[PR #41] [MERGED] fix: resolve mcpo startup fail when mcp tool parameters are missing #143

Closed
opened 2026-02-15 21:15:06 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/mcpo/pull/41
Author: @chizukicn
Created: 4/3/2025
Status: Merged
Merged: 4/3/2025
Merged by: @tjbck

Base: devHead: fix/no-parms


📝 Commits (8)

  • 89fc170 Merge pull request #25 from open-webui/dev
  • ae06f3a Merge pull request #26 from open-webui/dev
  • 9c00c2e Merge pull request #27 from open-webui/dev
  • a47b7af Merge pull request #29 from open-webui/dev
  • 954910e Merge pull request #30 from open-webui/dev
  • e55975a Merge pull request #32 from open-webui/dev
  • f1b5fbd Merge pull request #38 from open-webui/dev
  • b931e26 fix: resolve mcpo startup fail when mcp tool parameters are missing

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/mcpo/main.py (+2 -1)

📄 Description


Pull Request

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Fixed an issue where mcpo wouldn’t start if mcp tool parameters were not set.
  • Changelog: Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
  • Dependencies: No new dependencies introduced.
  • Testing: The issue was tested and verified locally by simulating missing parameters for the mcp tool.
  • Code review: I have reviewed the code and ensured it meets the project's coding standards.
  • Prefix: fix

Changelog Entry

Fixed

  • Fixed an issue where mcpo would fail to start when mcp tool parameters were missing. Now mcpo handles missing parameters by using default values or providing appropriate error messages.

Reproduction

https://github.com/chizukicn/mcp-ts-example

mcp tool code

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
// Create an MCP server
const server = new McpServer({
  name: "My Server",
  version: "1.0.0",
});

server.tool("nothing", "do nothing",  () => {
  return {
    content: [{
      type: "text",
      text: `什么也没干`
    }]
  };
});

const transport = new StdioServerTransport();

server.connect(transport);

config.json

{
  "mcpServers": {
    "ts-mcp": {
      "command": "tsx",
      "args": ["src/index.ts"]
    }
  }
}

Screenshots or Videos

  • image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/mcpo/pull/41 **Author:** [@chizukicn](https://github.com/chizukicn) **Created:** 4/3/2025 **Status:** ✅ Merged **Merged:** 4/3/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix/no-parms` --- ### 📝 Commits (8) - [`89fc170`](https://github.com/open-webui/mcpo/commit/89fc170a022dd098a2ed02f295390eaf50a34f91) Merge pull request #25 from open-webui/dev - [`ae06f3a`](https://github.com/open-webui/mcpo/commit/ae06f3a8639fb9339849f65e9e417ae55358f8e4) Merge pull request #26 from open-webui/dev - [`9c00c2e`](https://github.com/open-webui/mcpo/commit/9c00c2e721903268499094da8656c1302fd1f03d) Merge pull request #27 from open-webui/dev - [`a47b7af`](https://github.com/open-webui/mcpo/commit/a47b7afea0ddc6852a8c764aa5a76fa99e3a8d9c) Merge pull request #29 from open-webui/dev - [`954910e`](https://github.com/open-webui/mcpo/commit/954910ec69a9d389be884c9a5143ed7ea84324b9) Merge pull request #30 from open-webui/dev - [`e55975a`](https://github.com/open-webui/mcpo/commit/e55975a876daff96eb7f792d3a5bcf4677386606) Merge pull request #32 from open-webui/dev - [`f1b5fbd`](https://github.com/open-webui/mcpo/commit/f1b5fbd52cfd2b3e58ae76ad266d99dc5f0a1db0) Merge pull request #38 from open-webui/dev - [`b931e26`](https://github.com/open-webui/mcpo/commit/b931e26ebb7c2c475bd195a21247e6e96e4d331c) fix: resolve mcpo startup fail when mcp tool parameters are missing ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/mcpo/main.py` (+2 -1) </details> ### 📄 Description --- # Pull Request **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Fixed an issue where mcpo wouldn’t start if mcp tool parameters were not set. - [x] **Changelog:** Ensure a changelog entry following the format of [[Keep a Changelog](https://keepachangelog.com/)](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Dependencies:** No new dependencies introduced. - [x] **Testing:** The issue was tested and verified locally by simulating missing parameters for the mcp tool. - [x] **Code review:** I have reviewed the code and ensured it meets the project's coding standards. - [x] **Prefix:** `fix` # Changelog Entry ### Fixed - Fixed an issue where mcpo would fail to start when mcp tool parameters were missing. Now mcpo handles missing parameters by using default values or providing appropriate error messages. ### Reproduction https://github.com/chizukicn/mcp-ts-example **mcp tool code** ```typescript import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; // Create an MCP server const server = new McpServer({ name: "My Server", version: "1.0.0", }); server.tool("nothing", "do nothing", () => { return { content: [{ type: "text", text: `什么也没干` }] }; }); const transport = new StdioServerTransport(); server.connect(transport); ``` **config.json** ```json { "mcpServers": { "ts-mcp": { "command": "tsx", "args": ["src/index.ts"] } } } ``` ### Screenshots or Videos - <img width="1004" alt="image" src="https://github.com/user-attachments/assets/01b600ac-898f-45a6-8a72-a1e3baaf5eb8" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:15:06 -05:00
yindo closed this issue 2026-02-15 21:15:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/mcpo#143