Hi there,
I connected an MCP server (mcp-pyzotero) in Cursor (succesfully connected according to Settings ā MCP page). But when tools are called with parameters, Cursor reports an error of type
Invalid type for parameter '<>' in tool <>
Removing type hints in the tool definitions in the MCP server implementations solved the issue for me, suggesting a mismatch in how Cursor is calling the tools with how the MCP implementations does the type check. See this issue for details for my case: Type error during tool call in Cursor IDE Ā· Issue #3 Ā· gyger/mcp-pyzotero Ā· GitHub
The problem has been reported on the forum here before and seems to be specific to Cursor (no reports with Claude Desktop and this post also shows the tools work in MCP Inspector): Cursor cannot handle MCP server params
The issue was closed without response due to inactivity.
And a related post on the MCP GitHub:
opened 04:27PM - 24 Mar 25 UTC
bug
**Describe the bug**
I'm trying to make Claude call the mcp server github in cur⦠sor to post comments on my pull request, and I keep getting this error:
:warning: `Invalid type for parameter 'pull_number' in tool create_pull_request_review`
I got him to copy me the payload he's using to use the tool, both in XML and in JSON:
```xml
<parameter name="owner">...</parameter>
<parameter name="repo">...</parameter>
<parameter name="issue_number">10549</parameter>
<parameter name="body">
...
</parameter>
```
```json
{
"owner": "...",
"repo": "...",
"pull_number": 10549,
"event": "APPROVE",
"body": "..."
}
```
Both versions gave the error. He tried correcting himself by using many different ways to load the payload, but nothing worked.
I checked the PR exists and I have the permission to post comments. By making him generate a Python script that posts the review and the comments, and it works
Here's my mcp.json config:
```json
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "..."
}
}
```
**To Reproduce**
Steps to reproduce the behavior:
1. Instruct Claude to use the MCP and use the tool `create_pull_request_review` to comment on a PR
**Expected behavior**
The tool works
Iām wondering why there are so few reports of this. Could it be a server implementation issue? Or is this actually an issue in how Cursor calls tools?
Would appreciate any feedback / solution.
Thanks!
Do not use Optional or Union in your tools parameters
1 Like
Me too.
Iām using the Figma-Context-MCP extension, and whenever I call the download_figma_images
tool it always causes the following error:
Invalid type for parameter nodes
in tool download_figma_images
.
The MCP settings appear to be valid, and calling the get_figma_data
tool works without any errors.
My Cursor environment:
Version: 0.49.4
VSCode Version: 1.96.2
Commit: ec408037b24566b11e6132c58bbe6ad27046eb90
Date: 2025-04-22T00:13:20.211Z
Electron: 34.3.4
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.4.0