MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

C
Cursor MCP Issue Repro
作者 @jlowin

MCP server by jlowin

创建于 11/16/2025
更新于 29 days ago
Repository documentation and setup instructions

Cursor MCP Optional Parameter Issue Repro

This repository demonstrates an issue with Cursor's MCP client when calling MCP server tools with optional parameters.

Screenshot

Issue

When calling an MCP tool that has an optional parameter (e.g., b: int | None = None), there's a type validation error. The error message suggests the parameter may be passed as a string instead of an integer, but the root cause isn't fully understood.

Example

The add tool in server.py accepts an optional b parameter. Calling with only the non-optional parameter works fine (e.g., a=100). However, when called with both parameters (a=100, b=200), it results in: Parameter 'b' must be one of types [integer, null], got string.

Reproduction Steps

  1. Install dependencies:

    uv sync
    
  2. The MCP server is configured in .cursor/mcp.json and should be auto-discovered when you open this repository as a workspace in Cursor.

  3. Ask the Cursor agent to call the add tool with only a (e.g., "call the add tool with a = 100"). This should work successfully.

  4. Ask the Cursor agent to call the add tool with both a and b (e.g., "call the add tool with a = 100 and b = 200"). This will reproduce the type validation error.

快速设置
此服务器的安装指南

安装包 (如果需要)

uvx cursor-mcp-issue-repro

Cursor 配置 (mcp.json)

{ "mcpServers": { "jlowin-cursor-mcp-issue-repro": { "command": "uvx", "args": [ "cursor-mcp-issue-repro" ] } } }
作者服务器
其他服务器由 jlowin