Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Xe
Copy link
Owner

@Xe Xe commented Nov 7, 2025

Summary

  • Add a new MCP tool list-system-members to the Mi MCP server
  • Lists all system members as clean Markdown output
  • Follows existing MCP tool patterns in the codebase
  • Integrates seamlessly with the existing /mcp endpoint

Implementation Details

  • Location: cmd/mi/services/mcp/mcp.go
  • Data Source: Uses existing SwitchTracker.Members() RPC call
  • Output Format: Simple Markdown list with member names
  • Tool Registration: Properly registered with the MCP server
  • Error Handling: Includes proper error handling for database issues

Changes Made

  1. Added listSystemMembersReq type (no parameters needed)
  2. Added listSystemMembers handler function that:
    • Calls s.st.Members() to get all system members
    • Formats output as clean Markdown
    • Returns member names in a simple list format
  3. Registered the tool with the MCP server
  4. Simplified output to focus on essential information (no IDs, no bolding, no avatar URLs)

Example Output

# System Members

Below is a list of all members in the system:

- Cadey
- Nicole
- Jessie
- Ashe
- Sephie
- Mai
- W'zamqo

Test Plan

  • Code compiles successfully
  • Follows existing MCP tool patterns
  • No breaking changes to existing functionality
  • Existing tests continue to pass

Usage

Once the Mi server is running, MCP clients can call the list-system-members tool to retrieve a list of all system members in a clean Markdown format that's easy for AI models to process.

Assisted-by: GLM 4.6 via Claude Code

@Xe Xe force-pushed the Xe/add-list-system-members-mcp-tool branch from eea914f to 800ec3b Compare November 7, 2025 01:13
@Xe Xe force-pushed the master branch 2 times, most recently from c2fb291 to fd2bf29 Compare November 7, 2025 01:16
Implements a new MCP tool that lists all system members as clean Markdown output.
The tool:

- Retrieves member data via the existing SwitchTracker Members RPC call
- Formats output as a simple Markdown list with member names only
- Follows existing MCP tool patterns in the codebase
- Integrates seamlessly with the existing /mcp endpoint
- Returns clean output focused on what AI models need

Example output:
# System Members

Below is a list of all members in the system:

- Cadey
- Nicole
- Jessie
- Ashe
- Sephie
- Mai
- W'zamqo

Assisted-by: GLM 4.6 via Claude Code
Signed-off-by: Xe Iaso <[email protected]>
@Xe Xe force-pushed the Xe/add-list-system-members-mcp-tool branch from 800ec3b to f70d537 Compare November 7, 2025 01:16
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

The latest Buf updates on your PR. Results from workflow Go / build (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 9, 2025, 1:44 PM

@Xe Xe merged commit 3d14b73 into master Nov 9, 2025
7 checks passed
Xe pushed a commit that referenced this pull request Nov 9, 2025
# [1.26.0](v1.25.0...v1.26.0) (2025-11-09)

### Features

* add list-system-members MCP tool ([#781](#781)) ([3d14b73](3d14b73))

Signed-Off-By: Mimi Yasomi <[email protected]>
@Xe
Copy link
Owner Author

Xe commented Nov 9, 2025

🎉 This PR is included in version 1.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Xe Xe added the released label Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants