Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo MCP and others are now failing for #163

Open
namin opened this issue Jan 23, 2025 · 7 comments
Open

Demo MCP and others are now failing for #163

namin opened this issue Jan 23, 2025 · 7 comments

Comments

@namin
Copy link

namin commented Jan 23, 2025

Describe the bug
I created the demo MCP as in the README, and installed it with mcp install server.py. When I open Claude Desktop, I get the error messages:

2025-01-23T03:49:07.394Z [info] Connected to MCP server Demo!
2025-01-23T03:49:07.764Z [error] Error in MCP connection to server io.livecode.ch: SyntaxError: Unexpected token 'E', "Error: typ"... is not valid JSON
2025-01-23T03:49:07.818Z [error] Error in MCP connection to server Demo: SyntaxError: Unexpected token 'E', "Error: typ"... is not valid JSON
2025-01-23T03:49:07.848Z [info] MCP server Demo disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging)

To Reproduce
Follow the steps in the README for the Demo example. It works perfectly in the inspector but doesn't initialize in Claude.

Desktop:

  • OS: Mac OS X

Additional context
The MCPs based on docker work perfectly and those based on this SDK seem to fail for me.

@tjroamer
Copy link

Got the same error on Windows as well.

@dino-su
Copy link

dino-su commented Jan 24, 2025

same here with mcp 1.2.0 on macOS.

@vishalagrawal-jisr
Copy link

mcp dev server.py

In inspector things are looking fine though.

I think it's trying to list templates and it gives error
resources/templates/list

Error MCP error -32601: Method not found

@klaventall
Copy link

same here with mcp 1.2.0 on macOS.

@sheffler
Copy link
Contributor

sheffler commented Jan 24, 2025

I had the same error:
Unexpected token 'E', "Error: typ"... is

It had to do with UV not finding the home directory of the project/python-file.

Platform: OSX.

Fixed it by adding the --directory path in claude_desktop_config.json

    "MyServer": {
      "command": "/Users/me/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/me/src/mcp2",
        "run",
        "--with",
        "mcp",
        "mcp",
        "run",
        "/Users/me/src/mcp2/tom2server.py"
      ]
    }

@wanderingnature
Copy link

have a look at #148

@Mehdi-Bl
Copy link

1.2.0 introduced breaking changes, so code need to be updated.
Had to update my own code too.

Docker work? which version already you tried?

Fixes are not complicated.

Issue example is here

"mcp>=1.1.3",

https://github.com/modelcontextprotocol/servers/blob/e055e18f8c56951203fdf8f64a811802dad8144b/src/fetch/pyproject.toml#L20C1-L20C18

instead use "mcp=1.1.3"

But I don't recommend that. Best fixing the sever code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants