Skip to contentSkip to main content
Get free API key →
← API Reference

Quickstart

Connect your MCP client, run one tool call, confirm a saving. Takes under two minutes for users who already have a gc_ key and a supported client.

Prerequisites

A gotcontext.ai account
Free tier is sufficient. Create an account if you don't have one.
A gc_ API key
Mint one from Dashboard → Settings → API Keys. The key starts with gc_. Free keys include the core compression, advisory, and budget tools (~22) plus 1,000 compressions per month.
A supported MCP client
Claude Code, Cursor, VS Code (Copilot Agent mode), or Gemini CLI. All four support Streamable HTTP MCP natively; no local bridge or adapter is needed.

Guided flow to first success

Steps 1 and 2 are the minimum path. Steps 3 and 4 are optional (Pro+) but take 30 seconds each and add per-project usage attribution.

Add the MCP server to your client

Paste the config below into your client. Replace gc_your_key_here with the key you minted in the prerequisites. The ?profile=full parameter loads all 150 tools (most require Pro — run gc_pre_flight() to see which tools your plan includes). Switch to ?profile=core for just the 7 essential compression tools (~2,000 tokens).

# .mcp.json (in your project root or ~/.claude/.mcp.json)
# Start Claude Code with the key exported in your shell first:
#   export GOTCONTEXT_KEY=gc_your_key_here

{
  "mcpServers": {
    "gotcontext": {
      "url": "https://api.gotcontext.ai/mcp?profile=full",
      "headers": {
        "Authorization": "Bearer ${GOTCONTEXT_KEY}"
      }
    }
  }
}
Claude Code: key must be in your shell environment
${GOTCONTEXT_KEY} in.mcp.json is resolved from shell env at session start — it does NOT read from.env.local. Run export GOTCONTEXT_KEY=gc_... && claude before launching Claude Code.

Confirm the server connected, then run your first tool call

After restarting your client, ask the agent to call gc_lookup — the free, no-quota tool that returns framework documentation from the Agent Context Hub. It requires no setup and confirms that the MCP connection is live end-to-end.

gc_lookup(framework="fastapi", query="how does dependency injection work")

# Returns a Markdown string (not JSON):
#
# ## gc_lookup: 'fastapi' — 'how does dependency injection work'
# Returned 5 chunk(s) from the Agent Context Hub.
#
# ### Chunk 1 (relevance 93.0%)
# FastAPI's dependency injection system lets you declare dependencies...
#
# ### Chunk 2 (relevance 88.4%)
# ...

If you see ranked Chunk sections — or a "No results found" message rather than an authentication error — the connection is live end-to-end. That is your first success on the free tier.

More free compression to try
ingest_context(text="...") followed by read_skeleton(file_id="...") compresses a large document into a queryable skeleton. Both are free tools. On structured API docs or large markdown files, the range is typically 60–85% token reduction.
Pro: compress verbose CLI output

On a Pro plan or higher, filter_cli_output compresses verbose terminal output (a git diff, a pytest -v run, flyctl logs) by 50–70%:

filter_cli_output(text="<paste a pytest -v run here>", command_hint="test_output")

# Returns JSON:
# {
#   "status": "success",
#   "filtered_text": "...",
#   "command_detected": "test_output",
#   "original_lines": 412,
#   "filtered_lines": 38,
#   "compression_pct": 70.1
# }
#
# Valid command_hint values: git_diff, test_output, lint_output, log_output, ...

(Optional, Pro+) Create a project for usage attribution

Projects require a Pro plan or higher. Without one, all traffic rolls up to your auto-created Default project. Create a named project to track per-repo budgets and usage separately:

create_project(name="my-repo", description="Compression project for my-repo")
# Returns plain text:
# Project 'my-repo' created. ID: 9f3c1b2a-4d5e-6789-...

You can also create projects from Dashboard → Projects.

(Optional, Pro+) Bind your key to the project

Go to Settings → API Keys and use the inline rebinder to attach your key to the project you just created. Allow up to 5 minutes for propagation (plan cache TTL). Then confirm attribution:

project_stats()
# Lists your projects (plain text):
#   Your projects (1):
#     • my-repo (ID: 9f3c1b2a-...)

project_stats(project_id="9f3c1b2a-...")
# Single-project rollup (plain text):
#   Project: my-repo
#   ID: 9f3c1b2a-...
#   Compressions: 1

If it isn't working

No tools appear in the MCP panel
Restart your client after adding the config. In Claude Code, run /mcp inside a session to list active servers. In Cursor, check Settings → MCP for a green status dot. A missing or mis-spelled Authorization header causes the server to return 401 and the client to drop the connection silently.
Tool call returns 401 Unauthorized
The key in your config does not match a live key in your account. Verify it starts with gc_ and matches exactly what the dashboard shows under Settings → API Keys. Shell env substitution in Claude Code reads the value at session start — run echo $GOTCONTEXT_KEY to confirm the variable is set before launching.
Tool call returns 403 — tool not available on your plan
Free keys have access to the core compression, advisory, and budget tools (~22). Tools outside the free set require Pro or higher. Run gc_pre_flight() — a free tool that shows what each tier includes. Upgrade at gotcontext.ai/pricing.
gc_lookup returns empty chunks or 'framework not found'
Supported frameworks: Drizzle ORM, FastAPI, FastMCP, LangChain, Next.js, Pydantic, React, SQLAlchemy, Tailwind CSS. Pass the framework name as a lowercase slug (e.g. nextjs,fastapi,tailwindcss). Check the gc_lookup reference for the exact slug list.

What's next

Getting Started
5-Minute Tutorial
Ingest a document, read its skeleton, search within it, and compress CLI output — four tool calls end to end.
Reference
Full MCP Tool Catalog
All 150 tools grouped by category (most require Pro). Use gc_pre_flight() to see which ones are available on your plan.
Reference
Authentication
gc_ API keys, Clerk JWTs, plan gating, and per-key project attribution explained.
Free
gc_lookup — free tool
Fetch compressed framework docs across 9 indexed frameworks — Drizzle, FastAPI, Next.js, React, Tailwind CSS, and four others. No quota.