Top-level properties with brackets in tools/list's inputSchema in MCP are incorrectly rejected

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m trying to integrate an MCP Server with Cursor. When I run tools/list, the inputSchema returns a schema with a top-level property name that includes [:

"inputSchema": {
  "type": "object",
  "properties": {
    "query_page[size]": {
      "type": "string",
      "description": "size"
    },
    "query_page[number]": {
      "type": "string",
      "description": "number"
    }
  },
  "additionalProperties": false
}

However, Cursor returns the following error:

Tool xxx: Parameter query_page%5Bsize%5D contains invalid characters

I’ve tested this with the official MCP SDK, and it works fine. According to the JSON Schema specification, a key can legally contain square brackets ([ and ]). The MCP protocol also doesn’t seem to have any restrictions on parameter formats. This suggests that Cursor has added its own, non-standard restrictions when implementing the MCP protocol.

Interestingly, when I move the query_page[size] property from the top level into a nested object, Cursor no longer complains about invalid characters:

"inputSchema": {
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "body": {
      "description": "Weather request",
      "type": "object",
      "contentType": "application/json; charset=utf-8",
      "properties": {
        "country": {
          "type": "string"
        },
        "params": {
          "type": "object",
          "properties": {
            "page[number]": {
              "type": "integer",
              "description": "The number of the page"
            },
            "query_page[size]": {
              "type": "integer",
              "description": "The size of the page"
            }
          },
          "required": [
            "page[size]",
            "page[number]"
          ]
        }
      },
      "required": [
        "country"
      ]
    }
  },
  "required": [
    "body"
  ]
}

This workaround suggests that Cursor is specifically applying a different set of validation rules to top-level properties.

Could you please consider removing this limitation? Using bracketed parameter names like page[size] is a common and valid practice, often used for pagination as shown in this Stack Overflow answer: https://stackoverflow.com/a/62121156. Creating a special, custom API just for Cursor is not a sustainable long-term solution.

Steps to Reproduce

Write a MCP server which handles tools/list. And the inputSchema returns a schema with a top-level property name that includes brackets:

"inputSchema": {
  "type": "object",
  "properties": {
    "query_page[size]": {
      "type": "string",
      "description": "size"
    },
    "query_page[number]": {
      "type": "string",
      "description": "number"
    }
  },
  "additionalProperties": false
}

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.5
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.