From 3776a795347766f9a5219e546fdcfd8815aee457 Mon Sep 17 00:00:00 2001 From: marcelo Date: Thu, 11 Sep 2025 01:56:25 -0700 Subject: [PATCH] include cli setup --- inspector/dev-setup.mdx | 22 ++++++++++++++++++++++ installation.mdx | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/inspector/dev-setup.mdx b/inspector/dev-setup.mdx index f71fcc0..0580280 100644 --- a/inspector/dev-setup.mdx +++ b/inspector/dev-setup.mdx @@ -42,6 +42,28 @@ Make sure you have the following installed: - **Format code**: `npm run prettier-fix` - **Build project**: `npm run build` +## Testing with Config Files + +When developing, you can test your changes with configuration files: + +```bash +# Build first, then run with config +npm run build +npm start -- --config ../config.json --server everything + +# Or run the CLI script directly +node bin/start.js --config ../config.json --server everything +``` + + +Remember to use `--` when passing arguments through npm scripts: `npm start -- --config file.json` + + +This is useful for: +- Testing changes on a specific branch +- Validating configuration file handling +- Development workflow with multiple MCP servers + ## Next Steps - Check out our [Contributing Guide](/inspector/contributing-guide) for detailed guidelines diff --git a/installation.mdx b/installation.mdx index f5d55fe..5f062f5 100644 --- a/installation.mdx +++ b/installation.mdx @@ -71,6 +71,46 @@ This will open the MCPJam inspector and start an Ollama model with the `ollama s npx @mcpjam/inspector@latest --ollama llama3.2 ``` +## Start with Configuration File + +You can use a configuration file to connect to multiple MCP servers at once: + +```bash +# Using npx directly +npx @mcpjam/inspector@latest --config path/to/config.json --server myserver + +# If running from the repository +npm run build +npm start -- --config path/to/config.json --server myserver +``` + + +**Note**: When using `npm start`, you need the `--` separator to pass arguments to the underlying script. + + +Example configuration file structure: + +```json +{ + "mcpServers": { + "everything": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-everything"], + "env": { + "HELLO": "Hello MCP!" + } + }, + "weather-server": { + "command": "python", + "args": ["weather_server.py"], + "env": { + "WEATHER_API_KEY": "your-api-key" + } + } + } +} +``` +