Skip to main content
Glama
Grouper MCP Server

Grouper MCP Server

by Unicon

Grouper MCP Server

A Model Context Protocol (MCP) server that provides tools for interacting with Internet2's Grouper identity management system via web services.

Features

This MCP server provides 22 core tools for essential Grouper operations, organized into six main categories:

  • Group Management (8 tools) - Search, create, retrieve, update, and delete groups (including composite groups with UNION, INTERSECTION, and COMPLEMENT operations)

  • Stem/Folder Management (3 tools) - Search and browse organizational hierarchy

  • Member Management (4 tools) - Add, remove, list group members, and trace membership paths

  • Privilege Management (2 tools) - Grant, revoke, and query privileges on groups and stems

  • Attribute Management (1 tool) - Assign attributes to groups

  • Subject Management (4 tools) - Search for and retrieve information about subjects and their group memberships

For detailed documentation of all available tools, parameters, and usage examples, see TOOLS.md.

This implementation covers the essential group lifecycle and membership management operations that handle most common use cases. Many additional Grouper web service endpoints are not yet implemented but are planned - see the TODO.md for the complete list of planned features.

Related MCP server: groupsio-mcp-server

Configuration

The server supports configuration via environment variables or properties files. Key environment variables:

  • GROUPER_BASE_URL (required): Full URL to Grouper web services endpoint

  • GROUPER_USERNAME (required): Grouper authentication username

  • GROUPER_PASSWORD (required): Grouper authentication password

  • READ_ONLY: Enable read-only mode ("true" or "false")

  • GROUPER_DEBUG: Enable detailed debug logging ("true" or "false")

  • NODE_TLS_REJECT_UNAUTHORIZED: Set to "0" for self-signed certificates (development only)

For complete configuration details including properties files, read-only mode, logging, TLS/SSL, and act-as configuration, see Configuration Guide.

Installation

Standard stdio MCP Server

For use with Claude Desktop or other MCP clients that support stdio:

# Clone this repository
git clone <repository-url>
cd grouper-mcp

# Build the Docker image
docker build -t grouper-mcp:latest .

HTTP-Enabled Server (with MCPO)

For HTTP/SSE access (Open WebUI, web-based AI agents, etc.):

# Clone this repository
git clone <repository-url>
cd grouper-mcp

# Build the HTTP-enabled Docker image
docker build -f Dockerfile.http -t grouper-mcp:http .

This image includes both the MCP server and MCPO proxy, providing instant HTTP access without additional setup.

Option 2: Local Installation

For development or custom deployments:

  1. Clone this repository

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Usage

Local Development

Run in development mode with:

npm run dev

Local Production

Build and run:

npm run build
npm start

With Claude Desktop

Once you've built the Docker image (see Installation above), Claude Desktop will automatically launch the container when needed. Simply add this configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "grouper": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "GROUPER_BASE_URL=https://your-grouper-instance.edu/grouper-ws/servicesRest/json/v4_0_000",
        "-e", "GROUPER_USERNAME=your_username",
        "-e", "GROUPER_PASSWORD=your_password",
        "grouper-mcp:latest"
      ]
    }
  }
}

For detailed setup instructions including configuration file locations, local installation, troubleshooting, and more, see Claude Desktop Setup Guide.

With Open WebUI

Open WebUI (v0.6.31+) supports MCP servers via HTTP/SSE using MCPO as a proxy.

Quick Start:

  1. Build and run the HTTP-enabled Docker image as a persistent service:

    docker build -f Dockerfile.http -t grouper-mcp:http .
    # Start the HTTP server (runs continuously - Open WebUI connects to this endpoint)
    docker run -p 8000:8000 \
      -e GROUPER_BASE_URL="https://your-grouper-instance.edu/grouper-ws/servicesRest/json/v4_0_000" \
      -e GROUPER_USERNAME="your_username" \
      -e GROUPER_PASSWORD="your_password" \
      -e MCPO_API_KEY="your-secret-key" \
      grouper-mcp:http
  2. In Open WebUI:

    • Navigate to ⚙️ Admin Settings → External Tools

    • Click + (Add Server)

    • Select MCP (Streamable HTTP)

    • Server URL: http://localhost:8000

    • API Key: your-secret-key

  3. Start chatting and Grouper tools will be available automatically!

For complete setup instructions, MCPO installation options, production deployment, and troubleshooting, see Open WebUI Setup Guide.

