Skip to content

Improve CLAUDE.md with ports, domains, transport modes, and resources clarification#916

Open
apietosi wants to merge 1 commit intoCoplayDev:betafrom
apietosi:beta
Open

Improve CLAUDE.md with ports, domains, transport modes, and resources clarification#916
apietosi wants to merge 1 commit intoCoplayDev:betafrom
apietosi:beta

Conversation

@apietosi
Copy link

@apietosi apietosi commented Mar 11, 2026

Summary

  • Documents default network ports (Unity: 6400, MCP server: 6500) in the architecture diagram
  • Lists all three transport modes (stdio/SSE/HTTP) with usage context and notes Docker deployment
  • Expands directory structure to include CustomTools/, unity-mcp-skill/, docker-compose.yml, models/, utils/, and services/resources/
  • Explicitly lists all 20 tool domains so contributors know which file to edit
  • Clarifies that MCP Resources are distinct from Tools (read-only, separate from tool calls) and points to services/resources/ with concrete examples
  • Explains why PRs target beta (active dev branch) rather than main (stable releases)

🤖 Generated with Claude Code

Summary by Sourcery

Clarify CLAUDE.md documentation for Unity MCP architecture, transports, structure, and contribution workflow.

New Features:

  • Document default MCP and Unity ports and how they appear in the architecture diagram.
  • Describe all supported MCP transport modes with guidance for local vs remote/Docker deployments.
  • List the 20 Unity MCP tool domains to guide where new tools should be added.

Enhancements:

  • Expand and refine the documented server and repo directory structure to include services/resources, models, utils, CustomTools, unity-mcp-skill, and Docker compose configuration.
  • Clarify the distinction between MCP tools and read-only MCP resources and point to concrete implementation locations and examples.
  • Explain the rationale for targeting the beta branch for pull requests instead of main in contribution guidelines.

Documentation:

  • Improve CLAUDE.md to better describe architecture, networking, transports, directory layout, tool domains, MCP resources, and branching strategy for contributors.

Summary by CodeRabbit

  • Documentation
    • Updated developer documentation to reflect expanded architecture and tooling landscape.
    • Clarified transport protocols and port configurations for development environments.
    • Enhanced resource definitions and implementation guidance.
    • Refined terminology and structure across documentation sections for consistency.

… clarification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 11, 2026

Reviewer's Guide

Updates CLAUDE.md to more precisely document the Unity MCP architecture, including network ports, transport modes, directory layout, tool domains, resource usage, and branching strategy for PRs.

Flow diagram for contributor PR branching strategy

flowchart TD
    Start[Start new contribution] --> CheckBranch{Which branch to base from?}

    CheckBranch -->|main| MainDiscouraged[main is stable release branch
Do not base PRs from main]
    CheckBranch -->|beta| BetaPreferred[beta is active development branch
Base all PRs from beta]

    MainDiscouraged --> ChooseBeta[Switch to beta]
    ChooseBeta --> BetaPreferred

    BetaPreferred --> ImplementChanges[Implement changes
and add tests]
    ImplementChanges --> OpenPR[Open PR targeting beta]
Loading

File-Level Changes

Change Details Files
Document transport modes, ports, and deployment details in the architecture overview.
  • Expand MCP protocol description from stdio/SSE to stdio/SSE/HTTP in the architecture diagram
  • Annotate Python MCP server and Unity Editor plugin with their default ports (6500 and 6400)
  • Add a transport modes section describing stdio, SSE, HTTP, their usage contexts, and Docker HTTP deployment on port 8080
CLAUDE.md
Clarify and expand the documented project directory structure.
  • Extend Server/src layout to include services/resources, models, and utils with short descriptions
  • Document new top-level directories CustomTools/ and unity-mcp-skill/ and their roles
  • Note docker-compose.yml as the HTTP-mode server entrypoint and keep existing Unity and tools structure descriptions up to date
