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);