HTTP/SSE Access with MCPO

MCPO (MCP-to-OpenAPI Proxy) converts the MCP server to HTTP/SSE, enabling RESTful API access with auto-generated documentation.

Quick Start:

# Build and run the all-in-one HTTP image as a persistent service
docker build -f Dockerfile.http -t grouper-mcp:http .
# Start the HTTP server (runs continuously - clients connect to this endpoint)
docker run -p 8000:8000 \
  -e GROUPER_BASE_URL="https://your-grouper-instance.edu/grouper-ws/servicesRest/json/v4_0_000" \
  -e GROUPER_USERNAME="your_username" \
  -e GROUPER_PASSWORD="your_password" \
  -e MCPO_API_KEY="your-secret-key" \
  grouper-mcp:http

# Access the API (once the server is running)
# - Interactive docs: http://localhost:8000/docs
# - OpenAPI schema: http://localhost:8000/openapi.json

Example API Call:

curl -X POST http://localhost:8000/grouper_find_groups_by_name_approximate \
  -H "Authorization: Bearer your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{"searchTerm": "engineering"}'

For complete HTTP setup including separate MCPO installation, production deployment with reverse proxy, advanced configuration, and troubleshooting, see HTTP/MCPO Setup Guide.

Examples

Create a new group

Create a group named "edu:department:engineering:students" with display name "Engineering Students"

Add members to a group

Add user "jdoe" to the group "edu:department:engineering:students"

Search for groups

Find all groups containing "engineering" in their name

Get group by UUID

Get details for group with UUID "12345678-1234-1234-1234-123456789abc"

Create a composite group

Create a composite UNION group named "edu:department:all-staff" using left group "edu:department:faculty" and right group "edu:department:staff"

Assign attributes

Assign attribute "classification" with value "academic" to group "edu:department:engineering:students"

Get subject details

Get detailed information for subject with ID "jdoe123"

Search subjects

Search for subjects containing "Smith" in their name or other searchable fields

Logging

The server automatically logs all activity to ~/.grouper-mcp/logs/:

  • grouper-mcp.log - All messages (info, debug, errors)

  • grouper-mcp-errors.log - Error messages only

Set GROUPER_DEBUG=true to enable verbose debug logging for troubleshooting.

For complete logging configuration including custom log directories and Docker log access, see Configuration Guide.

Testing

A comprehensive regression test suite is included for validating the MCP server against a Grouper instance:

# Build and run all tests
npm run build
npx tsx tests/run-tests.ts

# Run specific test or category
npx tsx tests/run-tests.ts --test group-2.1
npx tsx tests/run-tests.ts --category members --verbose

The test suite covers 60 tests across all tool categories including groups, stems, members, privileges, composite groups, and more.

For complete testing documentation including environment setup, test configuration, and CI/CD integration, see Testing Guide.

Use Cases

Real-world use cases and examples are documented in the use-cases/ directory, including:

These use cases drive feature development and demonstrate practical applications of the MCP server.

Planned Features

Planned features and improvements are tracked in TODO.md.

API Compatibility

This server is designed to work with Grouper v4.0.000 web services API. It should be compatible with most recent versions of Grouper.

Feedback & Questions

We welcome all kinds of feedback, including:

  • Feature requests and ideas

  • Bug reports

  • Use case questions

  • General feedback and suggestions

  • Contributions and improvements

Please send your feedback to jbeard@unicon.net

Available Tools

22 tools
grouper_add_memberA

Add one or more members to a group. Supports batch operations - pass multiple subjects in the "subjects" array for efficiency instead of making multiple calls. Returns detailed information about the group and results for each member added. For single member additions, you can use either the "subjectId" parameter OR the "subjects" array.

Inputs: groupName (required), subjects, subjectId, subjectSourceId, +1 more.

grouper_assign_attributeC

Assign an attribute to a group and return status of the attribute assignment operation.

Inputs: groupName (required), attributeName (required), value.

grouper_assign_privilegeA

Grant or revoke one or more privileges on a group or stem for one or more subjects. For groups, use groupName with access privileges (read, view, update, admin, optin, optout, groupAttrRead, groupAttrUpdate). For stems, use stemName with naming privileges (stem, create, stemAdmin, stemView, stemAttrRead, stemAttrUpdate). Supports batch operations for multiple subjects and multiple privileges. Subjects can be either users or groups. When assigning privileges to a group as a subject, use the group's UUID as the subjectId (the group name will not work). Grouper will automatically recognize the UUID as a group without needing to specify subjectSourceId. Returns formatted results showing success/failure for each privilege assignment.

