# documentdb-agent-kit A bundle of agent skills + an MCP server for **Azure DocumentDB (MongoDB-compatible)** — the fully managed Azure service built on the open-source [DocumentDB](https://github.com/documentdb/documentdb) project (Postgres-backed, 99.03% MongoDB-compatible). Skills follow the [Agent Skills](https://agentskills.io/) format and the kit ships with plugin manifests for Claude Code, Cursor, Codex, Gemini CLI, and GitHub Copilot. 👉 **Capabilities and skill catalog:** [`docs/SKILLS.md`](docs/SKILLS.md) ## Installation The plugin bundles the [DocumentDB MCP server](https://github.com/microsoft/documentdb-mcp) (`documentdb-mcp-server` on npm — Node.js 20+) together with all skills under `skills/`. > ⚠️ **Plugin install paths are not yet published.** The per-agent plugin/marketplace commands below are commented out until the plugin lands in each agent's registry. In the meantime, use the [skills-only one-liner](#universal-one-liner--skills-only-no-mcp-server) to install the skill catalog. ### Universal one-liner — skills only (no MCP server) To install just the skill catalog into whichever agent you're using, via the [skills.sh](https://skills.sh/) CLI: ```bash npx skills add Azure/documentdb-agent-kit ``` This drops the rule docs into your agent's skill directory but **does not** install the MCP server. Use one of the per-agent plugin commands above if you want the DB tools too. > 💡 **Accept the optional `find-skills` helper when prompted.** During `npx skills add` the installer will ask whether to install [`find-skills`](https://github.com/skills-sh/find-skills) — say **yes**. It's a tiny meta-skill that lets agents auto-discover the right DocumentDB skill for a task (e.g. *"how do I create a BM25 index?"* → auto-loads `documentdb-full-text-search`) instead of relying on you to invoke skills by name. It's especially useful here because the kit ships 17 skills, more than agents reliably route on their own from `AGENTS.md` alone. If you skipped it, re-run `npx skills add find-skills` to add it later. ## Updating the kit New skills, rule fixes, and MCP-server updates are released on `main`. Installs do **not** auto-update — each install path has its own refresh command. Run these when you want to pull in new features or fixes: | Install path | Update command | |---|---| | Skills only (skills.sh CLI) | re-run `npx skills add Azure/documentdb-agent-kit` | > **Skills CLI note:** `npx skills update` exists but is unreliable for GitHub-sourced skills on the current `skills` CLI release. **Re-running `npx skills add Azure/documentdb-agent-kit` is the recommended refresh path** — it re-fetches the latest `main` and overlays the updated rule files. Add `--all` if you originally installed with `--all`. The MCP server is fetched via `npx -y documentdb-mcp-server` each time the agent launches the server, so MCP-server updates land automatically on the next agent restart (subject to npm cache). Skill files are snapshotted at install time and only refresh when you run one of the commands above. To see what's changed between releases, check [`CHANGELOG.md`](CHANGELOG.md). ## Configuration The MCP server is administrator-controlled: tools never accept runtime connection strings. Set `DOCUMENTDB_CONNECTION_PROFILES` in your shell before launching the agent. ### Microsoft Entra / OIDC (recommended) ```bash export DOCUMENTDB_CONNECTION_PROFILES='{"sandbox":{"authMode":"entra","endpoint":".mongocluster.cosmos.azure.com","tokenScope":"https://ossrdbms-aad.database.windows.net/.default","allowedHosts":["*.mongocluster.cosmos.azure.com"]}}' az login --tenant ``` In Azure hosting, use managed identity or workload identity and grant that identity access to the backend database. The server uses `DefaultAzureCredential`, so the same profile shape works for local Azure CLI login and managed deployments. ### Local / sandbox SCRAM ```bash export DOCUMENTDB_CONNECTION_PROFILES='{"local":{"uriEnv":"DOCUMENTDB_LOCAL_URI"}}' export DOCUMENTDB_LOCAL_URI='mongodb://localhost:27017' ``` ### Tool capability gates Read tools are enabled by default. Higher-impact tools are opt-in: ```bash export ENABLE_WRITE_TOOLS=true # insert / update / delete / find_and_modify export ENABLE_MANAGEMENT_TOOLS=true # drop_database, drop_collection, create_index, ... ``` Or edit [`mcp.json`](mcp.json) directly. See the [DocumentDB MCP Server docs](https://github.com/microsoft/documentdb-mcp) for the full configuration surface. ## Compatibility Works with Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and other Agent Skills–compatible tools. ## License MIT