Coolb0x/qa_mcp_server
3.2
If you are the rightful owner of qa_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project is a simple example of a Model Context Protocol (MCP) server implemented in Node.js using the @modelcontextprotocol/sdk.
Tools
rag-search
Simulates a Retrieval-Augmented Generation (RAG) search and returns a mock response.
QA MCP Server
This project is a simple example of a Model Context Protocol (MCP) server implemented in Node.js using the @modelcontextprotocol/sdk.
Features
- Streamable HTTP Transport: The server uses the MCP Streamable HTTP transport, making it compatible with modern MCP clients and browser-based tools.
- CORS Support: Configured to allow browser-based clients to connect and access the MCP session ID header.
- RAG Search Tool: Implements a single tool,
rag-search
, which simulates a Retrieval-Augmented Generation (RAG) search. For demonstration, it waits 3 seconds and returns a mock response:Hello from KiWi Rag
. - Session Management: Handles session IDs for each client connection.
Usage
-
Install dependencies
npm install
-
Build and run the server
npx tsc node server.js
(Or run directly with ts-node if using TypeScript)
-
Test the RAG Search Tool Send a POST request to
/mcp
with a session header:curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -H "mcp-session-id: test-session-id" \ -d '{"query": "kiwi"}'
The response will be:
{ "content": [{ "type": "text", "text": "Hello from KiWi Rag" }] }
Configuration
- The server is configured for local development. For production, update the CORS settings in
server.ts
. - The MCP server URL is set in
.vscode/mcp.json
for integration with compatible tools.
Configuration File for Copilot - Workspace
{
"servers": {
"my-mcp-server-90a7a414": {
"url": "http://localhost:3000/mcp"
}
}
}
License
MIT