mcp-json-generator
v1.1.1
Published
Simple .mcp.json file generator using Claude Code format.
Downloads
6
Readme
MCP Config Generator
A command-line tool for generating and updating .mcp.json configuration files interactively.
Installation
Install globally via npm:
npm install -g mcp-json-generatorUsage
Run the tool in the directory where you want to create or update your .mcp.json file:
mjgFeatures
- Detects existing .mcp.json files and offers to update or replace them
- Interactive prompts for all configuration options
- Number key bindings for quick menu navigation
- Collects tool information including:
- Tool name
- Command to execute
- Command arguments
- Environment variables
- Supports adding multiple tools in one session
Workflow
- The tool checks if .mcp.json exists in the current directory
- If found, you can choose to update it or create a new one
- For each tool, you provide:
- Name
- Command (e.g., node, python, npx)
- Arguments (one per line, empty line to finish)
- Environment variables (key-value pairs, empty key to finish)
- After each tool, you can choose to add another or finish
- The configuration is saved to .mcp.json
Example Output
The tool generates a .mcp.json file in this format:
{
"mcpServers": {
"my-tool-one": {
"command": "node",
"args": [
"/home/me/my-tool-one/index.js"
],
"env": {}
},
"my-tool-two": {
"command": "node",
"args": [
"/home/me/my-tool-two/index.js"
],
"env": {
"MYENV_ONE": "foo",
"MYENV_TWO": "foo",
}
}
}
}Requirements
- Node.js (any recent version)
Notes
- Press Ctrl+C at any time to exit
- Use number keys (1, 2, etc.) to quickly select menu options
- Empty input for arguments or environment variables will finish that section
- The tool will overwrite .mcp.json if you choose to create a new configuration
