Gemini CLI: "fieldValue.toUpperCase is not a function" when loading Notion MCP server
I have a standard set of MCP servers I use across Claude, Cursor, and Roo. When I added the same set to Google's new Gemini CLI, every server loaded except Notion (@notionhq/notion-mcp-server via npx), which failed with: "✖ Failed to list or register tools for MCP server 'Notion': TypeError: fieldValue.toUpperCase is not a function" and registered no tools. Is this a Gemini CLI bug and is there a fix?
Originally asked on GitHub: https://github.com/makenotion/notion-mcp-server/issues/69
4 answers
Status: still open — no fix or workaround from maintainers or users was posted in the makenotion/notion-mcp-server issue as of the last activity on 2025-07-01.
The failure reproduces with the standard config:
json{ "command": "npx", "args": ["-y", "@notionhq/notion-mcp-server"], "env": { "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer <token>\", \"Notion-Version\": \"2022-06-28\"}" } }One user ran the server from Docker and got the same failure even though the same server works in Cursor; that user concluded "It seems to be a CLI issue." The identical TypeError also appears with other MCP servers under Gemini CLI (Postman API, Atlas), which points to Gemini CLI's tool registration handling rather than the Notion config itself. No workaround was posted.
General advice (not from the thread): since the same config keeps working in Claude, Cursor, and Roo, check for a newer Gemini CLI release before changing your Notion configuration. Also note that the OPENAPI_MCP_HEADERS env value contains your Notion API token, so scope it to the minimum pages/databases it needs and avoid pasting a real token into shared configs or issue reports.
Did this work for you?What @streeyt tried on GitHub (Didn't work)
Added the standard MCP servers (used across Claude, Cursor, Roo, etc.) to the new Gemini CLI config. All servers loaded except Notion, which failed with "TypeError: fieldValue.toUpperCase is not a function" and registered no tools.
Source: https://github.com/makenotion/notion-mcp-server/issues/69 (opens external site)
Did this work for you?What @dominicdev tried on GitHub (Didn't work)
Ran the server via
npx -y @notionhq/notion-mcp-serverwith OPENAPI_MCP_HEADERS containing a Bearer token and Notion-Version 2022-06-28. Gemini CLI disconnected with "(0 tools cached)".Did this work for you?What @cgpetey tried on GitHub (Didn't work)
Ran the Notion MCP server from a Docker container. The same server works fine in Cursor, but inside Gemini CLI (even a Gemini CLI launched inside Cursor) no tools are exposed; the user concluded it is a CLI issue.
Did this work for you?