Does the MCP SDK work with Cursor?

Has anyone been able to make MCP work (using the Python/Typescript SDK) within Cursor?
the external MCPs (loaded into Cursor) work fine. this MCP Typescript SDK call works in the terminal…not within Composer

(echo '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "add", "arguments": {"a": 2, "b": 3}}, "id": 1}'; cat) | node quick_start.js
{"result":{"content":[{"type":"text","text":"5"}]},"jsonrpc":"2.0","id":1}  

trying to add as an MCP server does not seem to work within Composer:
/Demo.add a=2 b=3

within MCP setup in Cursor Settings: within cursor
name: Demo
type: command
command: /usr/local/bin/node /path/to/demo_mcp.js

const { McpServer, ResourceTemplate } = require("@modelcontextprotocol/sdk/server/mcp.js");
const { StdioServerTransport } = require("@modelcontextprotocol/sdk/server/stdio.js");
const { z } = require("zod");

// Create an MCP server
const server = new McpServer({
  name: "Demo",
  version: "1.0.0"
});

// Add an addition tool
server.tool("add",
  { a: z.number(), b: z.number() },
  async ({ a, b }) => ({
    content: [{ type: "text", text: String(a + b) }]
  })
);

// Start receiving messages on stdin and sending messages on stdout
const transport = new StdioServerTransport();
server.connect(transport);

Well, I have my Github MCP Server Running and the Composer TRIES to work with it. Unlike what you did, I got the server from Github MCP Servers.

I run the server within Docker using the Dockerfile provided. The command I use is docker run -i --rm mcp/github . (don’t forget about this last “.”)

But one request out of 5 goes through.
The Composer doesn’t show neither the error description nor the JSON itself. This is really annoying. I keep getting “failed to execute tool” message.

So, in summary, I made it work but it doesn’t. (if you get what I mean)

I have a token with repo permissions.

RE Docker deployment, that makes more sense. I should have tried that first. Maybe I’ll wait a couple of months until MCPs (within Cursor) are mostly baked. At this point, the logging is terrible…basically a black box.