This is a Cloudflare Worker implementation of the Tutorial Codebase Knowledge MCP server. It allows you to generate comprehensive tutorials from any GitHub repository, accessible remotely without any local installation.
-
Install dependencies:
cd worker npm install -
Create KV namespace:
wrangler kv:namespace create "TUTORIAL_KV" wrangler kv:namespace create "TUTORIAL_KV" --preview
Copy the IDs from the output and update them in
wrangler.toml. -
Set up API keys (optional):
For better tutorial generation, add your OpenAI API key:
wrangler secret put OPENAI_API_KEY
-
Deploy:
npm run deploy
Add to your Claude Desktop configuration:
{
"mcpServers": {
"tutorial-codebase-knowledge": {
"url": "https://tutorial-codebase-knowledge.your-username.workers.dev",
"transport": "sse"
}
}
}Generates a comprehensive tutorial from a GitHub repository.
Parameters:
source(required): GitHub repository URLsource_type: Currently only supports "repo"language: Tutorial language (default: English)llm_provider: LLM provider to use (openai, anthropic, gemini)
Example:
"Generate a tutorial for https://github.com/example/project"
- ✅ Fully serverless - runs on Cloudflare's edge network
- ✅ No local installation required
- ✅ Automatic GitHub repository analysis
- ✅ Multi-language tutorial generation
- ✅ KV storage for generated tutorials
- ✅ Secure with optional API key authentication
Run locally:
npm run devView logs:
npm run tailThe worker:
- Fetches repository files from GitHub API
- Analyzes code structure to identify key abstractions
- Generates comprehensive tutorial using LLM
- Stores results in Cloudflare KV
- Returns tutorial via MCP protocol
- Currently only supports public GitHub repositories
- Limited to 100 files per repository for performance
- Requires API keys for advanced LLM features