Skip to main content
Glama
MCP Spark Documentation Server

MCP Spark Documentation Server

by martoc

License: MIT Python 3.12 MCP

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: anydocs

Quick Start

# Build the Docker image (includes pre-indexed documentation)
make docker-build

# Test the server
make docker-run

Using uv (Local Development)

# Initialise the environment
make init

# Build the documentation index
make index

# Run the server
make run

Configuration

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_documentation

Search Spark documentation by keyword query with optional section filtering

read_documentation

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

query

string

Yes

-

Search terms (supports stemming)

section

string

No

None

Filter by section (e.g., sql-ref, streaming, mllib)

limit

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

path

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 stats

Development

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 checker

Documentation

Licence

This project is licensed under the MIT Licence - see the LICENSE file for details.

Available Tools

2 tools
read_documentationA

Read the full content of a specific Spark documentation page.

Inputs: path (required). Returns: result

search_documentationC

Search Apache Spark documentation by keyword query.

Inputs: query (required), limit, section. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 2 tools

    Disambiguation5/5

    search_documentation and read_documentation have clearly complementary, non-overlapping purposes: one finds pages, the other fetches a specific page's content. An agent can trivially pick the right one based on whether it has a page identifier or only a query.

    Naming Consistency5/5

    Both tools follow the same snake_case verb_noun pattern (search_documentation, read_documentation), with consistent verb style and a shared noun suffix.

    Tool Count4/5

    Two tools is a tight, purposeful surface for a documentation-lookup server, with no redundancy. It is slightly thin — discovery aids like listing pages or versions are absent — but nothing feels gratuitous.

    Completeness4/5

    Search-then-read covers the core documentation workflow end to end, with no dead ends for locating and consuming content. Minor gaps exist around browsing structure (listing available pages, versions, or sections), which the search tool partially compensates for.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Provides 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.
      5
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to run incremental SQLite FTS5 full-text search over explicitly configured local workspace roots, covering Markdown, code, PDF, DOCX, XLSX, CSV and HTML with BM25 ranking, Chinese bigrams, and phrase, prefix, path, type and date filters. Exposes search, safe root-confined reads with line/page/sheet locations, recent-file listing, and reindexing as MCP tools so assistants can locate and quote source content without network or account access.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to search a local folder of Markdown, AsciiDoc, and text files through a SQLite FTS5 keyword index, returning the most relevant sections with file paths, line ranges, and heading breadcrumbs instead of grepping through a repo. It also exposes tools to list indexed documents and refresh the index incrementally, all offline with no dependencies, network calls, or embeddings.
      3
      MIT