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
Add the following to your Agent's MCP configuration (e.g. claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"ctxkit": {
"url": "https://api.ctxkit.cn/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY_HERE"
}
}
}
}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.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.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.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.