Skip to content

Add CLAUDE.md for Claude Code guidance#204

Open
apietosi wants to merge 1 commit intoahujasid:mainfrom
apietosi:main
Open

Add CLAUDE.md for Claude Code guidance#204
apietosi wants to merge 1 commit intoahujasid:mainfrom
apietosi:main

Conversation

@apietosi
Copy link
Copy Markdown

@apietosi apietosi commented Mar 11, 2026

Summary

  • Adds a CLAUDE.md file to help Claude Code understand the project structure and conventions when working in this repository

What's included

  • Development commands (UV-based workflow, env vars)
  • Architecture overview of the two-component design (Blender addon + MCP server)
  • Key file roles and the communication flow between components
  • Guide for adding new MCP tools
  • Telemetry system overview

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Introduced comprehensive guide for Claude Code integration with BlenderMCP, covering project architecture, communication flow, development setup, key components, instructions for extending functionality with new tools, and telemetry configuration details.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add CLAUDE.md documentation for Claude Code guidance

📝 Documentation

Grey Divider

Walkthroughs

Description
• Adds comprehensive CLAUDE.md guidance document for Claude Code
• Documents project architecture with two-component design overview
• Includes development commands, environment variables, and key file roles
• Provides instructions for adding new MCP tools and telemetry system details
Diagram
flowchart LR
  A["CLAUDE.md<br/>Documentation"] --> B["Project Overview<br/>Architecture"]
  A --> C["Development<br/>Commands"]
  A --> D["MCP Tools<br/>Integration Guide"]
  A --> E["Telemetry<br/>System Details"]
  B --> F["Blender Addon<br/>+ MCP Server"]
  C --> G["UV Package Manager<br/>Environment Variables"]
Loading

Grey Divider

File Changes

1. CLAUDE.md 📝 Documentation +57/-0

Comprehensive Claude Code project guidance documentation

• New documentation file providing Claude Code guidance for the BlenderMCP project
• Documents two-component architecture: Blender addon and MCP server with TCP socket communication
• Lists development commands using UV package manager with environment variable configuration
• Describes key files, external integrations (PolyHaven, Sketchfab, Hyper3D), and telemetry system
• Includes step-by-step guide for adding new MCP tools and telemetry opt-out mechanisms

CLAUDE.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Mar 11, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. Telemetry decorator name wrong 🐞 Bug ✓ Correctness
Description
CLAUDE.md instructs developers to wrap new tools with @track_tool_execution, but the codebase
defines and uses telemetry_tool, so following the new guidance will fail (NameError/ImportError)
or result in missing telemetry.
Code

CLAUDE.md[54]

+3. Wrap with `@track_tool_execution` from `telemetry_decorator.py` for telemetry
Evidence
The new documentation explicitly recommends @track_tool_execution, but the telemetry decorator
module defines telemetry_tool(...) and the server applies @telemetry_tool("...") to tools;
track_tool_execution is not present/used.

CLAUDE.md[51-54]
src/blender_mcp/telemetry_decorator.py[16-18]
src/blender_mcp/server.py[254-256]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`CLAUDE.md` currently instructs wrapping new MCP tools with `@track_tool_execution`, but the repository implements telemetry via `telemetry_tool(...)`. This mismatch will cause contributors/agents to write code that fails to run or omits telemetry.

### Issue Context
The existing server tools use `@telemetry_tool(&quot;...&quot;)` from `src/blender_mcp/telemetry_decorator.py`.

### Fix Focus Areas
- CLAUDE.md[51-54]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

A new documentation file CLAUDE.md is added detailing Claude Code integration with BlenderMCP, covering architecture, communication flow, socket behavior, environment variables, main components, instructions for extending MCP tools, and telemetry configuration details.

Changes

Cohort / File(s) Summary
Claude Integration Documentation
CLAUDE.md
New documentation file outlining Claude Code integration with BlenderMCP, including project overview, development commands, architecture description, communication flow (Claude → MCP server → TCP socket → Blender addon), socket behavior with JSON messaging, environment variable configuration, telemetry setup, and guidance for adding new MCP tools.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • ahujasid/blender-mcp#170 — Related documentation addition for Claude Code CLI registration of the Blender MCP server.

Suggested labels

Review effort 1/5

Poem

🐰 By the Rabbit of Code

CLAUDE comes forth with wisdom new,
A Blender MCP guides the brew,
Through sockets flows the JSON song,
Where telemetry tags along,
Documentation bright and clear, ✨
Integration now is here!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a CLAUDE.md documentation file to provide guidance for Claude Code integration with the project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
CLAUDE.md (3)

35-35: Clarify timeout scope.

The "180s timeout" is accurate based on the code, but consider clarifying that this is a per-command timeout for both sending and receiving responses, not a connection timeout. This helps developers understand what happens when long-running Blender operations are invoked.

📝 Suggested clarification
-Commands are sent as JSON and responses are received in chunks (180s timeout).
+Commands are sent as JSON and responses are received in chunks (180s per-command timeout for send/receive operations).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 35, Update the CLAUDE.md description to state that the
"180s timeout" in server.py's BlenderConnection is a per-command timeout applied
to both sending the JSON command and receiving the response (send/recv calls),
not a connection-level timeout; mention that long-running Blender operations may
trigger this per-command timeout (resulting in a timeout error for that command)
while the TCP connection itself remains a singleton and persistent unless
explicitly closed.

38-39: Remove brittle file size and line count metrics.

The specific metrics "111KB" and "1,185 lines" will quickly become outdated and require manual maintenance. These numbers don't add meaningful context for understanding the codebase. Focus on the functional descriptions instead.

♻️ Proposed simplification
-- `addon.py` — Blender extension (111KB): socket server, all actual Blender operations, asset downloads, AI model generation API calls
-- `src/blender_mcp/server.py` — MCP server (1,185 lines): 22 tool definitions using FastMCP, `BlenderConnection` class, server lifecycle management
+- `addon.py` — Blender extension: socket server, all actual Blender operations, asset downloads, AI model generation API calls
+- `src/blender_mcp/server.py` — MCP server: MCP tool definitions using FastMCP, `BlenderConnection` class, server lifecycle management
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` around lines 38 - 39, Remove the brittle size/line-count
annotations from the listed file descriptions (the entries referencing
`addon.py` and `src/blender_mcp/server.py`) and keep only the functional
descriptions; for example, change "`addon.py` — Blender extension (111KB):
socket server, ...`" to "`addon.py` — Blender extension: socket server, all
actual Blender operations, asset downloads, AI model generation API calls`" and
similarly remove "(1,185 lines)" from the `src/blender_mcp/server.py` entry
while preserving its functional summary and mentions of `BlenderConnection` and
FastMCP tool definitions.

56-57: Consider clarifying the consent model.

The "two-tier consent model" is mentioned but not explained. Clarify how users grant consent and what triggers the transition between tiers. This helps developers understand the telemetry behavior when debugging or extending the system.

📝 Suggested clarification
-The telemetry system stores to Supabase. Without user consent: only tool name, success/failure, duration. With consent: prompts, code, screenshots.
+The telemetry system stores to Supabase with a two-tier consent model. Basic tier (default): only tool name, success/failure, duration. Enhanced tier (with explicit user consent): prompts, code, screenshots.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` around lines 56 - 57, Update the "Telemetry" section in CLAUDE.md
to explicitly describe the two-tier consent model: state who can grant consent
(end-user vs admin), how consent is granted (e.g., interactive prompt on first
run, a CLI flag, or setting a config/env var), what exact action transitions
telemetry from the minimal tier to the full-data tier (e.g., user accepts
consent prompt or sets BLENDER_MCP_ENABLE_TELEMETRY=true), and whether consent
is persisted (reference customer UUID storage at
~/.local/share/BlenderMCP/customer_uuid.txt) and how it can be revoked (removing
env vars or a config toggle); mention the three env vars DISABLE_TELEMETRY,
BLENDER_MCP_DISABLE_TELEMETRY, MCP_DISABLE_TELEMETRY and the precedence if
multiple are set.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Around line 22-26: Update the environment variables section in CLAUDE.md to
document all supported telemetry opt-out variables by adding
BLENDER_MCP_DISABLE_TELEMETRY and MCP_DISABLE_TELEMETRY alongside
DISABLE_TELEMETRY, and clarify that any one of these three (DISABLE_TELEMETRY,
BLENDER_MCP_DISABLE_TELEMETRY, MCP_DISABLE_TELEMETRY) will disable telemetry;
modify the block that currently shows DISABLE_TELEMETRY to list the three
variables and a brief note like "Telemetry opt-out (any of these work)" so
readers can find all supported options.

