feat(cli): add manifest generator from existing MCP configs
Add mcp-manifest-generate CLI tool to reverse-engineer manifests from Claude Code settings.json. Infers install methods from command patterns (npx→npm, uvx→pip, .exe→dotnet-tool). Converts --flag args to typed config entries (--api-key→secret). Supports --probe flag to run MCP handshake for real server name/version. Add interactive --init wizard mode. Update schema with additional validation rules. Add comprehensive CLI help and examples to README
This commit is contained in:
39
README.md
39
README.md
@@ -2,9 +2,9 @@
|
||||
|
||||
[](https://mcp-manifest.dev)
|
||||
|
||||
Validate `mcp-manifest.json` files and test autodiscovery from domains.
|
||||
Validate `mcp-manifest.json` files, test autodiscovery from domains, and generate manifests from existing MCP server configs.
|
||||
|
||||
## Usage
|
||||
## Validate
|
||||
|
||||
```bash
|
||||
# Validate a local manifest
|
||||
@@ -76,6 +76,41 @@ const { manifest, source, errors } = await discover('ironlicensing.com');
|
||||
const exists = await checkCommand('ironlicensing-mcp');
|
||||
```
|
||||
|
||||
## Generate
|
||||
|
||||
Create `mcp-manifest.json` from your existing Claude Code MCP server configs:
|
||||
|
||||
```bash
|
||||
# List all configured MCP servers
|
||||
npx mcp-manifest-generate
|
||||
|
||||
# Generate manifest for a specific server
|
||||
npx mcp-manifest-generate --server ironlicensing
|
||||
|
||||
# Use a specific settings file
|
||||
npx mcp-manifest-generate --from-settings ~/.claude/settings.json --server myserver
|
||||
|
||||
# Probe the server for name/version via MCP handshake
|
||||
npx mcp-manifest-generate --server ironlicensing --probe
|
||||
|
||||
# Output to file
|
||||
npx mcp-manifest-generate --server ironlicensing -o mcp-manifest.json
|
||||
|
||||
# Generate for all servers
|
||||
npx mcp-manifest-generate --all
|
||||
|
||||
# Raw JSON (for piping)
|
||||
npx mcp-manifest-generate --server ironlicensing --json
|
||||
```
|
||||
|
||||
The generator reverse-engineers your existing config:
|
||||
- **`--flag value`** args become typed config entries (`--api-key` → type: `secret`)
|
||||
- **Environment variables** become config entries with `env_var` field
|
||||
- **Command patterns** infer install method (`npx` → npm, `uvx` → pip, `.exe` → dotnet-tool)
|
||||
- **`--probe`** runs an MCP initialize handshake to get the real server name and version
|
||||
|
||||
Review the generated manifest, fill in the `TODO` description, and commit.
|
||||
|
||||
## License
|
||||
|
||||
CC0 1.0 — Public domain.
|
||||
|
||||
Reference in New Issue
Block a user