MCP not working in cursor CLI print mode

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Hi,

I am trying to run a query which uses MCP tool via Cusror CLI (print mode). Its attempting to invoke the MCP tool but its failing with the following error →

[
    {
        "type": "system",
        "subtype": "init",
        "apiKeySource": "login",
        "cwd": "/Users/<>/<>",
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a",
        "model": "Claude 4 Sonnet",
        "permissionMode": "default"
    }{
        "type": "user",
        "message": {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "get me details of this jira ticket https://<>.jira.com/browse/<<JIRA_ID>>-10839"
                }
            ]
        },
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a"
    }{
        "type": "assistant",
        "message": {
            "role": "assistant",
            "content": [
                {
                    "type": "text",
                    "text": "I’ll get"
                }
            ]
        },
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a"
    }{
        "type": "assistant",
        "message": {
            "role": "assistant",
            "content": [
                {
                    "type": "text",
                    "text": " the details of the JIRA ticket I"
                }
            ]
        },
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a"
    }{
        "type": "assistant",
        "message": {
            "role": "assistant",
            "content": [
                {
                    "type": "text",
                    "text": "DP-10839 for you."
                }
            ]
        },
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a"
    }{
        "type": "tool_call",
        "subtype": "started",
        "call_id": "toolu_017yTFpzhY5xTyBigiP6Vede",
        "tool_call": {
            "mcpToolCall": {
                "args": {
                    "name": "confluence-jira-gitlab-jira_get_issue",
                    "args": {
                        "issueUrl": "https://<>.jira.com/browse/<<JIRA_ID>>-10839"
                    },
                    "toolCallId": "toolu_017yTFpzhY5xTyBigiP6Vede",
                    "providerIdentifier": "confluence-jira-gitlab",
                    "toolName": "jira_get_issue"
                }
            }
        },
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a"
    }{
        "type": "tool_call",
        "subtype": "completed",
        "call_id": "toolu_017yTFpzhY5xTyBigiP6Vede",
        "tool_call": {
            "mcpToolCall": {
                "args": {
                    "name": "confluence-jira-gitlab-jira_get_issue",
                    "args": {
                        "issueUrl": "https://<>.jira.com/browse/<<JIRA_ID>>-10839"
                    },
                    "toolCallId": "toolu_017yTFpzhY5xTyBigiP6Vede",
                    "providerIdentifier": "confluence-jira-gitlab",
                    "toolName": "jira_get_issue"
                },
                "result": {
                    "rejected": {
                        "reason": "MCP tool execution rejected by user: confluence-jira-gitlab-jira_get_issue "
                    }
                }
            }
        },
        "session_id": "8a9e451f-36ef-4403-8e78-b14e21a4de0a"
    }
]

However, the same workflow works in interactive mode. Can you please check ?

I have also copied the global cursor mcp config into the project directory under .cursor/mcp.json. The MCP server is running locally by the way →

MCP server config

{
  "mcpServers": {
    "confluence-jira-gitlab": {
      "command": "/opt/homebrew/bin/node",
      "args": ["/Users/<<my-username>>/mcp_server_node/dist/server.js"],
      "cwd": "/Users/<<my-username>>/mcp_server_node",
      "env": {
        "CONFLUENCE_BASE_URL": "...."
      }
    }
  }
} 

Also here is the cli-config.json with allowed list of commands

   1   │ {
   2   │   "permissions": {
   3   │     "allow": [
   4   │       "Shell(**)",
   5   │       "Shell(ls)",
   6   │       "Shell(npm",
   7   │       "Shell(git)",
   8   │       "Shell(node)",
   9   │       "Shell(/opt/homebrew/bin/node)",
  10   │       "Shell(node)"
  11   │     ],
  12   │     "deny": []
  13   │   },
  14   │   "version": 1,
  15   │   "editor": {
  16   │     "vimMode": false
  17   │   },
  18   │   "model": {
  19   │     "modelId": "claude-4-sonnet",
  20   │     "displayModelId": "sonnet-4",
  21   │     "displayName": "Claude 4 Sonnet",
  22   │     "displayNameShort": "Sonnet 4",
  23   │     "aliases": [
  24   │       "sonnet",
  25   │       "sonnet-4"
  26   │     ]
  27   │   },
  28   │   "hasChangedDefaultModel": true,
  29   │   "privacyCache": {
  30   │     "ghostMode": true,
  31   │     "privacyMode": 1,
  32   │     "updatedAt": 1757172127178
  33   │   }
  34   │ }

Steps to Reproduce

Run the cursor agent in print mode.
Invoke a query that should trigger MCP tool.

Expected Behavior

It should be able to invoke the MCP tool just like its doing in the interactive mode.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

2025.09.04-fc40cd1 (CLI version)

IDE →
Version: 1.5.9 (Universal)
VSCode Version: 1.99.3
Commit: de327274300c6f38ec9f4240d11e82c3b0660b20
Date: 2025-08-30T21:02:27.236Z
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

Yes - Cursor is unusable

hi @bdev-mc thank you for the detailed report. I sent it to the team for review.