Getting Started

Get ContextQ running with your AI agent in under five minutes.

Prerequisites

  • Node.js 18+ installed on your machine
  • An MCP-compatible AI agent: Claude Code, Cursor, Codex, Gemini CLI, Windsurf, or Cline
1

Create an account

Sign up at app.contextq.dev — the free tier requires no credit card. Once you are in the dashboard, navigate to Settings > API Keys and generate a new key. Copy it; you will need it in the next step.

Tip: Keep your API key secret. Do not commit it to version control. Store it in an environment variable or your agent's local config.
2

Add the MCP server to your agent

ContextQ exposes its tools through the Model Context Protocol. Add the server configuration to your agent of choice.

Claude Code

Add to ~/.claude/settings.json or a project-level .mcp.json:

.mcp.json
{
  "mcpServers": {
    "shared-context": {
      "type": "http",
      "url": "https://api.contextq.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

.cursor/mcp.json
{
  "mcpServers": {
    "shared-context": {
      "command": "npx",
      "args": ["-y", "@contextq/mcp-client"],
      "env": {
        "CONTEXTQ_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Other agents

Codex, Gemini CLI, Windsurf, and Cline all support MCP. Use the HTTP transport configuration (same as Claude Code) or the stdio transport via @contextq/mcp-client (same as Cursor). Consult your agent's MCP documentation for the exact config file location.

3

Save your first context

In your AI agent, ask it to save a piece of knowledge. In Claude Code you can use the /ctx save skill command, or the agent can call the ctx_save tool directly.

terminal

# Ask your agent to save context

$ /ctx save "Deploy uses Docker Compose on production server"

Saved entry ctx-a1b2c3 (company: acme)

4

Search context

Use ctx_search to find prior decisions, conventions, and patterns across all your projects. The search combines full-text and vector similarity for accurate results even on vague queries.

terminal

# Search across all projects

$ /ctx search deployment infrastructure

Found 3 entries across 2 projects

Your agent can now retrieve context automatically when working on related tasks. Knowledge saved once is available everywhere.

Available tools

ContextQ exposes 9 tools through the MCP server. Your agent discovers these automatically once connected.

Tool Description
ctx_save Save a new context entry with content, tags, and metadata.
ctx_search Search entries using hybrid full-text and vector similarity.
ctx_list List all context entries with optional filtering and pagination.
ctx_get Retrieve a single context entry by its ID.
ctx_update Update an existing entry's content, tags, or metadata.
ctx_delete Delete a context entry by ID.
ctx_import Bulk import context entries from a file or structured data.
ctx_stats View usage statistics: entry count, storage, and search volume.
ctx_dream AI-powered context consolidation and insight generation. Pro plan and above.

Next steps

  • Read the full documentation for detailed tool parameters and API reference.
  • Explore the REST API for programmatic access outside of MCP.
  • Invite team members from the dashboard to share context across your organization.