Skip to content

Feature Request: Toolhive Config file #919

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nick-terry
Copy link
Contributor

This PR attempts to implement the functionality outlined in this issue. In summary, it adds the following features:

Persistent MCP server arguments

  • When running an MCP server, the --save-config/-s flag may be used to persist any arguments in the config file
  • When running an MCP server, any saved arguments will be loaded from the config file and automatically appended to the command line arguments
  • Several thv config commands are added which allow the user to create/update/remove global MCP server arguments which are automatically appended to the command line arguments of any MCP server run via ToolHive

Default MCP servers

  • Several thv config commands are added which allow the user to create/remove default MCP servers within the config file
  • When the thv run command is used without any arguments, all of the default servers will be started

Note that there are some design decisions which may be up for debate (e.g. the precedence taken by command line arguments vs. arguments from the config when using thv run).

@eleftherias
Copy link
Member

Thanks for the PR @nick-terry!
We're currently re-evaluating our storage implementation, and deciding if we want to continue to track state in JSON files.
We will need a feature like this regardless, but the implementation details may change, which is why it's taking us longer to review this PR. Thanks for being patient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants