Search local documentation from Dash through MCP
Project description
DocsetMCP
Access your local Dash documentation directly from AI assistants ๐
DocsetMCP is a Model Context Protocol (MCP) server that seamlessly integrates your local Dash docsets with AI assistants like Claude, enabling instant access to offline documentation without leaving your conversation.
๐ Table of Contents
- Why DocsetMCP?
- Quick Start
- Features
- Prerequisites
- Installation
- Configuration
- Usage Examples
- Available Tools
- Troubleshooting
- Development
- Contributing
- License
Why DocsetMCP?
- ๐ Instant Documentation: No switching, no web searches. Get straight to the docs directly in your AI conversation
- ๐ Local and Private: Work with docset files on your machine
- โก Lightning Fast: Optimized caching and direct database queries
- ๐ฏ Precise Results: Get exactly what you need with smart filtering
Quick Start
{
"mcpServers": {
"docsetmcp": {
"command": "uvx",
"args": ["docsetmcp"]
}
}
}
Add to your MCP config and restart your MCP client. Then try asking something like "Find me the AppIntent documentation"
โจ Features
Documentation Search
- Multi-Docset Support: Search across 165+ supported docsets including Apple, NodeJS, Python, and more
- Language Filtering: Target specific programming languages within docsets
- Name-Based Search: Only returns entries where search terms match item names for precise results
- Smart Ranking: Results ranked by match type (exact > prefix > substring) and dynamic type ordering
- Container Guidance: Framework and class entries show drilldown notes for exploring members
Cheatsheet Access
- Quick Reference: Instant access to Git, Vim, Docker, and 40+ other cheatsheets
- Fuzzy Matching: Find cheatsheets even with partial names
- Category Browsing: Explore commands by category within each cheatsheet
- Search Within: Query specific commands inside any cheatsheet
Performance & Integration
- Efficient Caching: In-memory caching for repeated queries
- Direct Database Access: No intermediate servers or APIs
- Universal: Works with Claude Desktop, Cursor, VS Code, and any MCP-compatible client
- Framework Discovery: List all available frameworks/types in any docset
- Container Guidance: Automatic drilldown notes for frameworks and classes with members
๐ฆ Supported Docsets
DocsetMCP supports 165+ docsets including:
Popular Languages
- Python (2 & 3)
- JavaScript / TypeScript
- Java
- C / C++
- Go
- Rust
- Ruby
- Swift / Objective-C
- PHP
- Bash
- And many more...
Web Frameworks
- React / Angular / Vue
- Node.js / Express
- Django / Flask
- Ruby on Rails
- Bootstrap
- jQuery
- And many more...
Developer Tools
- Git (cheatsheet)
- Docker (cheatsheet)
- Vim (cheatsheet)
- MySQL / PostgreSQL
- MongoDB / Redis
- nginx / Apache
- And many more...
Use list_available_docsets to see all docsets installed on your system.
Prerequisites
- macOS (Dash is Mac-only)
- Dash with desired docsets downloaded
- Python 3.10 or higher
- UV package manager (How to Install)
- An AI assistant that supports MCP (Claude Desktop, Claude Code CLI, Cursor IDE, etc.)
Configuration
Choose your MCP client below for specific setup instructions:
๐ค Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"docsetmcp": {
"command": "uvx",
"args": ["docsetmcp"]
}
}
}
โจ๏ธ Claude Code CLI
# For current project
claude mcp add docsetmcp "uvx docsetmcp"
# For all projects
claude mcp add --scope user docsetmcp "uvx docsetmcp"
๐ Cursor, VS Code, Windsurf and other MCP-compatible clients
Add to your MCP configuration (Cursor: .mcp/mcp.json in your project root:
{
"mcpServers": {
"docsetmcp": {
"command": "uvx",
"args": ["docsetmcp"]
}
}
}
Note: Restart your client and check your MCP settings for connection status.
Installation
No Installation Required (Recommended)
If your MCP client supports uvx, no installation is needed! The package will be automatically downloaded and run when needed. See the Quick Start or Configuration sections.
Manual Installation
If you prefer to install locally or your MCP client doesn't support uvx:
pip install docsetmcp
Then use docsetmcp instead of uvx docsetmcp in your configuration.
Development Installation
-
Clone and install:
git clone https://github.com/codybrom/docsetmcp.git cd docsetmcp pip install -e .
-
Run tests (optional):
# Install test dependencies pip install pytest pytest-cov pytest-xdist # Run basic tests pytest tests/test_docsets.py::TestDocsets::test_yaml_structure -v # Run quick tests (structure + existence checks) pytest tests/ -k "yaml_structure or test_docset_exists" -v # Run full test suite (all docsets) pytest tests/ -v # Run with coverage pytest tests/ --cov=docsetmcp --cov-report=html -v # Validate all local cheatsheets work (integration test) python scripts/validate_cheatsheets.py
Usage Examples
Once configured, you can ask your AI assistant to search documentation naturally:
๐ iOS/macOS Development
"Search for URLSession documentation"
"Show me how to use AppIntent in SwiftUI"
"Find CarPlay framework documentation" # Returns framework + related entries with drilldown notes
"Search for CPListTemplate class" # Returns specific CarPlay class
"Find NSPredicate examples"
๐ Web Development
"Look up Express.js middleware documentation"
"Search React hooks in the React docset"
"Find CSS flexbox properties"
๐ ๏ธ DevOps & Terminal
"Search git rebase commands in the Git cheatsheet"
"Show Docker compose syntax from the cheatsheet"
"Find bash array manipulation commands"
๐ Data Science
"Search pandas DataFrame methods"
"Look up NumPy array broadcasting"
"Find matplotlib pyplot functions"
Advanced Usage
# Search specific docset with language filter
"Use search_docs for 'URLSession' in the apple_api_reference docset with Swift language"
# Explore framework members using drilldown guidance
"Search for 'SwiftData' then follow the drilldown note to see all members"
# List all available tools
"What frameworks are available in the nodejs docset?"
# Browse cheatsheet categories
"Show all categories in the vim cheatsheet"
Discovery Workflow
DocsetMCP is designed for name-based searches, not keyword searching. Follow this workflow:
1. Start with Discovery Tools
# Find what languages are available
"List all available programming languages"
# Find docsets for your language
"Show me all Python docsets"
# See what types are available in a docset
"List all types in the apple_api_reference docset for Swift"
# Browse entries by type with letter filters
"Show me all Classes starting with 'UI' in apple_api_reference for Swift"
2. Then Search by Exact Names
# Once you know exact names, search for them
"Search for UIViewController in apple_api_reference with Swift"
"Find readFile documentation in nodejs docset"
"Show me the CarPlay framework documentation"
3. Use Drilldown Notes
When you find container types (frameworks, classes), follow the drilldown guidance:
# Container entry will show: "contains 42 additional members - use search_docs('ContainerName', max_results=50)"
"Search for SwiftData in apple_api_reference with max_results=50"
How It Works
- Multi-Format Support: Handles both Apple cache format and tarix compression
- Direct Database Access: Queries Dash's SQLite databases for fast lookups
- Name-Based Matching: Only returns entries where search terms match item names (no false positives)
- Smart Ranking: Prioritizes exact matches, then prefix matches, then substring matches
- Dynamic Type Ordering: Uses docset configuration files for intelligent result prioritization
- Container Detection: Automatically detects frameworks/classes with members and provides exploration guidance
- Smart Extraction: Decompresses Apple's DocC JSON or extracts HTML from tarix archives
- Markdown Formatting: Converts documentation to readable Markdown
Available Tools
DocsetMCP provides eleven powerful tools for accessing your documentation:
๐ search_docs
Search and extract documentation from any docset.
| Parameter | Type | Description | Default |
|---|---|---|---|
query |
string | Exact name to search (not keywords) | required |
docset |
string | Target docset (e.g., 'nodejs', 'python_3') | required |
language |
string | Programming language filter | docset default |
max_results |
int | Number of results (1-10) | 3 |
๐ search_cheatsheet
Search Dash cheatsheets for quick command reference.
| Parameter | Type | Description | Default |
|---|---|---|---|
cheatsheet |
string | Cheatsheet name (e.g., 'git', 'vim') | required |
query |
string | Search within cheatsheet | - |
category |
string | Filter by category | - |
max_results |
int | Number of results (1-50) | 10 |
๐ list_available_docsets
List all installed Dash docsets with their supported languages.
๐ list_available_cheatsheets
List all available Dash cheatsheets that can be searched.
๐๏ธ list_frameworks
List frameworks/types within a specific docset.
| Parameter | Type | Description | Default |
|---|---|---|---|
docset |
string | Target docset | required |
filter |
string | Filter framework names | - |
๐ list_languages
Discover all programming languages with available documentation.
๐ list_docsets_by_language
Find all docsets that support a specific programming language.
| Parameter | Type | Description | Default |
|---|---|---|---|
language |
string | Programming language | required |
๐ท๏ธ list_types
List all available types (Class, Protocol, Function, etc.) in a docset/language.
| Parameter | Type | Description | Default |
|---|---|---|---|
docset |
string | Target docset | required |
language |
string | Programming language filter | - |
๐ list_entries
List entries filtered by type and optional name prefix.
| Parameter | Type | Description | Default |
|---|---|---|---|
docset |
string | Target docset | required |
type_name |
string | Type to filter by (e.g., 'Class', 'Protocol') | required |
language |
string | Programming language filter | - |
name_filter |
string | Filter entries by name prefix | - |
max_results |
int | Number of results (1-100) | 20 |
๐ list_cheatsheet_categories
List all categories within a specific cheatsheet.
| Parameter | Type | Description | Default |
|---|---|---|---|
cheatsheet |
string | Cheatsheet name | required |
๐ fetch_cheatsheet
Fetch entire cheatsheet content (recommended for comprehensive access).
| Parameter | Type | Description | Default |
|---|---|---|---|
cheatsheet |
string | Cheatsheet name | required |
Troubleshooting
โ "Docset not found" error
This means the docset isn't installed in Dash. To fix:
- Open Dash.app
- Go to Preferences โ Downloads
- Download the required docset
- Restart your MCP client
๐ MCP connection failed
- Check installation: Run
pip show docsetmcpto verify installation - Test manually: Run
uvx docsetmcpin terminal - you should see MCP output - Check logs:
- Claude Desktop: Check Console.app for Claude logs
- Cursor: Check Output โ MCP panel
- Verify config path: Ensure config file is in the correct location
๐ญ No results found
- The content might not be in your local Dash cache
- Try searching with different terms or partial matches
- Use
list_available_docsetsto verify the docset is loaded - Some docsets may use different naming conventions (e.g., 'fs' vs 'filesystem')
๐ Other issues
- Python version: Ensure you have Python 3.10 or higher
- UV not found: Install UV package manager from https://docs.astral.sh/uv/
- Permission denied: Check file permissions on Dash docsets directory
- Report bugs: Open an issue at https://github.com/codybrom/docsetmcp/issues
Development
Building from Source
# Clone the repository
git clone https://github.com/codybrom/docsetmcp.git
cd docsetmcp
# Install in development mode
pip install -e .
# Run tests
pytest tests/ -v
Running Tests
# Quick tests (structure validation)
pytest tests/test_docsets.py::TestDocsets::test_yaml_structure -v
# Full test suite
pytest tests/ -v
# With coverage
pytest tests/ --cov=docsetmcp --cov-report=html -v
# Validate cheatsheets
python scripts/validate_cheatsheets.py
Contributing
We welcome contributions! Here's how you can help:
Adding New Docset Support
-
Create a YAML configuration in
docsetmcp/docsets/:# docsetmcp/docsets/my_docset.yaml name: My Docset description: Brief description of the docset docset_path: My_Docset/My_Docset.docset languages: - python - javascript
-
Test your configuration:
pytest tests/test_docsets.py -k "my_docset" -v
-
Submit a pull request
Reporting Issues
- ๐ Bug Reports
- ๐ก Feature Requests
- ๐ Documentation Issues
Development Guidelines
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation as needed
- Keep commits focused and descriptive
Technical Architecture
DocsetMCP leverages Dash's internal structure for efficient documentation access:
- Format Support: Handles both Apple's modern cache format (SHA-1 UUID-based with brotli compression) and traditional tarix archives
- Caching Strategy: In-memory caching for repeated queries
- Database Access: Direct SQLite queries to Dash's optimized indexes
- Content Extraction: Smart extraction with fallback strategies
- Type System: Full type hints for better IDE support
License
MIT License - see LICENSE file for details.
Acknowledgments
- Thanks to Kapeli for creating Dash
- Built on the Model Context Protocol standard
- Inspired by the MCP community and ecosystem
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docsetmcp-0.3.1.tar.gz.
File metadata
- Download URL: docsetmcp-0.3.1.tar.gz
- Upload date:
- Size: 57.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a95a340a3374ef41bb61af0a2015a117b513dea98d9c3b1c0285d51775f17e3
|
|
| MD5 |
40f8a18db0ecce1bfa90cafab2e4ca0a
|
|
| BLAKE2b-256 |
bb95aef352f1f3c06198dc62497fbc0eb83489bcb26e19232ee0a680d85df1eb
|
File details
Details for the file docsetmcp-0.3.1-py3-none-any.whl.
File metadata
- Download URL: docsetmcp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 91.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5800a3c218507a249c9f308638e860270364f8aa536c29352a9e6334293ffe6d
|
|
| MD5 |
358e7ade4103ca8dc61d4d04edc3a030
|
|
| BLAKE2b-256 |
b08bcd62d119330ddeabc415938ab2ec4043b1b50f79de5725b039e68a3c5cca
|