Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: TypeError: connectionString.startsWith is not a function #327

Open
Assignees
Labels
pending-releaseFor issues and bugs that have been fixed but waiting for a release.
@ImoutoChan

Description

Version

mcp/mongodb@sha256:44eed0f93b85db457e86d9a7de44aa032d6d9128aac05086194402adc4e2a9b7

App

  • Cursor
  • Windsurf
  • VSCode
  • VSCode Insiders
  • Claude Desktop
  • Other

Affected Models (if applicable)

  • Claude 3.5 Sonnet
  • Claude 3.7 Sonnet
  • GPT-4a
  • o4-mini
  • Other

Bug Description

I'm trying to use docker desktop feature MCP Tools: https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/,
I installed mongodb and provided it with my connection string.

However, when I run docker mcp gateway run I get

docker mcp gateway run
- Those servers are enabled: mongodb
- Using images:
 - mcp/mongodb@sha256:44eed0f93b85db457e86d9a7de44aa032d6d9128aac05086194402adc4e2a9b7
- Pulling images [mcp/mongodb]
> Images pulled in 3.912ms
- Listing MCP tools...
 - Running server mcp/mongodb with [run --rm -i --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never --label docker-mcp=true --label docker-mcp-tool-type=mcp --label docker-mcp-name=mongodb --label docker-mcp-transport=stdio -e MDB_MCP_CONNECTION_STRING]
 > Can't start mongodb: initializing mcp/mongodb@sha256:44eed0f93b85db457e86d9a7de44aa032d6d9128aac05086194402adc4e2a9b7: Failed to connect to MongoDB instance using the connection string from the config: TypeError: connectionString.startsWith is not a function
 at connectionStringHasValidScheme (/usr/local/lib/node_modules/mongodb-mcp-server/node_modules/mongodb-connection-string-url/lib/index.js:9:30)
 at new ConnectionString (/usr/local/lib/node_modules/mongodb-mcp-server/node_modules/mongodb-connection-string-url/lib/index.js:85:34)
 at setAppNameParamIfMissing (file:///usr/local/lib/node_modules/mongodb-mcp-server/dist/helpers/connectionOptions.js:3:33)
 at Session.connectToMongoDB (file:///usr/local/lib/node_modules/mongodb-mcp-server/dist/session.js:66:28)
 at Server.validateConfig (file:///usr/local/lib/node_modules/mongodb-mcp-server/dist/server.js:121:36)
 at Server.connect (file:///usr/local/lib/node_modules/mongodb-mcp-server/dist/server.js:49:20)
 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
 at async file:///usr/local/lib/node_modules/mongodb-mcp-server/dist/index.js:45:5

Metadata

Metadata

Assignees

Labels

pending-releaseFor issues and bugs that have been fixed but waiting for a release.

Type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /