-
Notifications
You must be signed in to change notification settings - Fork 2
Add documentation for groups #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| --- | ||
| title: Group MCP servers | ||
| 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. Groups help you organize | ||
| servers by project, environment, or team, and control which tools are available | ||
| to different clients. | ||
|
|
||
| ## Why use groups? | ||
|
|
||
| Groups let you organize MCP servers and control client access: | ||
|
|
||
| - **Project isolation**: Keep development and production servers separate | ||
| - **Environment management**: Organize servers by development stage | ||
| - **Client customization**: Configure different tool sets for different clients | ||
|
|
||
| :::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. | ||
|
|
||
| ::: | ||
|
|
||
| ## Create and organize groups | ||
|
|
||
| ### Create a group | ||
|
|
||
| ```bash | ||
| thv group create <GROUP_NAME> | ||
| ``` | ||
|
|
||
| For example, to create separate groups for different environments: | ||
|
|
||
| ```bash | ||
| thv group create development | ||
| thv group create production | ||
| ``` | ||
|
|
||
| ### Run servers in a group | ||
|
|
||
| When running an MCP server, specify the group using the `--group` flag: | ||
|
|
||
| ```bash | ||
| thv run --group development fetch | ||
| thv run --group production filesystem --volume /prod/repo:/workspace:ro | ||
| ``` | ||
|
|
||
| :::info What's happening? | ||
|
|
||
| When you specify a group: | ||
|
|
||
| 1. The server is assigned to that group and labeled accordingly | ||
| 2. The server can only be accessed by clients configured for that group | ||
|
|
||
| ::: | ||
|
|
||
| ## Configure client access to groups | ||
|
|
||
| You can configure MCP clients to access specific groups, giving you control over | ||
| which tools are available in different contexts. | ||
|
|
||
| ### Configure a client for a specific group | ||
|
|
||
| When registering a client, you can specify which group it should access: | ||
|
|
||
| ```bash | ||
| thv client register --group development | ||
eleftherias marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| This configures the client to only access servers in the `development` group. | ||
|
|
||
| ## Example workflows | ||
|
|
||
| ### Project-based organization | ||
|
|
||
| ```bash | ||
| # 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-backend | ||
| ``` | ||
|
|
||
| ## Manage groups | ||
|
|
||
| ### Remove a group | ||
|
|
||
| Remove a group and move its servers to the default group: | ||
|
|
||
| ```bash | ||
| thv group rm development | ||
| ``` | ||
|
|
||
| Remove a group and delete all its servers: | ||
|
|
||
| ```bash | ||
| thv group rm development --with-workloads | ||
| ``` | ||
|
|
||
| :::warning | ||
|
|
||
| Using `--with-workloads` permanently deletes all servers in the group. | ||
|
|
||
| ::: | ||
|
|
||
| ## Related information | ||
|
|
||
| - [Client configuration](client-configuration.mdx) | ||
| - [Run MCP servers](run-mcp-servers.mdx) | ||
| - [`thv group` command reference](../reference/cli/thv_group.md) | ||
| - [`thv client` command reference](../reference/cli/thv_client.md) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.