Skip to content

A JavaScript error occurred in the main process #1082

Closed
@SivakumarBalu

Description

@SivakumarBalu

Initial Checks

Description

I tried to create my custom/demo MCP Server using the python-sdk. mcp server got installed in the claude desktop app.
INFO Added server 'FastMCP' to Claude config claude.py:137 INFO Successfully installed FastMCP in Claude app cli.py:486

After the installation, when i tried to open the Claude Desktop app in my mac, i got the below error and application never opened.

`
[07/03/25 09:05:11] INFO Added server 'FastMCP' to Claude config claude.py:137
INFO Successfully installed FastMCP in Claude app cli.py:486

Uncaught Exception:
Error: dialog module can only be used after app is ready
at checkAppInitialized (node:electron/js2c/browser_init:2:22982)
at messageBox (node:electron/js2c/browser_init:2:24872)
at Object.showMessageBox (node:electron/js2c/browser_init:2:21217)
at T8e (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index-BV1dxcNB.js:107:9470)
at Ar (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index-BV1dxcNB.js:107:9969)
at Object. (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index-BV1dxcNB.js:261:7978)
at Module._compile (node:internal/modules/cjs/loader:1738:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1904:10)
at Module.load (node:internal/modules/cjs/loader:1472:32)
at Module._load (node:internal/modules/cjs/loader:1289:12)
`

Example Code

#main.py file.
from mcp.server.fastmcp import FastMCP

#create an MCP Server
mcp = FastMCP()

# add an additon tool
@mcp.tool()
def add(a: int, b: int ) -> int:
  return a + b


#add dynamic greeting resource
@mcp.resource("greeting://{name}")
def get_greeting(name: str) -> str:
  return f"Hello, {name}!"

Python & MCP Python SDK

mcp[cli]>=1.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions