roku-docs-mcp
Provides local full-text search and browsing of Roku developer documentation, with tools to search docs, filter search results by documentation section, retrieve full documentation pages, list sections and page counts, view cache statistics, and refresh the cached crawl.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
roku-docs-mcp
MCP server for Roku developer documentation. Search and browse developer.roku.com locally with full-text search — no internet required after the initial crawl.
Built for use with Claude Code while developing Roku channels in BrightScript and SceneGraph.
Why this exists
developer.roku.com is a JavaScript SPA. Standard web fetching tools can't read it reliably. This server crawls it once with Playwright (via crawl4ai), stores all ~1000 pages in a local SQLite database with FTS5 full-text search, and exposes them through an MCP interface.
Related MCP server: docs-mcp
Features
6 MCP tools — search, section-filtered search, page retrieval, section listing, cache stats, and cache refresh
FTS5 full-text search with BM25 ranking — instant results from local SQLite
Incremental recrawl — skips unchanged pages via content hash; only updates new or modified docs
CLI interface —
roku-docs-mcp serve / crawl / search / stats / checkAuto-refresh daemon — optional background thread that checks freshness and re-crawls automatically (
serve --auto-refresh)Freshness check —
roku-docs-mcp checkexits 0 (fresh) or 1 (stale), ideal for external cron jobsWAL mode — SQLite write-ahead logging for concurrent read performance
No internet after first crawl — all ~1000 docs pages stored locally
Installation
pip (persistent install)
pip install roku-docs-mcp
crawl4ai-setup # downloads headless Chromium (~150 MB, one-time)uvx (no setup needed, runs in ephemeral env)
uvx --from roku-docs-mcp roku-docs-mcp serveNote: With
uvx, runcrawl4ai-setupinside the same environment first, or use thepipinstall method.
Populate the cache (first run)
Crawls developer.roku.com and stores all docs locally. Takes 15–30 minutes.
roku-docs-mcp crawlThe database is stored at ~/.cache/roku-docs-mcp/docs.db by default.
Register with your AI assistant
Claude Code
claude mcp add --scope user roku-docs -- roku-docs-mcp serveAfter registration, restart Claude Code. The tools will be available in every session.
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"roku-docs": {
"command": "roku-docs-mcp",
"args": ["serve"]
}
}
}VS Code / GitHub Copilot
Add to .vscode/settings.json in your workspace:
{
"mcp": {
"servers": {
"roku-docs": {
"type": "stdio",
"command": "roku-docs-mcp",
"args": ["serve"]
}
}
}
}Available tools
Tool | Description |
| Full-text search across all cached pages (FTS5 BM25 ranking) |
| FTS5 search filtered to a specific documentation section |
| Retrieve full markdown content of a page by path |
| List all documentation sections with page counts |
| Return database statistics: total pages, DB size, last crawl date |
| Re-crawl developer.roku.com and update the local cache |
search_docs
search_docs(query: str, limit: int = 10) -> list[dict]Supports FTS5 MATCH syntax. Examples:
"roSGNode"— find all pages mentioning roSGNode"focus keyboard"— pages about focus and keyboard input"Task node thread"— pages about Task nodes and threading
search_by_section
search_by_section(section: str, query: str, limit: int = 10) -> list[dict]Search within a specific section of the docs. Use list_sections() to see available section names. Examples:
section="references", query="roUrlTransfer"— find roUrlTransfer in the API referencesection="developer-program", query="certification"— certification requirements
get_page
get_page(path: str) -> dictRetrieve a page by its path (e.g. /docs/references/brightscript/components/rosgnode.md).
Partial paths are matched with a fuzzy fallback.
Returns a dict with url, path, section, title, content, and crawled_at fields.
list_sections
list_sections() -> dictReturns all sections and page counts, plus the timestamp of the last crawl.
get_stats
get_stats() -> dictReturns database statistics: total_pages, db_size_mb, sections breakdown, and last_crawled.
refresh_cache
refresh_cache(max_depth: int = 10, max_pages: int = 2000) -> dictRe-crawls developer.roku.com using incremental updates (skips unchanged pages). Use when Roku publishes new docs. Runs in a separate process to avoid event loop conflicts.
Returns {"saved": N, "skipped": M}.
CLI subcommands
roku-docs-mcp [serve|crawl|search|stats|check]Subcommand | Description |
| Start the MCP server (default when no subcommand given) |
| Crawl developer.roku.com and populate/update the local cache |
| Search the local cache and print results as JSON |
| Print cache statistics as JSON |
| Check cache freshness; exits 0 (fresh) or 1 (stale) |
Options for crawl:
roku-docs-mcp crawl --max-depth 10 --max-pages 2000Options for search:
roku-docs-mcp search "roSGNode focus" --limit 5Options for serve:
# Enable background auto-refresh daemon (checks every 24h, refreshes if cache is >7 days old)
roku-docs-mcp serve --auto-refresh
# Customize thresholds
roku-docs-mcp serve --auto-refresh --auto-refresh-days 3 --check-interval-hours 12Flag | Default | Description |
| off | Enable background staleness checker and auto-recrawl |
|
| Days before cache is considered stale |
|
| Hours between staleness checks |
Using check with external cron:
# Recrawl every Sunday at midnight if stale
0 0 * * 0 roku-docs-mcp check || roku-docs-mcp crawlEnvironment variables
Variable | Default | Description |
|
| Path to the SQLite database |
|
| Starting URL for the BFS crawl |
|
| Glob pattern to filter crawled URLs |
|
| CSS selector for content extraction |
|
| Maximum content size in bytes per page |
|
| Days before cache is considered stale (used by |
|
| Hours between staleness checks (used by |
Architecture
developer.roku.com (SPA)
│
▼ crawl4ai + Playwright (BFS, ~1000 pages)
│
▼ BeautifulSoup (extract .developer-content-body)
│
▼ DefaultMarkdownGenerator (HTML → Markdown)
│
▼ SQLite + FTS5 (~/.cache/roku-docs-mcp/docs.db)
WAL mode, 64 MB cache, content hash for incremental updates
│
▼ FastMCP server (stdio transport)
│
▼ Claude Code / Claude Desktop / VS CodeThe crawl runs once and caches everything. Subsequent queries hit local SQLite only — instant results.
Development
git clone https://github.com/yourusername/roku-docs-mcp
cd roku-docs-mcp
python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
crawl4ai-setup
# Run tests
python -m pytest tests/ -v # 112 tests
# Type checking
python -m mypy src/ # strict mode, zero errorsTroubleshooting
"No results found" after install
Run roku-docs-mcp crawl first. The cache starts empty.
crawl4ai-setup fails
Make sure you have enough disk space (~300 MB for Chromium). On some Linux systems you may need playwright install-deps.
MCP server not appearing in Claude Code
Run claude mcp list to verify registration. Restart Claude Code after adding the server.
Crawl takes too long or times out
Use --max-pages to limit the crawl: roku-docs-mcp crawl --max-pages 200. This crawls the most recently modified pages first.
Database locked errors
The server uses WAL mode and per-thread connections. If you see lock errors, ensure you're not running multiple roku-docs-mcp serve instances pointing at the same database.
Credits & Acknowledgements
This project would not be possible without the official Roku developer documentation and the work of the Roku team in maintaining it.
All documentation content indexed by this tool is authored and owned by Roku, Inc. and is made available at developer.roku.com. This MCP server is an unofficial tool that crawls and caches that content locally to improve developer tooling — it does not redistribute or claim ownership of any Roku documentation.
Official Roku resources
Roku Developer Portal — official developer home
Roku Developer Documentation — full docs (BrightScript, SceneGraph, REST APIs, etc.)
Roku Developer Program — enroll and publish channels
Roku Developer Forum — community support
Roku GitHub — official Roku open-source projects
Thank you to the Roku developer relations and documentation teams for maintaining such a comprehensive reference. If you find errors or outdated content, please report them directly to Roku via the developer portal.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search and read Apple developer documentation, HIG, and WWDC transcripts as Markdown.
Read versioned developer documentation with original source links using five public MCP tools.
Read-only MCP server for the OrchestKit docs: full-text search + Markdown fetch. No auth.
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceMCP server for Roku BrightScript documentation and device control, enabling doc search, device introspection, keypress/keysequence input, app launch, and sideloading.-
- FlicenseNot gradedqualityDmaintenanceIndexes documentation sites by base URL and serves keyword search, optional semantic search, and Markdown page retrieval as MCP tools, all from a single SQLite file.-
- AlicenseAqualityCmaintenanceProvides local, offline searchable access to Roku and BrightScript development documentation via MCP tools and resources, including full-text search, sectioned reading of large docs, and background syncing from the upstream repo.41-
- AlicenseAqualityCmaintenanceEnables AI agents to search, install, read, and navigate DevDocs documentation offline via MCP, with token-efficient search/read/toc tools and local caching.61MIT