local-spark-mcp: Instructions file for Claude Code

CLAUDE.md

local-spark-mcp CLAUDE.md is an instructions file for Claude Code from methodify/local-spark-mcp. It costs 13,564 tokens per session, scanned B, original, Apache-2.0.

Project instructions for working on the methodify/local-spark-mcp codebase, including its commands and testing approach.

In plain words
What is it for?
Use it when changing that Scala file or running the project’s configuration, formatter, and token-server tests.
Why use it?
It explains which quick tests to run when httptokenprovider.scala changes, without requiring the full Spark system.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is methodify/local-spark-mcp's own configuration. It tells Claude Code how to work on local-spark-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything local-spark-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to methodify/local-spark-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/methodify/local-spark-mcp/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/methodify/local-spark-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-spark-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/methodify/local-spark-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/methodify/local-spark-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/methodify/local-spark-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/methodify/local-spark-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for local-spark-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/methodify/local-spark-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/methodify/local-spark-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13,564 This file is loaded in full into every session.
When invoked 13,564 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.13564 $0.13564
Opus 5.5 $0.05426 $0.05426
Sonnet 5.5 $0.02713 $0.02713
Haiku 4.5 $0.01356 $0.01356

Measured 1mo ago against content hash c7ea8387cfb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

local-spark-mcp CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

one-time sudo command is reported and the session continues;

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **The worker must not inherit the server's stdin** (`stdin=subprocess.DEVNULL`
CLAUDE.md · 732 lines

How it starts

The opening of the file, as written. The whole thing — 732 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

local-spark-mcp is an MCP server that gives an agent a stateful local Spark session to work in — a Jupyter-notebook-shaped surface with the notebook UI stripped away. The agent runs arbitrary PySpark against a long-lived Python process (state persists across calls, like notebook cells sharing a kernel), runs SQL and gets rows back, and manages/resets the runtime through tools.

The point is local exploration in service of authoring PySpark notebooks that will eventually run on Microsoft Fabric. The agent figures things out locally (no cloud compute burned), then hands the honed code to the user as a notebook they can run on Fabric with a reasonably similar outcome. So fidelity to the Fabric runtime matters: local Spark should read the same OneLake Delta data and behave close enough that conclusions transfer.

Status: Milestones A, B.1, B.2 complete — the core vision is functional. The MCP server holds a stateful Spark session in a worker subprocess and exposes run_code / run_sql / session_info / reset_runtime plus the Fabric tools list_lakehouses / list_tables / mount_table / mount_lakehouse. When a [workspace] is configured it starts the loopback token endpoint, a Fabric-enabled Spark session, and REST discovery; lakehouses register as Spark databases and their tables mount lazily. Validated live end to end against a real workspace: discovery (8 lakehouses, 63 tables), mount, and an abfss:// Delta read/query (1.4M rows) through the full stack.

0.3.0: runtime profiles — local-spark-mcp[fabric-1.3] and local-spark-mcp[fabric-2.0] extras (Spark 3.5 / Delta 3.2 vs Spark 4.1 / Delta 4.2), one bundled jar per Scala line, profile-aware Java and hadoop-azure, LOCAL_SPARK_PROFILE validation. Under fabric-2.0, deletion-vector tables get the full sandbox.

REQUEST-001 (notebook parity, from ~/src/claude-fabric) shipped as 0.2.x, validated live on Linux and Windows: OneLakeCatalog (tables resolve by name on first touch, no mount step), default lakehouse, the write policy (sandbox / readonly / writethrough, shadows via Delta shallow clone), run_notebook + the notebookutils/mssparkutils shim, and the Files mirror behind /lakehouse/default/Files (files.py). Ask 5 (PyPI) is deferred by the user; the project is Apache-2.0 (LICENSE + NOTICE, shipped in 0.2.1). The response lives at ~/src/claude-fabric/tmp/exchange/local-spark-mcp/RESPONSE-001-notebook-parity.md.

Read the full file on GitHub · 732 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +9 lines · +225 tokens per session c7ea8387cfb2
  2. 1mo ago Changed · +171 lines · +3,469 tokens per session a266ed45a2fc
  3. 1mo ago Changed · +22 lines · +412 tokens per session 29f26378d030
  4. 2mo ago Changed · +8 lines · +145 tokens per session 2d8b2e8e595e
  5. 2mo ago Changed · +44 lines · +879 tokens per session 3bda23eb4695
  6. 2mo ago Changed · +41 lines · +1,032 tokens per session 90af7587f8b8
  7. 2mo ago Changed · +30 lines · +596 tokens per session 56072fc3a1c2
  8. 2mo ago Changed · +142 lines · +2,748 tokens per session scan A → B 2cd1812600ef
  9. 2mo ago First seen · 265 lines · 4,058 tokens per session scan A e91c80b196b0

Subscribe to this mod's changes

local-spark-mcp CLAUDE.md is an instructions file published in the GitHub repository methodify/local-spark-mcp (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 13,564 tokens to every session, about $0.0543 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

local-spark-mcp CLAUDE.md compared with instructions from other repositories

local-spark-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
local-spark-mcp CLAUDE.mdmethodify/local-spark-mcpInstructions file01mo agoApache-2.0B13,564Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file283ktodayMITA4,342Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot