MCP Spark Documentation Server
Provides tools for searching and retrieving Apache Spark documentation, enabling full-text keyword searches with section filtering and access to the full content of documentation pages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Spark Documentation Serversearch for window functions in the sql-ref section"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Spark Documentation Server
An MCP (Model Context Protocol) server that provides search and retrieval tools for Apache Spark documentation. This server enables AI assistants like Claude to search and read Spark documentation directly.
Features
Full-text search using SQLite FTS5 with BM25 ranking and Porter stemming
Section filtering to narrow search results by documentation category
Sparse checkout for efficient cloning of only the docs directory from apache/spark
Docker support for portable deployment across projects
STDIO transport for seamless MCP client integration
Related MCP server: Gemini Docs MCP Server
Quick Start
Using Docker (Recommended)
# Build the Docker image (includes pre-indexed documentation)
make docker-build
# Test the server
make docker-runUsing uv (Local Development)
# Initialise the environment
make init
# Build the documentation index
make index
# Run the server
make runConfiguration
Claude Code / Claude Desktop
Add to your .mcp.json or global settings:
{
"mcpServers": {
"spark-documentation": {
"command": "docker",
"args": ["run", "-i", "--rm", "martoc/mcp-spark-documentation:latest"]
}
}
}For a locally built Docker image:
{
"mcpServers": {
"spark-documentation": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp-spark-documentation"]
}
}
}For local development without Docker:
{
"mcpServers": {
"spark-documentation": {
"command": "uv",
"args": ["run", "mcp-spark-documentation"],
"cwd": "/path/to/mcp-spark-documentation"
}
}
}MCP Tools
Tool | Description |
| Search Spark documentation by keyword query with optional section filtering |
| Retrieve the full content of a specific documentation page |
search_documentation
Search Apache Spark documentation using full-text search with stemming support.
Parameter | Type | Required | Default | Description |
| string | Yes | - | Search terms (supports stemming) |
| string | No | None | Filter by section (e.g., sql-ref, streaming, mllib) |
| integer | No | 10 | Maximum results (1-50) |
Common Sections: sql-ref, api, streaming, mllib, graphx, structured-streaming, configuration, tuning
read_documentation
Retrieve the full content of a documentation page.
Parameter | Type | Required | Description |
| string | Yes | Relative path to document (from search results) |
CLI Commands
# Build/rebuild the documentation index
uv run spark-docs-index index
uv run spark-docs-index index --rebuild
uv run spark-docs-index index --branch master
# Show index statistics
uv run spark-docs-index statsDevelopment
make init # Initialise development environment
make build # Run full build (lint, typecheck, test)
make test # Run tests with coverage
make format # Format code
make lint # Run linter
make typecheck # Run type checkerDocumentation
USAGE.md - Detailed usage instructions
CODESTYLE.md - Code style guidelines
CLAUDE.md - Claude Code instructions
Licence
This project is licensed under the MIT Licence - see the LICENSE file for details.
Available Tools
2 toolsread_documentationA
Read the full content of a specific Spark documentation page.
Args: path: The relative path to the documentation file (e.g., 'sql-ref/sql-syntax.md' or 'api/python/index.md'). This path is returned in search results.
Returns: The full markdown content of the documentation page, or an error message if the page is not found.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses that the tool reads full content and returns markdown or an error, implying a read-only operation. Adding an explicit read-only hint would improve transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with Args and Returns sections, but it is slightly verbose for a simple one-parameter tool. Each sentence adds value, so it earns a high score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description need not detail return structure. It covers the single parameter well and mentions the return type ('full markdown content'). Mentioning the sibling tool explicitly would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the input schema has 0% description coverage, the description provides excellent context for the 'path' parameter with examples ('sql-ref/sql-syntax.md') and explains its origin from search results, fully compensating for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Read' and the resource 'specific Spark documentation page', and distinguishes itself from its sibling 'search_documentation' by mentioning that the path comes from search results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that the path should be a relative path to a documentation file and that it is returned by search results, providing clear context for when to use. However, it does not explicitly state when not to use or mention alternatives beyond the implied search tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_documentationA
Search Apache Spark documentation by keyword query.
Args: query: Search terms to find in the documentation. Supports full-text search with stemming (e.g., "stream" matches "streaming", "streams"). section: Optional section to filter results. Common sections include: 'sql-ref', 'api', 'streaming', 'mllib', 'graphx', 'structured-streaming', etc. limit: Maximum number of results to return (default: 10, max: 50).
Returns: JSON-formatted search results with title, URL, snippet, and relevance score.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| section | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses full-text search with stemming, optional section filtering, default and maximum limit, and the return format with fields. This provides sufficient behavioral context for an agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: a single line for purpose, then parameter descriptions in a clear format. No wasted sentences; every line adds value. The structure is easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (3 parameters, output schema present), the description covers all necessary aspects: input parameters with examples, output format, and behavioral details like stemming and default limits. It is complete for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must compensate. It adds meaningful details: for 'query' it explains stemming, for 'section' it lists common values, for 'limit' it gives default and maximum. This fully compensates for missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it searches Apache Spark documentation by keyword query. It specifies the resource (Apache Spark documentation) and verb (search), and the sibling tool 'read_documentation' suggests a complementary action, distinguishing this tool as the search interface.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the tool's purpose but does not explicitly state when to use this tool versus alternatives like 'read_documentation'. It implies usage for searching documentation, but lacks guidance on when not to use it or when to prefer the sibling tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.2.6- Changed
read_documentation1 field changed- added
Input schema / additionalPropertiesAdded value: +false
- Changed
search_documentation1 field changed- added
Input schema / additionalPropertiesAdded value: +false
2 tool updates
v0.1.0- First observed
read_documentation - First observed
search_documentation
TDQS
Scored across 2 tools
Search and read are completely distinct operations with no overlap. Search finds relevant pages, read retrieves content, and each has clearly defined inputs.
Both tools follow the consistent verb_noun pattern (search_documentation, read_documentation) with snake_case, making the API predictable and clean.
Two tools is borderline for a minimal server, but for a documentation-specific purpose, search and read are the essential operations. It feels slightly thin but not unreasonable.
The tool surface covers core documentation workflows: discovering relevant pages and reading their content. Minor gaps like listing all sections or navigating a table of contents exist, but they are non-blocking.
Maintenance
Related MCP Connectors
Search and read Rust documentation for the standard library and any crate on crates.io
Search and read Vector Panda docs: API operations, pricing, storage tiers, measured benchmarks.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Docs Q&A: search 169 data and AI guides, fetch any page as markdown. Read-only, keyless.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.76 npm1MIT
- AlicenseAqualityDmaintenanceProvides tools to search and retrieve Google Gemini API documentation with full-text search capabilities and automatic documentation updates stored in a local SQLite database.3101MIT
- 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.-
- AlicenseAqualityAmaintenanceProvides fast, token-efficient search over coding agent documentation (e.g., Claude Code, Cursor) using local SQLite FTS5 indexing, with tools for searching snippets, reading pages, and grepping markdown.5MIT