From d2bcbeecb5eb39e1d92f7c45f33feb48cb2d969c Mon Sep 17 00:00:00 2001 From: Helix Date: Sun, 30 Mar 2025 22:32:48 +0200 Subject: [PATCH 1/4] Update README.md to add a new Community Server (Shodan) Commit to add the Shodan MCP Server to the wiki for direct interaction. Compatible at the date of this commit with Cursor, Claude and VSCode Insiders. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1ebd7d52..f6171f12 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[scrapling-fetch](https://github.com/cyberchitta/scrapling-fetch-mcp)** - Access text content from bot-protected websites. Fetches HTML/markdown from sites with anti-automation measures using Scrapling. - **[SearXNG](https://github.com/ihor-sokoliuk/mcp-searxng)** - A Model Context Protocol Server for [SearXNG](https://docs.searxng.org) - **[ServiceNow](https://github.com/osomai/servicenow-mcp)** - A MCP server to interact with a ServiceNow instance +- **[Shodan MCP](https://github.com/Hexix23/shodan-mcp)** - MCP server to interact with [Shodan](https://www.shodan.io/) - **[Siri Shortcuts](https://github.com/dvcrn/mcp-server-siri-shortcuts)** - MCP to interact with Siri Shortcuts on macOS. Exposes all Shortcuts as MCP tools. - **[Snowflake](https://github.com/isaacwasserman/mcp-snowflake-server)** - This MCP server enables LLMs to interact with Snowflake databases, allowing for secure and controlled data operations. - **[Solana Agent Kit](https://github.com/sendaifun/solana-agent-kit/tree/main/examples/agent-kit-mcp-server)** - This MCP server enables LLMs to interact with the Solana blockchain with help of Solana Agent Kit by SendAI, allowing for 40+ protcool actions and growing From 3894d236c0eb54377f88991db4979cc5b4dd7d17 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Thu, 15 May 2025 14:13:15 -0400 Subject: [PATCH 2/4] * In src/everything/sse.ts and streamableHttp.ts - Replace console.log with console.error throughout * In src/everything/sse.ts - remove the process.exit() in the server.onclose handler so reconnections are possible --- src/everything/sse.ts | 7 +++---- src/everything/streamableHttp.ts | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/everything/sse.ts b/src/everything/sse.ts index 928916c7..b687ad40 100644 --- a/src/everything/sse.ts +++ b/src/everything/sse.ts @@ -11,24 +11,23 @@ const { server, cleanup } = createServer(); let transport: SSEServerTransport; app.get("/sse", async (req, res) => { - console.log("Received connection"); + console.error("Received connection"); transport = new SSEServerTransport("/message", res); await server.connect(transport); server.onclose = async () => { await cleanup(); await server.close(); - process.exit(0); }; }); app.post("/message", async (req, res) => { - console.log("Received message"); + console.error("Received message"); await transport.handlePostMessage(req, res); }); const PORT = process.env.PORT || 3001; app.listen(PORT, () => { - console.log(`Server is running on port ${PORT}`); + console.error(`Server is running on port ${PORT}`); }); diff --git a/src/everything/streamableHttp.ts b/src/everything/streamableHttp.ts index e6486dfa..9ea3a8fc 100644 --- a/src/everything/streamableHttp.ts +++ b/src/everything/streamableHttp.ts @@ -13,7 +13,7 @@ const { server, cleanup } = createServer(); const transports: { [sessionId: string]: StreamableHTTPServerTransport } = {}; app.post('/mcp', async (req: Request, res: Response) => { - console.log('Received MCP POST request'); + console.error('Received MCP POST request'); try { // Check for existing session ID const sessionId = req.headers['mcp-session-id'] as string | undefined; @@ -31,7 +31,7 @@ app.post('/mcp', async (req: Request, res: Response) => { onsessioninitialized: (sessionId) => { // Store the transport by session ID when session is initialized // This avoids race conditions where requests might come in before the session is stored - console.log(`Session initialized with ID: ${sessionId}`); + console.error(`Session initialized with ID: ${sessionId}`); transports[sessionId] = transport; } }); @@ -40,7 +40,7 @@ app.post('/mcp', async (req: Request, res: Response) => { transport.onclose = () => { const sid = transport.sessionId; if (sid && transports[sid]) { - console.log(`Transport closed for session ${sid}, removing from transports map`); + console.error(`Transport closed for session ${sid}, removing from transports map`); delete transports[sid]; } }; @@ -85,7 +85,7 @@ app.post('/mcp', async (req: Request, res: Response) => { // Handle GET requests for SSE streams (using built-in support from StreamableHTTP) app.get('/mcp', async (req: Request, res: Response) => { - console.log('Received MCP GET request'); + console.error('Received MCP GET request'); const sessionId = req.headers['mcp-session-id'] as string | undefined; if (!sessionId || !transports[sessionId]) { res.status(400).json({ @@ -102,9 +102,9 @@ app.get('/mcp', async (req: Request, res: Response) => { // Check for Last-Event-ID header for resumability const lastEventId = req.headers['last-event-id'] as string | undefined; if (lastEventId) { - console.log(`Client reconnecting with Last-Event-ID: ${lastEventId}`); + console.error(`Client reconnecting with Last-Event-ID: ${lastEventId}`); } else { - console.log(`Establishing new SSE stream for session ${sessionId}`); + console.error(`Establishing new SSE stream for session ${sessionId}`); } const transport = transports[sessionId]; @@ -126,7 +126,7 @@ app.delete('/mcp', async (req: Request, res: Response) => { return; } - console.log(`Received session termination request for session ${sessionId}`); + console.error(`Received session termination request for session ${sessionId}`); try { const transport = transports[sessionId]; @@ -150,17 +150,17 @@ app.delete('/mcp', async (req: Request, res: Response) => { // Start the server const PORT = process.env.PORT || 3001; app.listen(PORT, () => { - console.log(`MCP Streamable HTTP Server listening on port ${PORT}`); + console.error(`MCP Streamable HTTP Server listening on port ${PORT}`); }); // Handle server shutdown process.on('SIGINT', async () => { - console.log('Shutting down server...'); + console.error('Shutting down server...'); // Close all active transports to properly clean up resources for (const sessionId in transports) { try { - console.log(`Closing transport for session ${sessionId}`); + console.error(`Closing transport for session ${sessionId}`); await transports[sessionId].close(); delete transports[sessionId]; } catch (error) { @@ -169,6 +169,6 @@ process.on('SIGINT', async () => { } await cleanup(); await server.close(); - console.log('Server shutdown complete'); + console.error('Server shutdown complete'); process.exit(0); }); From 26aa0f8091853ebc43d481f1e8f95cf960bb0a5c Mon Sep 17 00:00:00 2001 From: cliffhall Date: Thu, 15 May 2025 14:32:42 -0400 Subject: [PATCH 3/4] * In src/everything/sse.ts - add SIGINT handler that does cleanup, server.close, and process.exit --- src/everything/sse.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/everything/sse.ts b/src/everything/sse.ts index b687ad40..01794cdd 100644 --- a/src/everything/sse.ts +++ b/src/everything/sse.ts @@ -19,6 +19,7 @@ app.get("/sse", async (req, res) => { await cleanup(); await server.close(); }; + }); app.post("/message", async (req, res) => { @@ -27,7 +28,14 @@ app.post("/message", async (req, res) => { await transport.handlePostMessage(req, res); }); +process.on("SIGINT", async () => { + await cleanup(); + await server.close(); + process.exit(0); +}); + const PORT = process.env.PORT || 3001; app.listen(PORT, () => { console.error(`Server is running on port ${PORT}`); }); + From 72db651adc2fd98eb48014f885cb2b0c21b68c91 Mon Sep 17 00:00:00 2001 From: Hexix23 Date: Sat, 17 May 2025 19:51:58 +0200 Subject: [PATCH 4/4] Update README.md to improve clarity and organization of reference servers --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f6171f12..4432d0e4 100644 --- a/README.md +++ b/README.md @@ -324,6 +324,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[SearXNG](https://github.com/ihor-sokoliuk/mcp-searxng)** - A Model Context Protocol Server for [SearXNG](https://docs.searxng.org) - **[ServiceNow](https://github.com/osomai/servicenow-mcp)** - A MCP server to interact with a ServiceNow instance - **[Shodan MCP](https://github.com/Hexix23/shodan-mcp)** - MCP server to interact with [Shodan](https://www.shodan.io/) +- **[Shopify](https://github.com/GeLi2001/shopify-mcp)** - MCP to interact with Shopify API including order, product, customers and so on. - **[Siri Shortcuts](https://github.com/dvcrn/mcp-server-siri-shortcuts)** - MCP to interact with Siri Shortcuts on macOS. Exposes all Shortcuts as MCP tools. - **[Snowflake](https://github.com/isaacwasserman/mcp-snowflake-server)** - This MCP server enables LLMs to interact with Snowflake databases, allowing for secure and controlled data operations. - **[Solana Agent Kit](https://github.com/sendaifun/solana-agent-kit/tree/main/examples/agent-kit-mcp-server)** - This MCP server enables LLMs to interact with the Solana blockchain with help of Solana Agent Kit by SendAI, allowing for 40+ protcool actions and growing