MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

C
Cursor MCP Issue Repro

MCP server by jlowin

Created 11/16/2025
Updated 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.

Quick Setup
Installation guide for this server

Install Package (if required)

uvx cursor-mcp-issue-repro

Cursor configuration (mcp.json)

{ "mcpServers": { "jlowin-cursor-mcp-issue-repro": { "command": "uvx", "args": [ "cursor-mcp-issue-repro" ] } } }
Author Servers
Other servers by jlowin