| title | Organize servers into groups |
|---|---|
| description | How to organize MCP servers into logical groups and configure client access. |
This guide explains how to organize your MCP servers into logical groups and configure which groups your MCP clients can access.
:::tip[New to groups?]
If you're not sure whether groups are right for your use case, see Organizing MCP servers with groups for an overview of when and why to use them.
:::
:::info[What's the default behavior?]
All MCP servers are automatically assigned to the default group unless you
specify otherwise. MCP clients configured without a specific group can access
all servers in the default group.
:::
thv group create <GROUP_NAME>For example, to create separate groups for different environments:
thv group create development
thv group create productionWhen running an MCP server, specify the group using the --group flag:
thv run --group development fetch
thv run --group production filesystem --volume /prod/repo:/projects:ro:::info[What's happening?]
When you specify a group:
- The server is assigned to that group and labeled accordingly
- The server can only be accessed by clients configured for that group
:::
A single workload can only belong to one group at a time. To run multiple instances of the same MCP server in different groups, use a unique name for each instance:
thv run --group development --name fetch-dev fetch
thv run --group production --name fetch-prod fetchYou can configure MCP clients to access specific groups, giving you control over which tools are available in different contexts.
When registering a client, you can specify which group it should access:
thv client register <CLIENT_NAME> --group developmentThis configures the client to only access servers in the development group.
# Create groups for different projects
thv group create webapp-frontend
thv group create webapp-backend
# Run project-specific servers
thv run --group webapp-frontend mcp-react-tools
thv run --group webapp-backend mcp-database-tools
# Configure clients with appropriate access
thv client register --client vscode --group webapp-frontend
thv client register --client cursor --group webapp-backendRemove a group and move its servers to the default group:
thv group rm developmentRemove a group and delete all its servers:
thv group rm development --with-workloads:::warning
Using --with-workloads permanently deletes all servers in the group.
:::
- Configure your AI client to connect to your server groups
- Manage secrets for the MCP servers in your groups