Inputs: privilegeNames (required), allowed, stemName, subjects, +4 more.

grouper_create_groupB

Create a new group in Grouper. Supports creating regular groups and composite groups (UNION, INTERSECTION, COMPLEMENT of two existing groups). For composite groups, provide compositeType, leftGroupName, and rightGroupName together. Returns detailed information about the created group including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup).

Inputs: name (required), description, compositeType, leftGroupName, +2 more.

grouper_delete_group_by_id_indexB

Delete a group from Grouper by ID index and return detailed information about the deleted group including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup).

Inputs: idIndex (required).

grouper_delete_group_by_nameB

Delete a group from Grouper by name and return detailed information about the deleted group including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup).

Inputs: groupName (required).

grouper_delete_group_by_uuidB

Delete a group from Grouper by UUID and return detailed information about the deleted group including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup).

Inputs: groupUuid (required).

grouper_find_groups_by_name_approximateA

Search for groups in Grouper by approximate name match and/or within a specific stem (folder). Supports three modes: (1) name search only - provide "query" parameter, (2) stem browsing only - provide "stemName" to list all groups in that stem, (3) combined search - provide both "query" and "stemName" to search within a stem. Use "stemScope" to control whether to search one level ("ONE_LEVEL") or recursively ("ALL_IN_SUBTREE", default). Returns a compact list with each group's name, description, and type (if not a standard group). Use grouper_get_group_by_exact_name to get full details on a specific group.

Inputs: query, stemName, stemScope.

grouper_find_stems_by_name_approximateA

Search for stems/folders in Grouper by approximate name match. Stems are organizational folders that contain groups and other stems, forming a hierarchical structure. Returns a compact list with each stem's name and description. Use grouper_get_stem_by_exact_name to get full details on a specific stem.

Inputs: query (required).

grouper_get_group_by_exact_nameA

Get detailed information about a specific group by exact name match. Returns formatted text with comprehensive group information including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup). Returns "Group not found" if the exact group name does not exist.

Inputs: groupName (required).

grouper_get_group_by_uuidA

Get detailed information about a specific group by UUID. Returns formatted text with comprehensive group information including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup). Returns "Group not found" if the UUID does not exist.

Inputs: groupUuid (required).

grouper_get_membersB

Get all members of a group with detailed information about both the group and its members. Always includes comprehensive group details and member information including: Subject ID, Display Name, Login ID, Email, Source, Member ID, and additional subject attributes.

Inputs: groupName (required), memberFilter, subjectAttributeNames.

grouper_get_privilegesA

Get privileges on a group or stem, optionally filtered by subject or privilege name. Returns formatted list showing all privileges with subject information, privilege type, and whether they are revokable. Use groupName to query group privileges or stemName to query stem privileges. Results may include both user subjects (from sources like 'jdbc2_test' or 'ldap') and group subjects (from source 'g:gsa'). Group subjects are identified by their UUID as the Subject ID and their group name as the Subject Name.

Inputs: stemName, groupName, subjectId, privilegeName, +2 more.

grouper_get_stem_by_exact_nameA

Get detailed information about a specific stem/folder by exact name match. Returns formatted text with comprehensive stem information including: name (full stem path), displayName (human-readable display name), description (stem purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), and idIndex (numeric ID). Returns "Stem not found" if the exact stem name does not exist.

Inputs: stemName (required).

grouper_get_stem_by_uuidA

Get detailed information about a specific stem/folder by UUID. Returns formatted text with comprehensive stem information including: name (full stem path), displayName (human-readable display name), description (stem purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), and idIndex (numeric ID). Returns "Stem not found" if the UUID does not exist.

Inputs: stemUuid (required).

grouper_get_subject_by_idB

Get detailed information about a specific subject by subject ID. Returns comprehensive subject information for all matching subjects including Subject ID, Display Name, Description, Source, and additional attributes, or "Subject not found" if the subject ID does not exist.

Inputs: subjectId (required), subjectSourceId.

grouper_get_subject_by_identifierB

Get detailed information about a specific subject by subject identifier. Returns comprehensive subject information for all matching subjects including Subject ID, Display Name, Description, Source, and additional attributes, or "Subject not found" if the subject identifier does not exist.

