Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
SKIP_ATLAS_LOCAL_TESTS: "true"
MDB_MONGOT_PASSWORD: ${{ secrets.TEST_MDB_MONGOT_PASSWORD }}
MDB_VOYAGE_API_KEY: ${{ secrets.TEST_MDB_MCP_VOYAGE_API_KEY }}
MDB_MCP_REMOTE_E2E_CLIENT_ID: ${{ secrets.TEST_REMOTE_MCP_CLIENT_ID }}
MDB_MCP_REMOTE_E2E_CLIENT_SECRET: ${{ secrets.TEST_REMOTE_MCP_CLIENT_SECRET }}
MDB_MCP_REMOTE_E2E_BASE_URL: ${{ vars.TEST_REMOTE_MCP_BASE_URL }}
- name: Upload test results
if: always() && matrix.os == 'ubuntu-latest' && matrix.node-version == '22'
uses: actions/upload-artifact@v7.0.1
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ pnpm --filter mongodb-mcp-remote test
- **Unit** tests mock the network, so they need no external setup.
- **Integration** tests spawn the built wrapper (`dist/cli.js`) over stdio and drive it
against an in-process mock remote MCP server (`src/testHelpers/mockRemote.ts`), so they run deterministically.
- **End-to-end** tests (`src/wrapper.e2e.test.ts`) hit the real cloud-dev Remote MCP server.
They run in the normal `pnpm test` but are skipped unless `MDB_MCP_REMOTE_E2E_CLIENT_ID`
is set, and skip when `SKIP_REMOTE_MCP_E2E=true`.
In CI the `run-tests` job injects `MDB_MCP_REMOTE_E2E_*` from the `TEST_REMOTE_MCP_*`
GitHub secrets/var; until those are registered the e2e tests self-skip and CI stays green.

#### Accuracy Tests and colima

Expand Down
23 changes: 23 additions & 0 deletions packages/mongodb-mcp-remote/src/wrapper.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { describe, it } from "vitest";

/**
* These run in the default test flow but are skipped unless real ingress
* service-account credentials are present, so runs without secrets are not impacted.
*
* Skip when:
* - SKIP_REMOTE_MCP_E2E=true, or
* - no MDB_MCP_REMOTE_E2E_CLIENT_ID is set
* TODO: The tests below will be implemented in by MCP-539 once wrapper is code complete (MCP-536).
*/
const skipE2E = process.env.SKIP_REMOTE_MCP_E2E === "true" || !process.env.MDB_MCP_REMOTE_E2E_CLIENT_ID;

describe.skipIf(skipE2E)("mongodb-mcp-remote wrapper (e2e, cloud-dev)", () => {
it.todo("acquires a token from the configured Atlas endpoint and lists tools");
// Spawn the built wrapper against MDB_MCP_API_* (cloud-dev ingress creds), then:
// const res = await client.listTools();
// expect(res.tools.length).toBeGreaterThan(0);

it.todo("invokes a read-only tool end-to-end against cloud-dev");

it.todo("surfaces a clear auth error when the ingress credentials are invalid");
});
Loading