File tree Expand file tree Collapse file tree
packages/mongodb-mcp-remote/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,21 +6,13 @@ import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"
66import { startMockRemote , type MockRemote } from "./testHelpers/mockRemote.js" ;
77
88/**
9- * Integration tests for the mongodb-mcp-remote wrapper:
9+ * Integration tests for the mongodb-mcp-remote wrapper.
1010 *
11- *
12- * ┌──────────────┐ stdio ┌─────────────┐ HTTP ┌──────────────────────┐
13- * │ MCP Client │ ────────► │ WRAPPER │ ───────► │ Remote MCP server │
14- * │ (real, SDK) │ ◄──────── │ (under test)│ ◄─────── │ (MOCK) │
15- * └──────────────┘ └─────────────┘ └──────────────────────┘
16- * │
17- * ▼
18- * Token endpoint (MOCK)
19- *
20- * - LEFT: a real MCP SDK `Client` that starts the built wrapper as a child
21- * process and talks to it over stdin/stdout.
22- * - RIGHT: a mock Express server that pretends to be mcp.mongodb.com and the
23- * Atlas token endpoint, so the tests need no real network and behave the same every run.
11+ * Each test runs the whole wrapper end to end: an MCP SDK `Client` starts the built wrapper
12+ * (dist/cli.js) as a child process and talks to it over stdin/stdout, while the wrapper
13+ * forwards requests over HTTP to a mock remote server. That mock (mockRemote.ts) stands in
14+ * for both the Remote MCP server and the Atlas token endpoint, so the tests run offline and
15+ * deterministically.
2416 *
2517 * TODO: most tests here are `it.todo` until the wrapper implementation is complete in
2618 * packages/mongodb-mcp-remote/src/. Tests will be implemented in MCP-539.
You can’t perform that action at this time.
0 commit comments