Cursor Feature Request – cq Integration

Feature Request: Integrate mozilla-ai/cq as native agent knowledge layer

Category: Agent / AI
Repo: mozilla-ai/cq


The Problem

Every time Cursor’s agent resolves an error or architectural decision, that knowledge vanishes at session end. The next session — or a teammate — starts from zero and makes the same mistake again. There’s no institutional memory across agent sessions or across team members.

What cq Does

cq (mozilla-ai/cq) is an open standard for shared agent learning. It lets AI agents persist, share, and query collective knowledge via an MCP server, backed by local SQLite with optional self-hosted team sync. Agents query before acting and record learnings after resolving problems.

It already works as a Claude Code plugin and an OpenCode MCP server. The MCP protocol is fully implemented — Cursor just needs to connect to it.

Requested Integration

  1. MCP server support in agent mode — allow registering cq-mcp-server via .cursor/mcp.json
  2. Post-error hook — after resolving an error, auto-trigger cq store with context + fix
  3. Pre-task knowledge query — inject relevant cq results into agent context before new tasks (opt-in)
  4. Team sync support — pass CQ_TEAM_ADDR + CQ_TEAM_API_KEY env vars through to the MCP server
  5. .cursor/rules integration — surface top cq learnings as dynamic additions to project rules

Why This Is Straightforward

cq already implements the full MCP protocol. The server runs locally via uv. No cloud dependency, no vendor lock-in. Minimal config:

// .cursor/mcp.json (proposed)
{
  "cq": {
    "type": "local",
    "command": ["uv", "run", "--directory", "~/.cq/server", "cq-mcp-server"],
    "environment": {
      "CQ_TEAM_ADDR": "http://your-team-api:8742",
      "CQ_TEAM_API_KEY": "your-key"
    }
  }
}

Impact

For teams using Cursor for agent-driven development on complex codebases, this turns every solved problem into permanent institutional knowledge. The agent gets smarter per-project over time — not just per-session. Especially valuable for distributed teams and projects with non-obvious domain rules.

Reference: GitHub - mozilla-ai/cq: An open standard for shared agent learning. Agents persist, share, and query collective knowledge so they stop rediscovering the same failures independently. · GitHub (Apache 2.0 · v0.4.0, March 2026)

Hey, thanks for the feature request.

Good news, most of what you’re describing is already possible with Cursor’s current MCP support:

  1. MCP server in agent mode: this works today. You can register cq-mcp-server in .cursor/mcp.json using the standard stdio transport. The config would look like:
{
  "mcpServers": {
    "cq": {
      "command": "uv",
      "args": ["run", "--directory", "~/.cq/server", "cq-mcp-server"],
      "env": {
        "CQ_TEAM_ADDR": "http://your-team-api:8742",
        "CQ_TEAM_API_KEY": "your-key"
      }
    }
  }
}

Docs: Model Context Protocol (MCP) | Cursor Docs

  1. Post-error hooks: Cursor supports hooks that can trigger scripts on specific agent events. You could wire up a hook to call cq store after certain actions.

  2. Pre-task knowledge request: once the MCP server is registered, the agent can call cq tools during a session. You can also use project rules .cursor/rules to tell the agent to request cq before starting tasks.

  3. Team sync: env vars in mcp.json are passed through to the server, so CQ_TEAM_ADDR and CQ_TEAM_API_KEY should work as-is.

  4. Dynamic rules injection: this is the one part that doesn’t have a direct path today. You could approximate it by having the agent request cq and use the results manually, but automatic rule injection from MCP results isn’t a feature yet.

You might also find these community discussions useful, others are solving similar agent memory problems:

Have you tried running cq as a standard MCP server in Cursor? Curious if you ran into any specific blockers.