MCP Server
Capstok ships a Model Context Protocol server that lets AI tools — Claude, Cursor, Cody, and any MCP-compatible assistant — query course content, look up task details, and check learner progress directly from the editor.
Quick start
Add the server to your Claude Desktop or Cursor config. Replace YOUR_API_KEY with a key generated from Settings → API keys.
// claude_desktop_config.json
{
"mcpServers": {
"capstok": {
"command": "npx",
"args": ["-y", "@capstok/mcp"],
"env": {
"CAPSTOK_API_KEY": "YOUR_API_KEY",
"CAPSTOK_BASE_URL": "https://capstok.com"
}
}
}
}Available tools
Every tool is read-only. The server never mutates learner data.
Returns every published course with slug, track, title, summary, and module count.
Input schema
{
"type": "object",
"properties": {
"track": {
"type": "string",
"description": "Filter by track slug (e.g. 'ai-prompting', 'blockchain', 'engineering'). Omit for all tracks."
}
}
}Example call
// List all courses on the blockchain track
{
"name": "list_courses",
"arguments": { "track": "blockchain" }
}Example response
[
{
"slug": "blockchain-101",
"trackSlug": "blockchain",
"title": "Blockchain 101",
"summary": "Hashing, consensus, wallets, and smart contracts — from first principles.",
"moduleCount": 10,
"taskCount": 100,
"tier": "free"
},
{
"slug": "solidity",
"trackSlug": "blockchain",
"title": "Solidity: Deploy, Write, Secure",
"summary": "Ethereum smart contract development with Foundry — from first deploy to auditable DeFi.",
"moduleCount": 10,
"taskCount": 100,
"tier": "free"
}
]Returns the full module and task manifest for a course. Task content is not included — use get_task for that.
Input schema
{
"type": "object",
"required": ["track", "course"],
"properties": {
"track": { "type": "string", "description": "Track slug" },
"course": { "type": "string", "description": "Course slug" }
}
}Example call
{
"name": "get_course",
"arguments": {
"track": "engineering",
"course": "concurrency"
}
}Example response (truncated)
{
"slug": "concurrency",
"title": "Concurrency: From Goroutines to Distributed Systems",
"modules": [
{
"slug": "what-is-concurrency",
"title": "What Is Concurrency?",
"tier": "free",
"tasks": [
{ "slug": "parallelism-vs-concurrency", "title": "Parallelism vs Concurrency", "type": "challenge" },
{ "slug": "the-go-scheduler", "title": "The Go Scheduler", "type": "challenge" }
]
},
{
"slug": "deadlocks",
"title": "Deadlocks & Livelocks",
"tier": "registered",
"tasks": [
{ "slug": "the-four-conditions", "title": "The Four Conditions for Deadlock", "type": "challenge" }
]
}
]
}Returns the full MDX content, demo code, try-it steps, prompts, and references for a single task. Free-tier tasks are readable without a key; member tasks require a key belonging to an account with access.
Input schema
{
"type": "object",
"required": ["track", "course", "module", "task"],
"properties": {
"track": { "type": "string" },
"course": { "type": "string" },
"module": { "type": "string" },
"task": { "type": "string" }
}
}Example call
{
"name": "get_task",
"arguments": {
"track": "ai-prompting",
"course": "prompting",
"module": "reasoning",
"task": "think-step-by-step"
}
}Example response
{
"slug": "think-step-by-step",
"title": "Think Step by Step",
"type": "challenge",
"difficulty": "beginner",
"why": "Chain-of-thought prompting consistently outperforms direct-answer prompts on multi-step reasoning tasks...",
"demoProse": "Add 'think step by step' or 'let's reason through this' to see the difference...",
"demoCode": "const prompt = `Solve this step by step:\n{problem{"}"}`;",
"tryIt": [
"Run the demo with a 3-step arithmetic problem and a 7-step one — note where CoT gains the most.",
"Remove the step-by-step instruction and compare token count vs. correctness.",
"Try 'think out loud' vs. 'think step by step' — do you see a quality difference?"
],
"prompts": {
"basic": "In one paragraph, explain chain-of-thought prompting like I'm new to it.",
"mechanism": "Walk me through how chain-of-thought actually changes what a language model does step by step.",
"advanced": "Given a coding task with 5 interdependent sub-steps, design a chain-of-thought prompt that minimises hallucination at each step."
}
}Returns the authenticated learner's completion state for a course — which tasks are done, what's left, and whether a certificate has been issued.
Input schema
{
"type": "object",
"required": ["track", "course"],
"properties": {
"track": { "type": "string" },
"course": { "type": "string" }
}
}Example response
{
"course": "blockchain-101",
"completedTasks": 42,
"totalTasks": 100,
"pct": 42,
"certificateIssued": false,
"nextTask": {
"module": "consensus",
"task": "proof-of-work-vs-stake",
"url": "https://capstok.com/learn/blockchain/blockchain-101/consensus/proof-of-work-vs-stake"
}
}Authentication
Pass your API key in the Authorization header or as the CAPSTOK_API_KEY env var when running the MCP server process. Free-tier tasks work without a key; registered and member tasks require one.
// Direct HTTP (if you prefer not to use the MCP package) GET https://capstok.com/api/mcp/courses Authorization: Bearer ck_live_xxxxxxxxxxxxxxxxxxxx
Rate limits
| Tier | Requests / minute | Notes |
|---|---|---|
| Anonymous | 30 | Free tasks only |
| Registered | 120 | Free + registered tasks |
| Member | 600 | All tasks |
Errors
All errors follow a consistent shape:
{ "error": "NOT_FOUND", "message": "Course 'xyz' not found." }
{ "error": "FORBIDDEN", "message": "Task requires member access." }
{ "error": "RATE_LIMITED", "message": "Too many requests. Retry after 12s." }
{ "error": "INVALID_API_KEY", "message": "API key is invalid or revoked." }The MCP server package and API key generation are currently in closed beta. To request early access, email api@capstok.com with a short note on your use case.