Describe the Bug
I have implemented a custom MCP (Model Context Protocol) server for Zephyr Scale API integration. The tools are successfully registered and appear in Cursor’s MCP tools list, but the parameter schemas are not displaying correctly. Instead of showing the actual Joi schema parameters I’ve defined, all tools show a generic “random_string: Dummy parameter for non-parameter tools” parameter.
Expected Behavior:
Tools should display the actual schema parameters defined in my Joi schemas. For example, listTestCases should show parameters like:
projectKey (string, required)
folderId (number, optional)
maxResults (number, optional)
startAt (number, optional)
Actual Behavior:
All tools show only: random_string: Dummy parameter for no-parameter tools
Technical Details:
MCP Server Configuration: Located in ~/.cursor/mcp.json
Server Type: Custom TypeScript MCP server using @modelcontextprotocol/sdk
Schema System: Using Joi schemas converted to JSON Schema format
Tool Registration: Using server.setRequestHandler(ListToolsRequestSchema, …) with proper inputSchema parameter
What I’ve Verified:
API calls work correctly when tools are invoked
Schemas are properly detected and converted from Joi to JSON Schema format
CLI mode works perfectly with correct parameter validation
MCP server starts without errors and tools are listed
Debug output shows proper schema structure being returned
Code Sample - Tool Registration:
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: tools.map(tool => ({
name: tool.name,
description: tool.description,
inputSchema: tool.schema // This contains proper JSON Schema
}))
}));
MCP Configuration:
“Zephyr Scale Tools”: {
“command”: “npx”,
“args”: [“ts-node”, “/Users/[USER NAME]/Documents/Projects/custom-model-contexts/src/index.ts”],
“cwd”: “/Users/[USER NAME]/Documents/Projects/custom-model-contexts”
}
Environment:
OS: macOS 14.5.0 (Darwin 24.5.0)
Cursor Version: [Please include your current Cursor version]
Node.js: [Your Node.js version]
MCP SDK Version: Latest (@modelcontextprotocol/sdk)
This issue has been started after I upgrade my Cursor IDE to
Version: 1.1.6 (Universal)
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:16:57.571Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.5.0
Steps to Reproduce
Here are the detailed steps to reproduce the MCP parameter schema bug for Cursor IDE support:
Bug Report: MCP Tools Show Generic “random_string” Parameter Instead of Actual Schema
Steps to Reproduce
Prerequisites
- macOS with Node.js installed
- Cursor IDE installed
- Terminal access
Step 1: Create Test MCP Server
-
Create a new directory:
mkdir ~/test-mcp-server cd ~/test-mcp-server
-
Initialize Node.js project:
npm init -y npm install @modelcontextprotocol/sdk joi joi-to-json-schema npm install -D typescript ts-node @types/node
-
Create
server.ts
with this minimal test case:#!/usr/bin/env node import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js'; import Joi from 'joi'; import convert from 'joi-to-json-schema'; // Define a simple schema const testSchema = Joi.object({ projectKey: Joi.string().required().description('Project key identifier'), maxResults: Joi.number().integer().min(1).max(100).default(50).description('Maximum results to return'), startAt: Joi.number().integer().min(0).default(0).description('Starting index for pagination') }); const server = new Server( { name: 'test-mcp-server', version: '1.0.0' }, { capabilities: { tools: {} } } ); // Register tools with proper schema server.setRequestHandler(ListToolsRequestSchema, async () => { const jsonSchema = convert(testSchema); console.error('DEBUG: Returning schema:', JSON.stringify(jsonSchema, null, 2)); return { tools: [{ name: 'test_tool', description: 'A test tool with proper schema', inputSchema: jsonSchema }] }; }); // Handle tool calls server.setRequestHandler(CallToolRequestSchema, async (request) => { if (request.params.name === 'test_tool') { return { content: [{ type: 'text', text: `Called with args: ${JSON.stringify(request.params.arguments)}` }] }; } throw new Error(`Unknown tool: ${request.params.name}`); }); async function main() { const transport = new StdioServerTransport(); await server.connect(transport); } main().catch(console.error);
Step 2: Configure MCP in Cursor
- Open
~/.cursor/mcp.json
(create if doesn’t exist) - Add the test server configuration:
{ "mcpServers": { "test-mcp": { "command": "npx", "args": [ "ts-node", "/Users/[YOUR_USERNAME]/test-mcp-server/server.ts" ], "cwd": "/Users/[YOUR_USERNAME]/test-mcp-server" } } }
- Save the file
Step 3: Test Server Works Standalone
- Verify the server can start:
cd ~/test-mcp-server npx ts-node server.ts
- It should wait for input (MCP protocol). Press Ctrl+C to exit.
Step 4: Restart Cursor
- Completely quit Cursor IDE
- Relaunch Cursor IDE
- Wait 10-15 seconds for MCP servers to initialize
Step 5: Reproduce the Bug
- In Cursor, access the MCP tools interface (usually via command palette or tools panel)
- Look for the
test_tool
from the “test-mcp” server - Click on the tool to view its parameters
Expected Result:
Should show parameters:
projectKey
(string, required) - “Project key identifier”maxResults
(number, optional, default: 50) - “Maximum results to return”startAt
(number, optional, default: 0) - “Starting index for pagination”
Actual Result:
Shows only:
random_string
(string, required) - “Dummy parameter for no-parameter tools”
Step 6: Verify Schema is Actually Correct
- Check the debug output in Cursor’s MCP logs (if available) or run:
cd ~/test-mcp-server echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npx ts-node server.ts
- You should see the proper JSON schema being output in the DEBUG line
Step 7: Additional Verification
- Try with an even simpler schema:
const simpleSchema = { type: 'object', properties: { name: { type: 'string', description: 'A simple name parameter' } }, required: ['name'] };
- Replace the
convert(testSchema)
withsimpleSchema
and test again - The issue should persist even with hand-crafted JSON Schema
Environment Details
- OS: macOS [version]
- Cursor Version: [your version]
- Node.js Version: [your version]
- MCP SDK Version: Latest from npm
Expected vs Actual Behavior
- Expected: MCP tools should display the actual schema parameters defined in
inputSchema
- Actual: All MCP tools show a generic
random_string
parameter regardless of their actual schema
Impact
This prevents users from properly using custom MCP tools as they cannot see what parameters are actually required or available.
Additional Notes
- The tools themselves work correctly when called with proper parameters
- The issue appears to be in Cursor’s parameter schema parsing/display logic
- Other MCP implementations (like built-in servers) may or may not exhibit this issue
These steps create a minimal reproducible test case that should clearly demonstrate the bug to the Cursor support team.
Expected Behavior
MCP Client should recognise the Tool expected parameters. Should not return random_string
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.1.6 (Universal)
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:16:57.571Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.5.0