---

Nitpick comments:
In `@CLAUDE.md`:
- Line 35: Update the CLAUDE.md description to state that the "180s timeout" in
server.py's BlenderConnection is a per-command timeout applied to both sending
the JSON command and receiving the response (send/recv calls), not a
connection-level timeout; mention that long-running Blender operations may
trigger this per-command timeout (resulting in a timeout error for that command)
while the TCP connection itself remains a singleton and persistent unless
explicitly closed.
- Around line 38-39: Remove the brittle size/line-count annotations from the
listed file descriptions (the entries referencing `addon.py` and
`src/blender_mcp/server.py`) and keep only the functional descriptions; for
example, change "`addon.py` — Blender extension (111KB): socket server, ...`" to
"`addon.py` — Blender extension: socket server, all actual Blender operations,
asset downloads, AI model generation API calls`" and similarly remove "(1,185
lines)" from the `src/blender_mcp/server.py` entry while preserving its
functional summary and mentions of `BlenderConnection` and FastMCP tool
definitions.
- Around line 56-57: Update the "Telemetry" section in CLAUDE.md to explicitly
describe the two-tier consent model: state who can grant consent (end-user vs
admin), how consent is granted (e.g., interactive prompt on first run, a CLI
flag, or setting a config/env var), what exact action transitions telemetry from
the minimal tier to the full-data tier (e.g., user accepts consent prompt or
sets BLENDER_MCP_ENABLE_TELEMETRY=true), and whether consent is persisted
(reference customer UUID storage at ~/.local/share/BlenderMCP/customer_uuid.txt)
and how it can be revoked (removing env vars or a config toggle); mention the
three env vars DISABLE_TELEMETRY, BLENDER_MCP_DISABLE_TELEMETRY,
MCP_DISABLE_TELEMETRY and the precedence if multiple are set.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b82d9bd8-00c2-452c-ab9c-3f1297327bd8

📥 Commits

Reviewing files that changed from the base of the PR and between 7636d13 and 9cc59ad.

📒 Files selected for processing (1)
  • CLAUDE.md

Comment thread CLAUDE.md
Comment on lines +22 to +26
```bash
BLENDER_HOST=localhost # default
BLENDER_PORT=9876 # default
DISABLE_TELEMETRY=true # opt-out of telemetry
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Document all telemetry disable environment variables.

Line 25 only mentions DISABLE_TELEMETRY, but line 57 (and the telemetry code) support three variants: DISABLE_TELEMETRY, BLENDER_MCP_DISABLE_TELEMETRY, and MCP_DISABLE_TELEMETRY. For completeness, document all three options in the environment variables section.

📝 Suggested addition
 Environment variables:
 ```bash
 BLENDER_HOST=localhost  # default
 BLENDER_PORT=9876       # default
-DISABLE_TELEMETRY=true  # opt-out of telemetry
+# Telemetry opt-out (any of these work):
+DISABLE_TELEMETRY=true
+BLENDER_MCP_DISABLE_TELEMETRY=true
+MCP_DISABLE_TELEMETRY=true
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` around lines 22 - 26, Update the environment variables section in
CLAUDE.md to document all supported telemetry opt-out variables by adding
BLENDER_MCP_DISABLE_TELEMETRY and MCP_DISABLE_TELEMETRY alongside
DISABLE_TELEMETRY, and clarify that any one of these three (DISABLE_TELEMETRY,
BLENDER_MCP_DISABLE_TELEMETRY, MCP_DISABLE_TELEMETRY) will disable telemetry;
modify the block that currently shows DISABLE_TELEMETRY to list the three
variables and a brief note like "Telemetry opt-out (any of these work)" so
readers can find all supported options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant