Skip to content

Commit 67895cd

Browse files
committed
fix: add ipAccessList after creating project
1 parent f78fb4c commit 67895cd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/integration/tools/atlas/atlasHelpers.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ export function withProject(integration: IntegrationTest, fn: ProjectTestFunctio
4242
try {
4343
const group = await createProject(apiClient);
4444
projectId = group.id;
45+
46+
// add current IP to project access list
47+
const { currentIpv4Address } = await apiClient.getIpInfo();
48+
await apiClient.createProjectIpAccessList({
49+
params: {
50+
path: {
51+
groupId: projectId,
52+
},
53+
},
54+
body: [
55+
{
56+
ipAddress: currentIpv4Address,
57+
groupId: projectId,
58+
comment: "Added by MongoDB MCP Server to enable tool access",
59+
},
60+
],
61+
});
4562
} catch (error) {
4663
console.error("Failed to create project:", error);
4764
throw error;

0 commit comments

Comments
 (0)