Skip to content
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

Add config file support #161

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nbarraud
Copy link

@nbarraud nbarraud commented Mar 4, 2025

Add Config File Support

Adds JSON configuration file support to MCP Inspector, aligning with other MCP tools like Claude Desktop.

Motivation and Context

MCP Inspector currently requires command-line arguments and environment variables for each run, creating friction for developers who:

  • Test against the same server configurations repeatedly
  • Work across multiple MCP tools with inconsistent configuration methods

This feature brings consistency with Claude Desktop and other MCP tools, creating a unified developer experience.

How Has This Been Tested?

Tested with:

  • Valid and invalid configuration files
  • Multiple server configurations in a single file
  • Various command and environment variable combinations
  • Error handling scenarios

Breaking Changes

None. This change is backward compatible. Users can continue using command-line arguments while gaining the option to use configuration files.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The implementation provides:

  1. JSON configuration file parsing
  2. New CLI flags: --config to specify a configuration file and --server to select a server from the config
  3. Robust error handling
  4. Updated documentation with examples
  5. An example configuration file

@nbarraud nbarraud force-pushed the feature/config-file-support branch from e68c24a to 4f1b4ab Compare March 4, 2025 04:43
@nbarraud nbarraud marked this pull request as ready for review March 4, 2025 05:02
@nbarraud nbarraud marked this pull request as draft March 5, 2025 03:53
@olaservo
Copy link
Collaborator

olaservo commented Mar 6, 2025

I really like this idea, do you think there is anything here that needs to be tweaked or tested more? (Noticed in was in Draft)

@nbarraud
Copy link
Author

nbarraud commented Mar 6, 2025

I really like this idea, do you think there is anything here that needs to be tweaked or tested more? (Noticed in was in Draft)

Yes I'm working on a better version and decided to leave this as a draft rather than submit 2 PRs. I will update this PR soon and then submit it.

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