
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
compass-web
Advanced tools
A port of the MongoDB Compass to Web. The frontend is rebuilt and re-packaged from the original @mongodb-js/compass-web. It provides an easy way to view and interact with your databases from a browser, while keeping most of the MongoDB Compass features.



Not all Compass Desktop features are available on Compass Web. Here is non-exhaustive list unsupported features.
Install compass-web npm package or pull Docker image haohanyang/compass-web
npm install compass-web -g
docker pull haohanyang/compass-web
Start the server with MongoDB connection string(s). The parameters are configured via program arguments or environment variables.
compass-web --mongo-uri "mongodb://localhost:27017"
# or configure via CW_MONGO_URI environment variable
CW_MONGO_URI="mongodb://localhost:27017" compass-web
# or use npx
npx compass-web --mongo-uri "mongodb://localhost:27017"
# multiple connection strings
compass-web --mongo-uri "mongodb://localhost:27017 mongodb+srv://myusername:secrets@default-cluster.mongodb.net/?retryWrites=true&w=majority&appName=default-cluster"
[!NOTE] You may need to add
tls=trueto your connection string if using Mongo SRV scheme.
Use Docker:
docker run -it -p 8080:8080 -e CW_MONGO_URI="mongodb://localhost:27017" haohanyang/compass-web
Check an example docker-compose.yaml file if you want to use Docker Compose.
You can configure compass-web using command-line arguments or environment variables (prefixed with CW_).
| Parameter | Type | Env Variable | Description | Default |
|---|---|---|---|---|
--mongo-uri | string | CW_MONGO_URI | Required. MongoDB connection string(s). Separate multiple URIs with whitespace. | Required |
--port | number | CW_PORT | Port to run the server on. | 8080 |
--host | string | CW_HOST | Host to run the server on. | localhost |
--app-name | string | CW_APP_NAME | Name of the application on. | Compass Web |
--org-id | string | CW_ORG_ID | Organization ID associated with the connection. | default-org-id |
--project-id | string | CW_PROJECT_ID | Project ID associated with the connection. | default-project-id |
--cluster-id | string | CW_CLUSTER_ID | Cluster ID associated with the connection. | default-cluster-id |
--basic-auth-username | string | CW_BASIC_AUTH_USERNAME | Username for Basic HTTP authentication scheme. | null |
--basic-auth-password | string | CW_BASIC_AUTH_PASSWORD | Password for Basic HTTP authentication scheme. | null |
--openai-api-key | string | CW_OPENAI_API_KEY | OpenAI API key for GenAI services | null |
--query-system-prompt | string | CW_QUERY_SYSTEM_PROMPT | System prompt for query generation | Defined in gen-ai.js |
--aggregation-system-prompt | string | CW_AGGREGATION_SYSTEM_PROMPT | System prompt for aggregation generation | Defined in gen-ai.js |
--openai-model | string | CW_OPENAI_MODEL | OpenAI model used in GenAI service | gpt-5-mini |
--enable-gen-ai-features | bool | CW_ENABLE_GEN_AI_FEATURES | Enable GenAI features | false |
--enable-gen-ai-sample-documents | bool | CW_ENABLE_GEN_AI_SAMPLE_DOCUMENTS | Enable upload sample documents to GenAI Service | false |
Here are editable user preferences you can configure on Settings in the UI:
Clone the repo and fetch the upstream dependency compass
git clone https://github.com/haohanyang/compass-web.git
cd compass-web && git submodule update --init --recursive --single-branch --depth 1
Build the dependencies
bash bootstrap.sh
pnpm i --frozen-lockfile
Build client and server.
pnpm run build-client
pnpm run build-server
Start the app
node dist/server.js --mongo-uri "mongodb://localhost:27017"
FAQs
MongoDB Compass that runs on a browser
We found that compass-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.