Inputs: subjectIdentifier (required), subjectSourceId.

grouper_get_subject_groupsA

Get all group memberships for a specific subject/user. Returns a compact list with each group's name, description, type (if not a standard group), and membership type (immediate/effective). Use grouper_get_group_by_exact_name to get full details on a specific group. Returns "No group memberships found" if the subject is not a member of any groups.

Inputs: subjectId (required), enabled, memberFilter, subjectSourceId, +1 more.

grouper_remove_memberA

Remove one or more members from a group. Supports batch operations - pass multiple subjects in the "subjects" array for efficiency instead of making multiple calls. Returns detailed information about the group and results for each member removed. For single member removals, you can use either the "subjectId" parameter OR the "subjects" array.

Inputs: groupName (required), subjects, subjectId, subjectSourceId, +1 more.

grouper_search_subjectsA

Search for subjects using Grouper's text search functionality. Returns comprehensive subject information for all matching subjects including Subject ID, Display Name, Description, Source, and additional attributes. Uses Grouper's native searchString capability for flexible text matching.

Inputs: searchString (required), subjectSourceId.

grouper_trace_membershipA

Trace how a subject (user) is a member of a group, showing the complete membership path. This tool identifies whether membership is direct (immediate), through intermediate groups (effective), or through composite group operations (union/intersection). Returns a detailed trace showing the chain of memberships from the subject to the target group, including intermediate groups, membership types, and composite operations. Useful for debugging access issues, understanding complex membership hierarchies, and auditing group membership paths. Maximum recursion depth is 10 levels to prevent timeout.

Inputs: groupName (required), subjectId (required), maxDepth, subjectSourceId.

grouper_update_groupA

Update an existing group's properties. Can also convert an existing group into a composite group by providing compositeType, leftGroupName, and rightGroupName together, or remove an existing composite definition by setting removeComposite to true. Returns detailed information about the updated group including: name (full group name), displayName (human-readable display name), description (group purpose), uuid (unique identifier), extension (short name), displayExtension (short display name), typeOfGroup (group|role|entity), idIndex (numeric ID), enabled status, and detailed metadata including: hasComposite, createTime, modifyTime, createSubjectId, modifySubjectId, compositeType, typeNames, attributeNames, attributeValues, and composite group information (leftGroup, rightGroup).

Inputs: groupName (required), description, compositeType, leftGroupName, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 22 tools

    Disambiguation3/5

    Most tools target a distinct resource+action, but the subject-lookup family is genuinely ambiguous: grouper_get_subject_by_identifier, grouper_get_subject_by_id, and grouper_search_subjects have near-identical descriptions and return the same shape, so an agent cannot infer when 'identifier' differs from 'id'. Group and stem lookups are cleanly separated by key type, which keeps the overall set usable.

    Naming Consistency4/5

    Strong, predictable pattern: grouper_ + verb_noun in snake_case (get_group_by_uuid, add_member, delete_group_by_name). Minor deviations exist in verb choice (find vs search vs get for lookups) and redundant _by_x suffixes, but the scheme remains readable and consistent.

    Tool Count3/5

    22 tools is at the upper edge for a group-management domain and is inflated by three near-duplicate delete-by-key variants and two subject getters that could collapse. Most tools do earn their place (CRUD, membership, privileges, stems), but the surface feels heavier than necessary.

    Completeness4/5

    Core lifecycle is well covered: group create/read/update/delete, member add/remove/list, privilege assign/read, attribute assign, subject lookup, stem browsing, and membership tracing. Gaps remain on stems (read/find only, no create/delete) and attributes (assign only, no get/remove), which are work-aroundable but notable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables management of FreeIPA resources including user groups, host groups, HBAC, and sudo rules via the FreeIPA JSON-RPC API. It provides comprehensive tools for automating access control and infrastructure provisioning in FreeIPA-managed environments.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables consuming and managing Groups.io mailing lists programmatically via the Groups.io REST API. Provides tools to list subscriptions, fetch group details, search archives, manage members, and access files, events, and databases.
      1
      MIT No Attribution
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to administer, inspect, and troubleshoot BI Platform 4.3 SP5 through REST Web Services, including Web Intelligence documents, universes, CMS security, schedules, and repository hierarchy.
      46
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables management of Active Directory environments through LDAP, including user, group, computer, and organizational unit administration plus security auditing.
      MIT