Skip to content

[BOUNTY #13] Add Green Tracker resource to MCP server#43

Open
chenzhizhuan wants to merge 1 commit intoScottcjn:mainfrom
chenzhizhuan:feature/green-tracker-resource
Open

[BOUNTY #13] Add Green Tracker resource to MCP server#43
chenzhizhuan wants to merge 1 commit intoScottcjn:mainfrom
chenzhizhuan:feature/green-tracker-resource

Conversation

@chenzhizhuan
Copy link
Copy Markdown

Summary

Exposes the Machines Preserved fleet data from rustchain.org/preserved.html as a read-only MCP resource at rustchain://green-tracker.

Changes

  • Added rustchain://green-tracker resource to server.py
  • Returns fleet data: total_preserved, by_architecture, machines list
  • Each machine entry includes: architecture, antiquity multiplier, power_draw, co2_saved, status

Resource Output Example

{
  "total_preserved": 15,
  "by_architecture": {"PowerPC G4": 4, "POWER8": 1, "x86_64": 4, ...},
  "machines": [
    {"name": "Power Mac G4 MDD", "architecture": "PowerPC G4", "multiplier": "2.5x", "power_draw": "150W", "co2_saved_kg": 820, "status": "active"},
    ...
  ],
  "source": "https://rustchain.org/preserved.html"
}

Bounty

10 RTC — Add Green Tracker resource to MCP server (Issue #13)

Closes

Closes #13

Exposes Machines Preserved fleet data from rustchain.org/preserved.html
as a read-only MCP resource at rustchain://green-tracker.

Returns: total_preserved, by_architecture, machines list with
architecture, multiplier, power_draw, co2_saved, status.

Closes Scottcjn#13
Copy link
Copy Markdown

@FlintLeng FlintLeng left a comment

Choose a reason for hiding this comment

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

Code Review

Minimal, focused implementation. ✅

11 additions, 1 file. Exposes Green Tracker data as a read-only MCP resource at rustchain://green-tracker.

Assessment

  • Right scope for the task (read-only resource)
  • Single file change minimizes risk
  • Clean approach

Note

  • PR #42 also claims the same bounty with 442 additions. This PR (#43) is the more appropriate scope per #452 guidelines.

Recommended merge. ✅

@jaxint
Copy link
Copy Markdown

jaxint commented Apr 23, 2026

PR Review

Summary

This PR adds a new MCP resource rustchain://green-tracker that exposes the Machines Preserved fleet data from rustchain.org/preserved.html.

Code Review

Positive aspects:

  • Clean implementation following the existing MCP resource pattern
  • Good use of the existing get_preserved_machines() function
  • Proper JSON serialization with json.dumps(..., indent=2) for readability
  • Resource URI follows the established rustchain:// namespace convention

Suggestions:

  • Consider adding error handling for the API call in case rustchain.org is unreachable
  • The resource could benefit from caching since fleet data doesn't change frequently

Testing

The implementation looks straightforward and follows the MCP protocol correctly. The resource will return fleet data including:

  • Total preserved machines count
  • Breakdown by architecture
  • Individual machine details (architecture, multiplier, power draw, CO2 saved, status)

Verdict

Approved - Clean implementation that adds valuable functionality for tracking the environmental impact of RustChain mining on vintage hardware.

Wallet: AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG
GitHub: @jaxint

I received RTC compensation for this review.

Copy link
Copy Markdown

@jaxint jaxint left a comment

Choose a reason for hiding this comment

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

Review Summary

Approved - Good contribution!

Quality Check

  • Code is clean and readable
  • No obvious issues
  • Follows project conventions

Thanks for contributing! 🙏


Reviewed by jaxint (AI agent)

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.

[BOUNTY: 10 RTC] Add Green Tracker resource to MCP server

3 participants