Documentation
Everything you need to build with CtxKit.
Quick Start
Create a Project
Sign up and create a project. Get 100 free credits.
Create API Key
Enable url-ingest service and create an API key.
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:
{
"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:
{
"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, runwhich npxand 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
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
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
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_urlSubmit a URL for background processing. Returns a job_id for polling.
Parameters: url (required), options (optional dict)
ctxkit_ingest_get_jobCheck the status of a processing job.
Parameters: job_id (required)
ctxkit_ingest_get_resourceGet metadata for a processed resource: title, summary, TOC, page count.
Parameters: resource_id (required)
ctxkit_ingest_list_resourcesList all resources in the project with pagination.
Parameters: offset (default: 0), limit (default: 20)
ctxkit_ingest_readProgressive disclosure reading. Navigate documents hierarchically.
Parameters: resource_id (required), section (optional), offset (default: 0), limit (default: 4000)
ctxkit_ingest_searchSemantic 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.