{"slug": "setting-up-the-codehabits-mcp-server-in-cursor-5-minutes", "title": "Setting Up the Codehabits MCP Server in Cursor (5 Minutes)", "summary": "Codehabits released an MCP server that integrates six tools into Cursor, enabling convention lookup, code validation, domain knowledge retrieval, reviewer suggestions, and a feedback loop for updating conventions. Setup takes about five minutes using the CLI command `npx @codehabits/cli mcp-install`, which writes to `.cursor/mcp.json`. The server reads from `.codehabits/` files in the repository, providing AI-assisted development with team-specific patterns.", "body_md": "The **Codehabits MCP server** gives Cursor six tools that read from `.codehabits/`\n\nin your repo — convention lookup, code validation, domain knowledge, reviewer suggestions, and a feedback loop for updating conventions.\n\nSetup takes about five minutes if you already ran `codehabits enable`\n\n.\n\n`.codehabits/meta.json`\n\nin your repo (from `npx @codehabits/cli enable`\n\n)If you don't have intelligence files yet, run enable first — see the [quickstart](https://codehabits.dev/docs/quickstart).\n\nFrom your repository root:\n\n```\nnpx @codehabits/cli mcp-install\n```\n\nThis writes to `.cursor/mcp.json`\n\n. Commit it so teammates get the same config:\n\n```\ngit add .cursor/mcp.json\ngit commit -m \"chore: add codehabits MCP server\"\ngit push\n```\n\nMCP servers load at startup. Fully quit and reopen Cursor (or reload the window) before testing tools.\n\nOpen Cursor Agent and check that the **codehabits** MCP server is connected. You should see these tools:\n\n| Tool | Purpose |\n|---|---|\n`get_team_context` |\nConventions and anti-patterns |\n`check_code` |\nValidate a snippet against team rules |\n`get_knowledge` |\nDomain knowledge by topic |\n`suggest_reviewers` |\nExpertise-based reviewer routing |\n`record_feedback` / `approve_proposal`\n|\nPropose and merge convention updates |\n\nFull reference: [MCP server documentation](https://codehabits.dev/docs/mcp).\n\nTry these prompts in Cursor Agent:\n\n[Agent Skills](https://codehabits.dev/docs/agent-skills) load passively when Cursor starts a task. MCP tools are explicit lookups — use them when you need validation or knowledge mid-task.\n\nMost teams enable both: skills for baseline context, MCP for active checks.\n\nThe [codehabits.dev/agents](https://codehabits.dev/agents) page has a bootstrap prompt that runs enable, mcp-install, and reads your intelligence files in one shot. Paste it when onboarding a new repo or teammate.\n\nIf tools return *\"No intelligence data available,\"* confirm `.codehabits/`\n\nexists and the MCP server's working directory is your repo root. Run `codehabits enable`\n\nif files are missing.\n\nCommon fixes:\n\n| Symptom | Fix |\n|---|---|\n| Server not listed | Restart Cursor after editing `mcp.json`\n|\n| Wrong conventions | Check MCP `cwd` is repo root, not a subfolder |\n| Stale rules | Run `npx @codehabits/cli sync`\n|\n\n[Codehabits](https://codehabits.dev) extracts team coding conventions from GitHub PR history and delivers them to AI tools via Agent Skills and MCP — so your whole team shares the same evidence-backed patterns, not hand-maintained rule files.\n\n*Originally published at codehabits.dev.*", "url": "https://wpnews.pro/news/setting-up-the-codehabits-mcp-server-in-cursor-5-minutes", "canonical_source": "https://dev.to/sriram7/setting-up-the-codehabits-mcp-server-in-cursor-5-minutes-4h42", "published_at": "2026-06-17 23:08:00+00:00", "updated_at": "2026-06-17 23:51:42.109610+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-agents"], "entities": ["Codehabits", "Cursor", "MCP server", "npx @codehabits/cli"], "alternates": {"html": "https://wpnews.pro/news/setting-up-the-codehabits-mcp-server-in-cursor-5-minutes", "markdown": "https://wpnews.pro/news/setting-up-the-codehabits-mcp-server-in-cursor-5-minutes.md", "text": "https://wpnews.pro/news/setting-up-the-codehabits-mcp-server-in-cursor-5-minutes.txt", "jsonld": "https://wpnews.pro/news/setting-up-the-codehabits-mcp-server-in-cursor-5-minutes.jsonld"}}