Documentation

Documentation

Everything you need to build with CtxKit.

Quick Start

1

Create a Project

Sign up and create a project. Get 100 free credits.

2

Create API Key

Enable url-ingest service and create an API key.

3

Connect Agent

Add MCP config to Claude or Cursor. Or call REST API.

MCP Integration

Cursor / VS Code / Claude Code CLI (Streamable HTTP)

Add to .cursor/mcp.json / ~/.claude.json / VS Code MCP settings. These clients speak HTTP natively:

json
{
  "mcpServers": {
    "ctxkit-url-ingest": {
      "type": "http",
      "url": "https://api.ctxkit.linloir.cn/mcp/url-ingest",
      "headers": {
        "X-API-Key": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Claude Desktop (stdio bridge via mcp-remote)

Claude Desktop's claude_desktop_config.json only supports stdio transport, so we run the mcp-remote npm package as a local bridge:

json
{
  "mcpServers": {
    "ctxkit-url-ingest": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.ctxkit.linloir.cn/mcp/url-ingest",
        "--header",
        "X-API-Key: YOUR_API_KEY_HERE"
      ]
    }
  }
}
  • Requires Node.js (for npx). On macOS, the Claude Desktop GUI doesn't inherit your shell PATH — if startup fails silently, run which npx and replace "npx" with the absolute path (e.g. /opt/homebrew/bin/npx).
  • After editing the config, fully quit Claude Desktop (⌘Q / tray → Quit) and reopen — reloading the window is not enough.
  • Logs live at ~/Library/Logs/Claude/mcp*.log (macOS) / %APPDATA%\Claude\logs\mcp*.log (Windows).

Replace YOUR_API_KEY_HERE with your actual API key. The MCP server exposes 6 tools that your agent can call directly.

REST API

Authentication

All requests require an X-API-Key header. Keys are project-scoped and can be created in your project settings.

Ingest a URL

bash
curl -X POST https://api.ctxkit.linloir.cn/api/v1/projects/{project_id}/url-ingest/ingest \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/document.pdf"}'

Poll Job Status

bash
curl https://api.ctxkit.linloir.cn/api/v1/projects/{project_id}/url-ingest/jobs/{job_id} \
  -H "X-API-Key: YOUR_API_KEY_HERE"

Semantic Search

bash
curl -X POST https://api.ctxkit.linloir.cn/api/v1/projects/{project_id}/url-ingest/search \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"query": "your search query", "limit": 10}'

Available Tools

ctxkit_ingest_url

Submit a URL for background processing. Returns a job_id for polling.

Parameters: url (required), options (optional dict)

ctxkit_ingest_get_job

Check the status of a processing job.

Parameters: job_id (required)

ctxkit_ingest_get_resource

Get metadata for a processed resource: title, summary, TOC, page count.

Parameters: resource_id (required)

ctxkit_ingest_list_resources

List all resources in the project with pagination.

Parameters: offset (default: 0), limit (default: 20)

ctxkit_ingest_read

Progressive disclosure reading. Navigate documents hierarchically.

Parameters: resource_id (required), section (optional), offset (default: 0), limit (default: 4000)

ctxkit_ingest_search

Semantic search across resources using vector similarity.

Parameters: query (required), resource_id (optional), limit (default: 10)

Ready to get started?

Sign up for 100 free credits. No credit card required.

Get Started