Skip to content

Comments

Feat/mcp expand#151

Open
faltz009 wants to merge 1 commit intodevfrom
feat/mcp-expand
Open

Feat/mcp expand#151
faltz009 wants to merge 1 commit intodevfrom
feat/mcp-expand

Conversation

@faltz009
Copy link
Collaborator

@faltz009 faltz009 commented Feb 19, 2026

Pull Request Checklist

  • You have run cargo clippy and addressed any warnings

    All warnings in MCP files were fixed. Full runtime clippy run failed due to
    a stale target/ build artifact conflict in the nix develop environment —
    unrelated to these changes, which are MCP-only.

  • You have added appropriate tests (if applicable)

    All read and write operations were manually tested on testnet.

  • You have updated the documentation (if applicable)

    All new modules are fully documented. Existing modules were commented
    throughout for clarity.

  • You have reviewed your own code
  • You have updated the changelog (if applicable)

    Not applicable — changes are limited to the MCP server, no pallet or
    runtime changes.

Description

Expands the MCP server from ~10 tools to ~46 by adding 5 new modules and
extending existing ones. All write operations use wait_for_finalized_success
to correctly surface on-chain errors.

New modules:

  • staking.rs: add/remove/transfer stake, query stakes per account and agent
  • governance.rs: applications, proposals, voting, vote delegation
  • transfer.rs: token transfers to dev accounts or SS58 addresses
  • weight_control.rs: delegate and regain weight control between validators
  • queries.rs: burn amount, whitelist status, incentives ratio, pending
    emission, consensus members, global governance config

Changes to existing modules:

  • utils.rs: extended to accept both dev account names and raw SS58 addresses
  • agent.rs, balance.rs, namespace.rs, weights.rs, emission.rs,
    consensus.rs: expanded with additional query tools and inline documentation

Related Issues

  • Authentication: write operations currently only support hardcoded dev
    accounts (alice, bob, etc.). Real key management (importing keypairs,
    signing with mainnet accounts) is not yet implemented, so write tools are
    not production-ready for mainnet use.
  • Write operation refinement: error handling and input validation for write
    operations should be reviewed before broader deployment. All operations were
    tested on testnet but edge cases may exist.

…ssions

Adds 5 new modules and significantly expands existing ones, growing the
MCP server from ~10 tools to ~46. Existing modules were commented and documented throughout.

## New modules

- staking.rs: add/remove/transfer stake, query stakes per account and agent
- governance.rs: applications, proposals, voting, vote delegation
- transfer.rs: token transfers to dev accounts or SS58 addresses
- weight_control.rs: delegate and regain weight control between validators
- queries.rs: burn amount, emission config, whitelist status, incentives ratio,
  pending emission, consensus members, global governance config

## Changes to existing modules

- utils.rs: accept both dev account names and raw SS58 addresses throughout
- agent.rs, balance.rs, consensus.rs, emission.rs, namespace.rs, weights.rs:
  expanded with additional query tools, documentation, and wired into main
  tool router
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/mcp-expand

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@faltz009 faltz009 changed the base branch from main to dev February 19, 2026 18:26
@github-actions
Copy link

Code Coverage

Package Line Rate Health
pallets.permission0.src 90%
pallets.governance.src 93%
pallets.permission0.src.permission 84%
pallets.torus0.src 96%
pallets.emission0.src 92%
pallets.emission0.src.distribute 90%
pallets.permission0.src.ext 90%
Summary 92% (3522 / 3848)

@github-actions
Copy link

Detailed coverage report

Copy link
Collaborator

@saiintbrisson saiintbrisson left a comment

Choose a reason for hiding this comment

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

This MCP works for fixed accounts. Is it still the objective here to have them be hard coded?

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.

2 participants