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.
curl -O https://raw.githubusercontent.com/methodify/local-spark-mcp/master/CLAUDE.mdgit clone --depth 1 https://github.com/methodify/local-spark-mcpWrote 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.
[](https://agentmods.dev/instructions/methodify/local-spark-mcp/claude-md)<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.
<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>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.
| Model | Per session | Once 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 |
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` 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.
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.
- 1mo ago Changed · +9 lines · +225 tokens per session c7ea8387cfb2
- 1mo ago Changed · +171 lines · +3,469 tokens per session a266ed45a2fc
- 1mo ago Changed · +22 lines · +412 tokens per session 29f26378d030
- 2mo ago Changed · +8 lines · +145 tokens per session 2d8b2e8e595e
- 2mo ago Changed · +44 lines · +879 tokens per session 3bda23eb4695
- 2mo ago Changed · +41 lines · +1,032 tokens per session 90af7587f8b8
- 2mo ago Changed · +30 lines · +596 tokens per session 56072fc3a1c2
- 2mo ago Changed · +142 lines · +2,748 tokens per session scan A → B 2cd1812600ef
- 2mo ago First seen · 265 lines · 4,058 tokens per session scan A e91c80b196b0
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.
local-spark-mcp CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| local-spark-mcp CLAUDE.mdmethodify/local-spark-mcp | Instructions file | 0 | 1mo ago | Apache-2.0 | B | 13,564 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 8,130 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,680 | Codex, OpenCode |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 283k | today | MIT | A | 4,342 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,153 | GitHub Copilot |