internet2/grouper/grouper-mcp-edit
Claude Code and agent skill by internet2/grouper
- community
Checking that the SKILL.md file is still in the repository.
Guide for creating, editing, and maintaining Grouper MCP (Model Context Protocol) tools and their associated tests, servlet registration, configuration, and wiki documentation. Use this skill whenever working on MCP tools in the Grouper codebase - including creating new tools, modifying existing ones, adding tests, registering tools in the servlet, adding configuration properties, or updating the MCP wiki documentation HTML files. Trigger on any mention of MCP tools, MCP servlet, MCP tests, or…
Install
npx vskill@latest install internet2/grouper/grouper-mcp-editSKILL.md
Grouper MCP Tool Development Guide
This skill walks you through the complete workflow for creating or modifying an MCP tool in the Grouper codebase. Every MCP tool touches several files in a predictable pattern. Follow these steps in order so nothing gets missed.
File Locations
All MCP source files live under a single package:
- Tool classes:
grouper-ws/grouper-ws/src/grouper-ws/edu/internet2/middleware/grouper/ws/mcp/ - Test classes:
grouper-ws/grouper-ws/src/test/edu/internet2/middleware/grouper/ws/mcp/ - Configuration:
grouper/conf/grouper.base.properties(search for# MCPsection) - Wiki docs:
grouper/temp/mcpDocs/(HTML files)
Code Documentation Standards
Good javadoc and inline comments are important in this codebase. Every tool class should have:
- Class-level javadoc: Describe what the tool does, how it works at a high level, any security
considerations (e.g., which privileges are required), and @author tag.
- Method-level javadoc: Every public/package method needs javadoc with
@paramand@returntags.
Private helper methods should have at least a one-line javadoc comment.
- Inline comments: Add comments for non-obvious logic — security checks, why a particular API
is used, what each group of WS parameters means (especially when passing many nulls to a service method). Use inline comments on complex parameter lists to label what each argument is for.
Look at the existing tool classes (e.g., GrouperMcpAddMember.java, GrouperMcpFindGroups.java) for the expected level of documentation.
Step 1: Create the Tool Class
Create GrouperMcp[ToolName].java in the MCP package. Tools are plain Java classes with no inheritance - just two required static methods.
Required Structure
toolDefinition() Method
Build a Jackson ObjectNode describing the tool for the MCP protocol:
execute() Method
The execute method receives parsed JSON arguments and the authenticated user. It should:
- Parse and validate arguments from the JsonNode
- For readwrite tools: check protected resources and OAuth scope
- Delegate to existing Grouper service logic (typically
GrouperServiceLogic.*) - Return results via
buildSuccessResult()orbuildErrorResult()
Argument Parsing Pattern
Always handle null/missing arguments defensively:
Readwrite Tool Security Checks
Readwrite tools must check two things before proceeding:
For subjects, use authUser.isSubjectInReadwriteScope(subjectValue). For stems, use GrouperMcpProtectedResources.isProtectedStemName() and authUser.isStemInReadwriteScope().
Result Format
The MCP protocol expects this exact JSON structure:
Error Handling in execute()
Wrap the main logic in try/catch. Return errors as result objects, never throw:
Step 2: Register in GrouperMcpServlet
Registration requires changes in two methods of GrouperMcpServlet.java:
2a. handleToolsList()
Add the tool definition to the appropriate access-level block. Tools are organized alphabetically within each block:
2b. dispatchToolCall()
Add a case to the switch statement. Match the access check to the tool's category. Cases are organized alphabetically within each access-level section:
2c. GrouperMcpToolLog.getToolCategory()
Add the tool name to the getToolCategory() switch statement in grouper/src/grouper/edu/internet2/middleware/grouper/mcp/GrouperMcpToolLog.java. This maps the tool name to its category for audit logging and rate limiting. Add the case alphabetically within the correct category block:
If you skip this step, the tool will default to CATEGORY_READONLY, which means readwrite tools will have incorrect throttle limits in the audit log.
Step 3: Write the Unit Test
Create GrouperMcp[ToolName]Test.java in the test MCP package.
Test Class Structure
Test Method Pattern
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggrouper-misc/grouper-docs/skills/grouper-mcp-edit/SKILL.md
Popularity
- Repository stars
- 102
- Repository forks
- 82
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/internet2/grouper/grouper-mcp-edit)