From c1d51a9a4c73098ccdb9ee7fc0e78e7d748e473f Mon Sep 17 00:00:00 2001 From: Vortiago Date: Sat, 22 Mar 2025 18:43:48 +0100 Subject: [PATCH 01/15] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index acdc3624..a1eb90bf 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[OpenDota](https://github.com/asusevski/opendota-mcp-server)** - Interact with OpenDota API to retrieve Dota 2 match data, player statistics, and more. - **[OpenRPC](https://github.com/shanejonas/openrpc-mpc-server)** - Interact with and discover JSON-RPC APIs via [OpenRPC](https://open-rpc.org). - **[Open Strategy Partners Marketing Tools](https://github.com/open-strategy-partners/osp_marketing_tools)** - Content editing codes, value map, and positioning tools for product marketing. +- **[Outline](https://github.com/Vortiago/mcp-outline)** - MCP Server to interact with [Outline](https://www.getoutline.com) knowledge base to search, read, create, and manage documents and their content, access collections, add comments, and manage document backlinks. - **[Pandoc](https://github.com/vivekVells/mcp-pandoc)** - MCP server for seamless document format conversion using Pandoc, supporting Markdown, HTML, PDF, DOCX (.docx), csv and more. - **[PIF](https://github.com/hungryrobot1/MCP-PIF)** - A Personal Intelligence Framework (PIF), providing tools for file operations, structured reasoning, and journal-based documentation to support continuity and evolving human-AI collaboration across sessions. - **[Pinecone](https://github.com/sirmews/mcp-pinecone)** - MCP server for searching and uploading records to Pinecone. Allows for simple RAG features, leveraging Pinecone's Inference API. From 013c663b466b7380b550dd1e65a29b9a508f83ae Mon Sep 17 00:00:00 2001 From: zelin Date: Wed, 26 Mar 2025 11:36:07 +0800 Subject: [PATCH 02/15] add new server in readme for community part --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 42bd6c2c..2daed75d 100644 --- a/README.md +++ b/README.md @@ -337,6 +337,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[xiyan_mcp_server](https://github.com/XGenerationLab/xiyan_mcp_server)** An MCP server that supports fetching data from a database using natural language queries, powered by XiyanSQL as the text-to-SQL LLM. - **[XMind](https://github.com/apeyroux/mcp-xmind)** - Read and search through your XMind directory containing XMind files. - **[YouTube](https://github.com/ZubeidHendricks/youtube-mcp-server)** - Comprehensive YouTube API integration for video management, Shorts creation, and analytics. +- **[PubChem](https://github.com/sssjiang/pubchem_mcp_server)** - extract drug information from pubchem API. ## šŸ“š Frameworks From 4b8d81fc405da9233e5526f06aa38d0cd69d1bc3 Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Thu, 17 Apr 2025 20:46:56 -0700 Subject: [PATCH 03/15] docs: add arize-phoenix to official integrations --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b7d0bb0b..9032e341 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ Official integrations are maintained by companies building production ready MCP - Apache IoTDB Logo **[Apache IoTDB](https://github.com/apache/iotdb-mcp-server)** - MCP Server for [Apache IoTDB](https://github.com/apache/iotdb) database and its tools - Apify Logo **[Apify](https://github.com/apify/actors-mcp-server)** - [Actors MCP Server](https://apify.com/apify/actors-mcp-server): Use 3,000+ pre-built cloud tools to extract data from websites, e-commerce, social media, search engines, maps, and more - APIMatic Logo **[APIMatic MCP](https://github.com/apimatic/apimatic-validator-mcp)** - APIMatic MCP Server is used to validate OpenAPI specifications using [APIMatic](https://www.apimatic.io/). The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API. +- Arize-Phoenix Logo **[Arize Phoenix](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-mcp)** - Inspect traces, manage prompts, curate datasets, and run experiments for open-source AI and LLM observability [Arize Phoenix](https://github.com/Arize-ai/phoenix). - DataStax logo **[Astra DB](https://github.com/datastax/astra-db-mcp)** - Comprehensive tools for managing collections and documents in a [DataStax Astra DB](https://www.datastax.com/products/datastax-astra) NoSQL database with a full range of operations such as create, update, delete, find, and associated bulk actions. - Audiense Logo **[Audiense Insights](https://github.com/AudienseCo/mcp-audiense-insights)** - Marketing insights and audience analysis from [Audiense](https://www.audiense.com/products/audiense-insights) reports, covering demographic, cultural, influencer, and content engagement analysis. - Axiom Logo **[Axiom](https://github.com/axiomhq/mcp-server-axiom)** - Query and analyze your Axiom logs, traces, and all other event data in natural language From fbd1c64ff40daa68020081ebba4b12cd5f900f32 Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Thu, 17 Apr 2025 20:50:40 -0700 Subject: [PATCH 04/15] edit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9032e341..31f4d872 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Official integrations are maintained by companies building production ready MCP - Apache IoTDB Logo **[Apache IoTDB](https://github.com/apache/iotdb-mcp-server)** - MCP Server for [Apache IoTDB](https://github.com/apache/iotdb) database and its tools - Apify Logo **[Apify](https://github.com/apify/actors-mcp-server)** - [Actors MCP Server](https://apify.com/apify/actors-mcp-server): Use 3,000+ pre-built cloud tools to extract data from websites, e-commerce, social media, search engines, maps, and more - APIMatic Logo **[APIMatic MCP](https://github.com/apimatic/apimatic-validator-mcp)** - APIMatic MCP Server is used to validate OpenAPI specifications using [APIMatic](https://www.apimatic.io/). The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API. -- Arize-Phoenix Logo **[Arize Phoenix](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-mcp)** - Inspect traces, manage prompts, curate datasets, and run experiments for open-source AI and LLM observability [Arize Phoenix](https://github.com/Arize-ai/phoenix). +- Arize-Phoenix Logo **[Arize Phoenix](https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-mcp)** - Inspect traces, manage prompts, curate datasets, and run experiments using [Arize Phoenix](https://github.com/Arize-ai/phoenix), an open-source AI and LLM observability tool. - DataStax logo **[Astra DB](https://github.com/datastax/astra-db-mcp)** - Comprehensive tools for managing collections and documents in a [DataStax Astra DB](https://www.datastax.com/products/datastax-astra) NoSQL database with a full range of operations such as create, update, delete, find, and associated bulk actions. - Audiense Logo **[Audiense Insights](https://github.com/AudienseCo/mcp-audiense-insights)** - Marketing insights and audience analysis from [Audiense](https://www.audiense.com/products/audiense-insights) reports, covering demographic, cultural, influencer, and content engagement analysis. - Axiom Logo **[Axiom](https://github.com/axiomhq/mcp-server-axiom)** - Query and analyze your Axiom logs, traces, and all other event data in natural language From 5bcb415374e752077bd08497ff58fccad39b7f1b Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Tue, 22 Apr 2025 19:50:15 -0600 Subject: [PATCH 05/15] Update Toolbox description to list supported databases. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb82a010..f85cb8b4 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Official integrations are maintained by companies building production ready MCP - Lingo.dev Logo **[Lingo.dev](https://github.com/lingodotdev/lingo.dev/blob/main/mcp.md)** - Make your AI agent speak every language on the planet, using [Lingo.dev](https://lingo.dev) Localization Engine. - Mailgun Logo **[Mailgun](https://github.com/mailgun/mailgun-mcp-server)** - Interact with Mailgun API. - Make Logo **[Make](https://github.com/integromat/make-mcp-server)** - Turn your [Make](https://www.make.com/) scenarios into callable tools for AI assistants. -- MCP Toolbox for Databases Logo **[MCP Toolbox for Databases](https://github.com/googleapis/genai-toolbox)** - Open source MCP server specializing in easy, fast, and secure tools for Databases. +- MCP Toolbox for Databases Logo **[MCP Toolbox for Databases](https://github.com/googleapis/genai-toolbox)** - Open source MCP server specializing in easy, fast, and secure tools for Databases. Supports AlloyDB, BigQuery, Bigtable, Cloud SQL, Dgraph, MySQL, Neo4j, Postgres, Spanner, and more. - Meilisearch Logo **[Meilisearch](https://github.com/meilisearch/meilisearch-mcp)** - Interact & query with Meilisearch (Full-text & semantic search API) - **[Metoro](https://github.com/metoro-io/metoro-mcp-server)** - Query and interact with kubernetes environments monitored by Metoro - **[Milvus](https://github.com/zilliztech/mcp-server-milvus)** - Search, Query and interact with data in your Milvus Vector Database. From 07af15945dd722744d27e6da12c4c1c1e2fa0182 Mon Sep 17 00:00:00 2001 From: Shiv Deepak Muddada Date: Fri, 18 Apr 2025 18:25:54 -0700 Subject: [PATCH 06/15] add streamableHttp server support for everything server --- src/everything/package.json | 5 +- src/everything/streamableHttp.ts | 151 +++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 src/everything/streamableHttp.ts diff --git a/src/everything/package.json b/src/everything/package.json index bfcbfae4..ffe6b7cd 100644 --- a/src/everything/package.json +++ b/src/everything/package.json @@ -18,10 +18,11 @@ "prepare": "npm run build", "watch": "tsc --watch", "start": "node dist/index.js", - "start:sse": "node dist/sse.js" + "start:sse": "node dist/sse.js", + "start:streamableHttp": "node dist/streamableHttp.js" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.9.0", + "@modelcontextprotocol/sdk": "^1.10.1", "express": "^4.21.1", "zod": "^3.23.8", "zod-to-json-schema": "^3.23.5" diff --git a/src/everything/streamableHttp.ts b/src/everything/streamableHttp.ts new file mode 100644 index 00000000..4267b2f4 --- /dev/null +++ b/src/everything/streamableHttp.ts @@ -0,0 +1,151 @@ +import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; +import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js'; +import { InMemoryEventStore } from '@modelcontextprotocol/sdk/examples/shared/inMemoryEventStore.js'; +import express, { Request, Response } from "express"; +import { createServer } from "./everything.js"; +import { randomUUID } from 'node:crypto'; + +const app = express(); + +app.use(express.json()); + +const { server, cleanup } = createServer(); + +const transports: { [sessionId: string]: StreamableHTTPServerTransport } = {}; + +app.post('/mcp', async (req: Request, res: Response) => { + console.log('Received MCP request:', req.body); + try { + // Check for existing session ID + const sessionId = req.headers['mcp-session-id'] as string | undefined; + let transport: StreamableHTTPServerTransport; + + if (sessionId && transports[sessionId]) { + // Reuse existing transport + transport = transports[sessionId]; + } else if (!sessionId && isInitializeRequest(req.body)) { + // New initialization request + const eventStore = new InMemoryEventStore(); + transport = new StreamableHTTPServerTransport({ + sessionIdGenerator: () => randomUUID(), + eventStore, // Enable resumability + 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}`); + transports[sessionId] = transport; + } + }); + + // Set up onclose handler to clean up transport when closed + transport.onclose = () => { + const sid = transport.sessionId; + if (sid && transports[sid]) { + console.log(`Transport closed for session ${sid}, removing from transports map`); + delete transports[sid]; + } + }; + + // Connect the transport to the MCP server BEFORE handling the request + // so responses can flow back through the same transport + await server.connect(transport); + + await transport.handleRequest(req, res, req.body); + return; // Already handled + } else { + // Invalid request - no session ID or not initialization request + res.status(400).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Bad Request: No valid session ID provided', + }, + id: null, + }); + return; + } + + // Handle the request with existing transport - no need to reconnect + // The existing transport is already connected to the server + await transport.handleRequest(req, res, req.body); + } catch (error) { + console.error('Error handling MCP request:', error); + if (!res.headersSent) { + res.status(500).json({ + jsonrpc: '2.0', + error: { + code: -32603, + message: 'Internal server error', + }, + id: null, + }); + } + } +}); + +// Handle GET requests for SSE streams (using built-in support from StreamableHTTP) +app.get('/mcp', async (req: Request, res: Response) => { + const sessionId = req.headers['mcp-session-id'] as string | undefined; + if (!sessionId || !transports[sessionId]) { + res.status(400).send('Invalid or missing session ID'); + return; + } + + // 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}`); + } else { + console.log(`Establishing new SSE stream for session ${sessionId}`); + } + + const transport = transports[sessionId]; + await transport.handleRequest(req, res); +}); + +// Handle DELETE requests for session termination (according to MCP spec) +app.delete('/mcp', async (req: Request, res: Response) => { + const sessionId = req.headers['mcp-session-id'] as string | undefined; + if (!sessionId || !transports[sessionId]) { + res.status(400).send('Invalid or missing session ID'); + return; + } + + console.log(`Received session termination request for session ${sessionId}`); + + try { + const transport = transports[sessionId]; + await transport.handleRequest(req, res); + } catch (error) { + console.error('Error handling session termination:', error); + if (!res.headersSent) { + res.status(500).send('Error processing session termination'); + } + } +}); + +// Start the server +const PORT = process.env.PORT || 3001; +app.listen(PORT, () => { + console.log(`MCP Streamable HTTP Server listening on port ${PORT}`); +}); + +// Handle server shutdown +process.on('SIGINT', async () => { + console.log('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}`); + await transports[sessionId].close(); + delete transports[sessionId]; + } catch (error) { + console.error(`Error closing transport for session ${sessionId}:`, error); + } + } + await cleanup(); + await server.close(); + console.log('Server shutdown complete'); + process.exit(0); +}); From ace5c2a8dd2ffd85bf53a070e7f0767f949257fb Mon Sep 17 00:00:00 2001 From: Shiv Deepak Muddada Date: Fri, 18 Apr 2025 23:56:50 -0700 Subject: [PATCH 07/15] update docs --- src/everything/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/everything/README.md b/src/everything/README.md index 236ac596..f356d687 100644 --- a/src/everything/README.md +++ b/src/everything/README.md @@ -126,7 +126,7 @@ The server sends random-leveled log messages every 15 seconds, e.g.: } ``` -## Usage with Claude Desktop +## Usage with Claude Desktop (uses [stdio Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio)) Add to your `claude_desktop_config.json`: @@ -171,4 +171,18 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace } } } +## Run with [HTTP+SSE Transport](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse) (deprecated as of [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports)) + +```shell +cd src/everything +npm install +npm run start:sse +``` + +## Run with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) + +```shell +cd src/everything +npm install +npm run start:streamableHttp ``` From 03e9a7be0dd5abfb023b4ea9e9e39a493b732a11 Mon Sep 17 00:00:00 2001 From: Shiv Deepak Muddada Date: Sat, 19 Apr 2025 13:04:29 -0700 Subject: [PATCH 08/15] ref: cleanup --- src/everything/README.md | 2 ++ src/everything/streamableHttp.ts | 31 ++++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/everything/README.md b/src/everything/README.md index f356d687..4d51de51 100644 --- a/src/everything/README.md +++ b/src/everything/README.md @@ -171,6 +171,8 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace } } } +``` + ## Run with [HTTP+SSE Transport](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse) (deprecated as of [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports)) ```shell diff --git a/src/everything/streamableHttp.ts b/src/everything/streamableHttp.ts index 4267b2f4..69807d6e 100644 --- a/src/everything/streamableHttp.ts +++ b/src/everything/streamableHttp.ts @@ -50,7 +50,7 @@ app.post('/mcp', async (req: Request, res: Response) => { // so responses can flow back through the same transport await server.connect(transport); - await transport.handleRequest(req, res, req.body); + await transport.handleRequest(req, res); return; // Already handled } else { // Invalid request - no session ID or not initialization request @@ -67,7 +67,7 @@ app.post('/mcp', async (req: Request, res: Response) => { // Handle the request with existing transport - no need to reconnect // The existing transport is already connected to the server - await transport.handleRequest(req, res, req.body); + await transport.handleRequest(req, res); } catch (error) { console.error('Error handling MCP request:', error); if (!res.headersSent) { @@ -87,7 +87,14 @@ app.post('/mcp', async (req: Request, res: Response) => { app.get('/mcp', async (req: Request, res: Response) => { const sessionId = req.headers['mcp-session-id'] as string | undefined; if (!sessionId || !transports[sessionId]) { - res.status(400).send('Invalid or missing session ID'); + res.status(400).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Bad Request: No valid session ID provided', + }, + id: null, + }); return; } @@ -107,7 +114,14 @@ app.get('/mcp', async (req: Request, res: Response) => { app.delete('/mcp', async (req: Request, res: Response) => { const sessionId = req.headers['mcp-session-id'] as string | undefined; if (!sessionId || !transports[sessionId]) { - res.status(400).send('Invalid or missing session ID'); + res.status(400).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Bad Request: No valid session ID provided', + }, + id: null, + }); return; } @@ -119,7 +133,14 @@ app.delete('/mcp', async (req: Request, res: Response) => { } catch (error) { console.error('Error handling session termination:', error); if (!res.headersSent) { - res.status(500).send('Error processing session termination'); + res.status(500).json({ + jsonrpc: '2.0', + error: { + code: -32603, + message: 'Error handling session termination', + }, + id: null, + }); } } }); From d1d79444f7bf791d153a7587dbb6924b5851c49b Mon Sep 17 00:00:00 2001 From: Shiv Deepak Muddada Date: Sat, 19 Apr 2025 16:21:41 -0700 Subject: [PATCH 09/15] fix: passing body to handleRequest, and optionally adding a response id if it exists --- src/everything/streamableHttp.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/everything/streamableHttp.ts b/src/everything/streamableHttp.ts index 69807d6e..0c4bbd2d 100644 --- a/src/everything/streamableHttp.ts +++ b/src/everything/streamableHttp.ts @@ -50,7 +50,7 @@ app.post('/mcp', async (req: Request, res: Response) => { // so responses can flow back through the same transport await server.connect(transport); - await transport.handleRequest(req, res); + await transport.handleRequest(req, res, req.body); return; // Already handled } else { // Invalid request - no session ID or not initialization request @@ -60,14 +60,14 @@ app.post('/mcp', async (req: Request, res: Response) => { code: -32000, message: 'Bad Request: No valid session ID provided', }, - id: null, + id: req?.body?.id, }); return; } // Handle the request with existing transport - no need to reconnect // The existing transport is already connected to the server - await transport.handleRequest(req, res); + await transport.handleRequest(req, res, req.body); } catch (error) { console.error('Error handling MCP request:', error); if (!res.headersSent) { @@ -77,8 +77,9 @@ app.post('/mcp', async (req: Request, res: Response) => { code: -32603, message: 'Internal server error', }, - id: null, + id: req?.body?.id, }); + return; } } }); @@ -93,7 +94,7 @@ app.get('/mcp', async (req: Request, res: Response) => { code: -32000, message: 'Bad Request: No valid session ID provided', }, - id: null, + id: req?.body?.id, }); return; } @@ -120,7 +121,7 @@ app.delete('/mcp', async (req: Request, res: Response) => { code: -32000, message: 'Bad Request: No valid session ID provided', }, - id: null, + id: req?.body?.id, }); return; } @@ -139,8 +140,9 @@ app.delete('/mcp', async (req: Request, res: Response) => { code: -32603, message: 'Error handling session termination', }, - id: null, + id: req?.body?.id, }); + return; } } }); From 7e602b09763d48837d3d48e717b69fe9a5095bd6 Mon Sep 17 00:00:00 2001 From: Shiv Deepak Muddada Date: Sat, 19 Apr 2025 16:43:15 -0700 Subject: [PATCH 10/15] update package.lock --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa8137c3..23e61d70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5435,7 +5435,7 @@ "version": "0.6.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.9.0", + "@modelcontextprotocol/sdk": "^1.10.1", "express": "^4.21.1", "zod": "^3.23.8", "zod-to-json-schema": "^3.23.5" @@ -5450,9 +5450,9 @@ } }, "src/everything/node_modules/@modelcontextprotocol/sdk": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.9.0.tgz", - "integrity": "sha512-Jq2EUCQpe0iyO5FGpzVYDNFR6oR53AIrwph9yWl7uSc7IWUMsrmpmSaTGra5hQNunXpM+9oit85p924jWuHzUA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.10.1.tgz", + "integrity": "sha512-xNYdFdkJqEfIaTVP1gPKoEvluACHZsHZegIoICX8DM1o6Qf3G5u2BQJHmgd0n4YgRPqqK/u1ujQvrgAxxSJT9w==", "license": "MIT", "dependencies": { "content-type": "^1.0.5", From e70bcd317b4dd00181b4978816c6e83df28e7a34 Mon Sep 17 00:00:00 2001 From: Shiv Deepak Muddada Date: Tue, 22 Apr 2025 19:14:12 -0700 Subject: [PATCH 11/15] remove json middleware from everything streamable http server --- src/everything/streamableHttp.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/everything/streamableHttp.ts b/src/everything/streamableHttp.ts index 0c4bbd2d..3a87bc83 100644 --- a/src/everything/streamableHttp.ts +++ b/src/everything/streamableHttp.ts @@ -1,5 +1,4 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; -import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js'; import { InMemoryEventStore } from '@modelcontextprotocol/sdk/examples/shared/inMemoryEventStore.js'; import express, { Request, Response } from "express"; import { createServer } from "./everything.js"; @@ -7,14 +6,12 @@ import { randomUUID } from 'node:crypto'; const app = express(); -app.use(express.json()); - const { server, cleanup } = createServer(); const transports: { [sessionId: string]: StreamableHTTPServerTransport } = {}; app.post('/mcp', async (req: Request, res: Response) => { - console.log('Received MCP request:', req.body); + console.log('Received MCP POST request'); try { // Check for existing session ID const sessionId = req.headers['mcp-session-id'] as string | undefined; @@ -23,7 +20,7 @@ app.post('/mcp', async (req: Request, res: Response) => { if (sessionId && transports[sessionId]) { // Reuse existing transport transport = transports[sessionId]; - } else if (!sessionId && isInitializeRequest(req.body)) { + } else if (!sessionId) { // New initialization request const eventStore = new InMemoryEventStore(); transport = new StreamableHTTPServerTransport({ @@ -50,7 +47,7 @@ app.post('/mcp', async (req: Request, res: Response) => { // so responses can flow back through the same transport await server.connect(transport); - await transport.handleRequest(req, res, req.body); + await transport.handleRequest(req, res); return; // Already handled } else { // Invalid request - no session ID or not initialization request @@ -67,7 +64,7 @@ app.post('/mcp', async (req: Request, res: Response) => { // Handle the request with existing transport - no need to reconnect // The existing transport is already connected to the server - await transport.handleRequest(req, res, req.body); + await transport.handleRequest(req, res); } catch (error) { console.error('Error handling MCP request:', error); if (!res.headersSent) { @@ -86,6 +83,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'); const sessionId = req.headers['mcp-session-id'] as string | undefined; if (!sessionId || !transports[sessionId]) { res.status(400).json({ From 4017307b23fd72f8341fd45a3c4ca63b4c8a5422 Mon Sep 17 00:00:00 2001 From: Dmitrii Korotovskii Date: Sat, 12 Apr 2025 20:39:57 +0200 Subject: [PATCH 12/15] Proposal to add community MCP Slack server to the README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4ac13857..ec277925 100644 --- a/README.md +++ b/README.md @@ -390,6 +390,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[ServiceNow](https://github.com/osomai/servicenow-mcp)** - A MCP server to interact with a ServiceNow instance - **[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. +- **[Slack](https://github.com/korotovsky/slack-mcp-server)** - The most powerful MCP server for Slack Workspaces. This integration supports both Stdio and SSE transports, proxy settings and does not require any permissions or bots being created or approved by Workspace admins šŸ˜. - **[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. - **[Solver](https://github.com/szeider/mcp-solver)** - Solves constraint satisfaction and optimization problems . - **[SoccerDataAPI](https://github.com/yeonupark/mcp-soccer-data)** - This MCP server provides real-time football match data based on the SoccerDataAPI. From 1ce57aa5c1ce14cd4cc2818904b3e8859709f71d Mon Sep 17 00:00:00 2001 From: Nithish Raghunandanan <12782505+nithishr@users.noreply.github.com> Date: Thu, 24 Apr 2025 14:37:22 +0200 Subject: [PATCH 13/15] Add Couchbase MCP server --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ec277925..3b5e7e9d 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ Official integrations are maintained by companies building production ready MCP - CodeLogic Logo **[CodeLogic](https://github.com/CodeLogicIncEngineering/codelogic-mcp-server)** - Interact with [CodeLogic](https://codelogic.com), a Software Intelligence platform that graphs complex code and data architecture dependencies, to boost AI accuracy and insight. - Comet Logo **[Comet Opik](https://github.com/comet-ml/opik-mcp)** - Query and analyze your [Opik](https://github.com/comet-ml/opik) logs, traces, prompts and all other telemtry data from your LLMs in natural language. - **[Convex](https://stack.convex.dev/convex-mcp-server)** - Introspect and query your apps deployed to Convex. +- **[Couchbase](https://github.com/Couchbase-Ecosystem/mcp-server-couchbase)** - Interact with the data stored in Couchbase clusters. - Dart Logo **[Dart](https://github.com/its-dart/dart-mcp-server)** - Interact with task, doc, and project data in [Dart](https://itsdart.com), an AI-native project management tool - DevHub Logo **[DevHub](https://github.com/devhub/devhub-cms-mcp)** - Manage and utilize website content within the [DevHub](https://www.devhub.com) CMS platform - E2B Logo **[E2B](https://github.com/e2b-dev/mcp-server)** - Run code in secure sandboxes hosted by [E2B](https://e2b.dev) From 2145f015932204ab8fbd854e013a89db9ac4c054 Mon Sep 17 00:00:00 2001 From: Damilola Emmanuel Olowookere Date: Thu, 24 Apr 2025 19:55:17 +0100 Subject: [PATCH 14/15] Add multi-database MCP server entry --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ca75ede..9e7ccbe7 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Deepseek_R1](https://github.com/66julienmartin/MCP-server-Deepseek_R1)** - A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3) - **[deepseek-thinker-mcp](https://github.com/ruixingshi/deepseek-thinker-mcp)** - A MCP (Model Context Protocol) provider Deepseek reasoning content to MCP-enabled AI Clients, like Claude Desktop. Supports access to Deepseek's thought processes from the Deepseek API service or from a local Ollama server. - **[Descope](https://github.com/descope-sample-apps/descope-mcp-server)** - An MCP server to integrate with [Descope](https://descope.com) to search audit logs, manage users, and more. +- **[DevDb](https://github.com/damms005/devdb-vscode?tab=readme-ov-file#mcp-configuration)** - An MCP server that runs right inside the IDE, for connecting to MySQL, Postgres, SQLite, and MSSQL databases. - **[DevRev](https://github.com/kpsunil97/devrev-mcp-server)** - An MCP server to integrate with DevRev APIs to search through your DevRev Knowledge Graph where objects can be imported from diff. sources listed [here](https://devrev.ai/docs/import#available-sources). - **[Dicom](https://github.com/ChristianHinge/dicom-mcp)** - An MCP server to query and retrieve medical images and for parsing and reading dicom-encapsulated documents (pdf etc.). - **[Dify](https://github.com/YanxingLiu/dify-mcp-server)** - A simple implementation of an MCP server for dify workflows. @@ -586,4 +587,4 @@ If you find MCP servers useful, please consider starring the repository and cont --- -Managed by Anthropic, but built together with the community. The Model Context Protocol is open source and we encourage everyone to contribute their own servers and improvements! \ No newline at end of file +Managed by Anthropic, but built together with the community. The Model Context Protocol is open source and we encourage everyone to contribute their own servers and improvements! From 6e7b575ad9a1b7b6fa6dded6a524cd1bee597cb2 Mon Sep 17 00:00:00 2001 From: sssjiang <33194239+sssjiang@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:02:40 +0800 Subject: [PATCH 15/15] Update README.md change in alphabetical order --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2daed75d..07ac27b5 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Prometheus](https://github.com/pab1it0/prometheus-mcp-server)** - Query and analyze Prometheus - open-source monitoring system. - **[Pulumi](https://github.com/dogukanakkaya/pulumi-mcp-server)** - MCP Server to Interact with Pulumi API, creates and lists Stacks - **[Pushover](https://github.com/ashiknesin/pushover-mcp)** - Send instant notifications to your devices using [Pushover.net](https://pushover.net/) +- **[PubChem](https://github.com/sssjiang/pubchem_mcp_server)** - extract drug information from pubchem API. - **[QGIS](https://github.com/jjsantos01/qgis_mcp)** - connects QGIS to Claude AI through the MCP. This integration enables prompt-assisted project creation, layer loading, code execution, and more. - **[QuickChart](https://github.com/GongRzhe/Quickchart-MCP-Server)** - A Model Context Protocol server for generating charts using QuickChart.io - **[Qwen_Max](https://github.com/66julienmartin/MCP-server-Qwen_Max)** - A Model Context Protocol (MCP) server implementation for the Qwen models. @@ -337,7 +338,6 @@ A growing set of community-developed and maintained servers demonstrates various - **[xiyan_mcp_server](https://github.com/XGenerationLab/xiyan_mcp_server)** An MCP server that supports fetching data from a database using natural language queries, powered by XiyanSQL as the text-to-SQL LLM. - **[XMind](https://github.com/apeyroux/mcp-xmind)** - Read and search through your XMind directory containing XMind files. - **[YouTube](https://github.com/ZubeidHendricks/youtube-mcp-server)** - Comprehensive YouTube API integration for video management, Shorts creation, and analytics. -- **[PubChem](https://github.com/sssjiang/pubchem_mcp_server)** - extract drug information from pubchem API. ## šŸ“š Frameworks