CLAUDE.md
Make MCP tools, domains, and resources easier for contributors to navigate.
  • Add an explicit list of the 20 tool domains and map them between Python commands and Unity tools
  • Clarify that MCP Resources are read-only, distinct from tools, and exposed via a separate mechanism
  • Point contributors to Server/src/services/resources/ with example resource implementations and guidance on adding new ones
CLAUDE.md
Explain the branching and PR strategy for main vs beta.
  • Update contribution guidance to state that main is the stable release branch
  • Specify that all PRs should branch off beta, the active development branch
CLAUDE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

CLAUDE.md receives comprehensive documentation updates clarifying transport protocols, directory structure, port configurations for MCP integration, resource handling, and code philosophy. Changes include transport details for HTTP alongside existing protocols, expanded architecture documentation, and explicit domain-to-tool mappings.

Changes

Cohort / File(s) Summary
Documentation Enhancement
CLAUDE.md
Transport/port details updated (MCP Protocol with HTTP, Python Server port 6500, Unity port 6400); directory structure expanded with Server/src and Editor subsections; resources and domains clarified with 20 tool domain mappings; Code Philosophy and Key Patterns sections refined with explicit guidance on resource handling and parameter patterns.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 Through CLAUDE's pages, new clarity hops,
Transport and ports now reach greater heights,
With resources mapped and domains aligned,
The documentation now shines so bright!
A rabbit's delight—structure takes flight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: documentation improvements to CLAUDE.md covering ports, domains, transport modes, and resources clarification.
Description check ✅ Passed The description provides comprehensive details on all documentation changes, clearly organized by topic. However, it lacks explicit sections matching the repository's template structure (Type of Change, Testing, Documentation Updates, Related Issues).
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
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since port numbers and transport modes are now documented explicitly in CLAUDE.md, consider centralizing these values in a single config or constants file and referencing that in the docs to avoid drift if defaults change.
  • The hard-coded list of 20 tool domains in the docs could easily get out of sync with the codebase; consider generating this list from the command modules or adding a simple check to ensure any new domain updates this section.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since port numbers and transport modes are now documented explicitly in CLAUDE.md, consider centralizing these values in a single config or constants file and referencing that in the docs to avoid drift if defaults change.
- The hard-coded list of 20 tool domains in the docs could easily get out of sync with the codebase; consider generating this list from the command modules or adding a simple check to ensure any new domain updates this section.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@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

🤖 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`:
- Line 12: Update the incorrect port in the documentation: replace the "MCP port
6500" mention for the Python Server entry in CLAUDE.md with the HTTP port 8080
so it matches the Docker exposes and the Server/src/main.py default http_port
(http_port default at main.py:853); ensure any other references in CLAUDE.md to
the server port are consistent with 8080.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0e52d6ac-c43c-41ca-aa89-b1f8a95af455

📥 Commits

Reviewing files that changed from the base of the PR and between cab7496 and ad6a0f2.

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

↓ MCP Protocol (stdio/SSE)
Python Server (Server/src/)
↓ MCP Protocol (stdio / SSE / HTTP)
Python Server (Server/src/) [MCP port 6500]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the documented server port here.

Line 12 says the Python server uses MCP port 6500, but the repo currently documents and implements HTTP on 8080 instead: CLAUDE.md Lines 26 and 50 both say Docker exposes 8080, and Server/src/main.py:853 defaults http_port to 8080. As written, this will send contributors to the wrong port when they follow the architecture diagram.

📝 Proposed doc fix
-Python Server (Server/src/)   [MCP port 6500]
+Python Server (Server/src/)   [HTTP port 8080 by default]
📝 Committable suggestion

‼️ 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.

Suggested change
Python Server (Server/src/) [MCP port 6500]
Python Server (Server/src/) [HTTP port 8080 by default]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 12, Update the incorrect port in the documentation:
replace the "MCP port 6500" mention for the Python Server entry in CLAUDE.md
with the HTTP port 8080 so it matches the Docker exposes and the
Server/src/main.py default http_port (http_port default at main.py:853); ensure
any other references in CLAUDE.md to the server port are consistent with 8080.

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