DocC MCP
Exposes Apple DocC documentation archives to AI agents, enabling real-time access to Swift documentation.
docc-mcp
A Model Context Protocol (MCP) server that exposes Apple DocC documentation archives to AI agents, enabling real-time access to Swift documentation without requiring training data or massive context windows.
Features
- 🔍 Search Documentation: Find symbols, types, functions across all DocC archives
- 📖 Symbol Details: Get detailed information about specific Swift symbols
- 📄 Article Access: Get detailed information about tutorials and articles
- 🗂️ Browse Archives: Navigate DocC archive structures interactively
- ⚡ Real-time Access: Query current documentation without stale data
- 🎯 Filtered Search: Search by symbol type (class, struct, enum, protocol, etc.)
Installation
npm install
npm run build
Usage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"docc": {
"command": "node",
"args": [
"/path/to/docc-mcp/dist/index.js",
"--archive-path", "/path/to/your/docc/archives",
"--archive-path", "~/Documents/Xcode/DerivedData"
]
}
}
}
Configuration Options
Configure archive paths using the --archive-path argument:
Single archive directory:
{
"mcpServers": {
"docc": {
"command": "node",
"args": [
"/path/to/docc-mcp/dist/index.js",
"--archive-path", "/Users/yourname/docc-archives"
]
}
}
}
Multiple archive directories:
{
"mcpServers": {
"docc": {
"command": "node",
"args": [
"/path/to/docc-mcp/dist/index.js",
"--archive-path", "/Users/yourname/Project1/docs",
"--archive-path", "/Users/yourname/Project2/docs",
"--archive-path", "~/Documents/Xcode/DerivedData"
]
}
}
}
Using Xcode's generated documentation:
{
"mcpServers": {
"docc": {
"command": "node",
"args": [
"/path/to/docc-mcp/dist/index.js",
"--archive-path", "~/Library/Developer/Xcode/DerivedData/YourApp-*/Build/Products/Debug/YourApp.doccarchive"
]
}
}
}
Note: At least one --archive-path must be specified. The server will exit with an error if no archive paths are provided.
Common DocC Archive Locations
Xcode-generated documentation:
~/Library/Developer/Xcode/DerivedData/YourApp-*/Build/Products/Debug*/Documentation/~/Library/Developer/Xcode/DerivedData/YourApp-*/Build/Products/Release*/Documentation/
Swift Package Manager:
.build/plugins/Swift-DocC/outputs/YourPackage.doccarchive
Manual DocC builds:
docs/(if you organize archives in a docs folder)- Project root directory where you run
swift package generate-documentation
Multiple projects:
{
"args": [
"/path/to/docc-mcp/dist/index.js",
"--archive-path", "~/MySwiftPackage1/docs",
"--archive-path", "~/MySwiftPackage2/.build/plugins/Swift-DocC/outputs",
"--archive-path", "~/Library/Developer/Xcode/DerivedData"
]
}
Available Tools
1. list_archives
Lists all available DocC archives with metadata.
{
"name": "list_archives"
}
2. search_docc
Search across DocC documentation.
{
"name": "search_docc",
"arguments": {
"query": "SwiftSyntax",
"archive": "SwiftSyntax",
"type": "struct"
}
}
3. get_symbol
Get detailed information about a specific symbol.
{
"name": "get_symbol",
"arguments": {
"symbolId": "documentation/swiftsyntax/tokensyntax",
"archive": "SwiftSyntax"
}
}
4. get_article
Get detailed information about a specific article or tutorial.
{
"name": "get_article",
"arguments": {
"articleId": "meetcomposablearchitecture",
"archive": "ComposableArchitecture"
}
}
5. browse_archive
Browse the structure of a DocC archive.
{
"name": "browse_archive",
"arguments": {
"archive": "SwiftSyntax",
"path": "documentation/swiftsyntax"
}
}
Archive Structure
The server expects DocC archives in directories specified by --archive-path:
Testing
Run the test script to validate functionality:
node test-server.js
This will:
- List all available archives
- Test search functionality
- Browse archive structures
- Validate symbol retrieval
Example Queries
Find all SwiftUI navigation components:
{
"name": "search_docc",
"arguments": {
"query": "navigation",
"type": "struct"
}
}
Get details about TokenSyntax:
{
"name": "get_symbol",
"arguments": {
"symbolId": "documentation/swiftsyntax/tokensyntax",
"archive": "SwiftSyntax"
}
}
Browse SwiftSyntax types:
{
"name": "browse_archive",
"arguments": {
"archive": "SwiftSyntax",
"path": "documentation/swiftsyntax"
}
}
Performance
- Caching: Archives and symbols are cached for fast repeated access
- Search limits: Results limited to 50 per query for performance
- Lazy loading: Archives loaded on-demand
- File limits: Search limited to 100 files per archive for performance
DocC Integration
This server works with standard DocC archives. To generate compatible archives:
# Using Swift-DocC
swift package generate-documentation --target MyLibrary
# Using Xcode
# Product → Build Documentation
Supported DocC Features
- ✅ Symbol metadata (title, kind, role, platforms)
- ✅ Documentation hierarchy
- ✅ Symbol references and relationships
- ✅ Code declarations with syntax highlighting
- ✅ Abstract/summary text
- ✅ Platform availability information
- ✅ Module organization
License
MIT License
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Socket
Scan dependencies for vulnerabilities and security issues using the Socket API.
Kubernetes Automated Installation
An agent for automatically installing Kubernetes in a Rocky Linux environment using MCP.
Structurize-MCP
Generates structured CSV files from natural language descriptions using Google Gemini AI.
vLEI.wiki MCP
Turns the Agent into a vLEI/KERI protocol expert
Chrome Debug MCP
This MCP allows you to record browser interactions with a chrome extension that include screenshots and console logs. The data is then saved to a local database that feeds the data to an AI system like claude code to search.
Hive MCP Server
Provides real-time crypto and Web3 intelligence using the Hive Intelligence API.
Jupyter Notebook MCP Server
Interact with Jupyter notebooks, allowing for code execution, cell manipulation, and notebook management.
Tmux MCP Server
Provides persistent shell execution through tmux sessions.
PydanticRPC
A Python library for building gRPC/ConnectRPC services with Pydantic models, featuring automatic protobuf generation and AI assistant tool exposure.
Python Interpreter MCP
An MCP server that provides Python code execution capabilities through a REST API interface.