2.5 KiB
Contributing
Thank you for your interest in MongoMind. This document describes the setup, test run, and the
binding development rules for the project. The complete repository guidelines for
coding agents can be found at AGENTS.md; this file summarizes them for human
contributors.
Setup
git clone <REPOSITORY-URL> mongomind-mcp
cd mongomind-mcp
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install -e .
This makes mongomind-mcp, mongomind-http, mongomind-admin, mongomind-hook-start, and
mongomind-hook-capture available in .venv/bin/. Details on MongoDB users, initialization, and
migration can be found in README.md.
Tests
python3 -m unittest discover tests
E2E tests require a disposable database via MONGOMIND_TEST_URI. Never use a
production MongoMind database for this. If MONGOMIND_TEST_URI is not set, the E2E tests will be
skipped, not failed.
Development Rules
- Keep runtime dependencies to a minimum;
pymongoandPyJWT[crypto]are provided for optional OAuth/OIDC remote operation. Do not add any LLM, embedding, or graph runtimes. - All MongoDB mutations must use the exact project scope. Global entries may be read from a project context but must not be modified.
- Validate MCP inputs on the server side as well, regardless of the published JSON schema.
- Redact all storable text fields before compression and hashing.
- Hooks must never block sessions or turns and must use only stable payload fields.
- Migrations and index changes belong in
mongomind.admin, never in the MCP startup path. - Always supplement with real MongoDB end-to-end tests when making concurrency changes.
Pull Requests
- A commit should have a focused, self-contained purpose; the subject line must be imperative and in English, as in the existing commit history.
- In the PR description, explain the rationale and test coverage for the change.
- New environment variables or code constants must be included with their location, default, and an example in
docs/configuration.md. - For security-related changes (auth, redaction, scope limits), please also check against
docs/architecture.md.
Reporting Security Vulnerabilities
Please do not report security-related vulnerabilities via public issues—see
SECURITY.md for the reporting procedure.