json-toolkit-mcp
v1.0.2
Published
JSON toolkit MCP server — validate, format, convert, and merge JSON data
Maintainers
Readme
json-toolkit-mcp
JSON toolkit MCP server. Validate, format, convert, and merge JSON data.
No external dependencies. Pure JSON processing.
Install
npm install -g json-toolkit-mcpUsage
Claude Desktop / Cursor / OpenCode
Add to your MCP config:
{
"mcpServers": {
"json-toolkit": {
"command": "npx",
"args": ["-y", "json-toolkit-mcp"]
}
}
}Tools
validate_json — Validate JSON
Validate a JSON string and return error location if invalid.
Input:
{
"json_string": "{\"name\": \"test\", \"age\": 25}"
}Output (valid):
{
"valid": true
}Output (invalid):
{
"valid": false,
"error": {
"line": 1,
"column": 17,
"message": "Unexpected token } in JSON at position 16"
}
}format_json — Format JSON
Format a JSON string as pretty-printed or minified.
Input:
{
"json_string": "{\"a\":1,\"b\":2}",
"mode": "pretty"
}Output:
{
"a": 1,
"b": 2
}json_to_typescript — JSON to TypeScript
Infer and generate TypeScript interface from a JSON string.
Input:
{
"json_string": "{\"name\": \"test\", \"age\": 25, \"active\": true}",
"interface_name": "User"
}Output:
export interface User {
name: string
age: number
active: boolean
}json_to_csv — JSON to CSV
Convert a JSON array of objects to CSV format.
Input:
{
"json_array_string": "[{\"name\":\"Alice\",\"age\":30},{\"name\":\"Bob\",\"age\":25}]"
}Output:
name,age
Alice,30
Bob,25merge_json — Merge JSON
Deep merge multiple JSON objects. Arrays are concatenated, objects are recursively merged, primitives are overwritten.
Input:
{
"json_strings": [
"{\"a\":1,\"b\":{\"x\":1}}",
"{\"b\":{\"y\":2},\"c\":3}"
]
}Output:
{
"a": 1,
"b": {
"x": 1,
"y": 2
},
"c": 3
}Design
| Feature | Why |
|---------|-----|
| Zero runtime deps | Only @modelcontextprotocol/sdk and zod |
| Pure JSON processing | No external libraries needed |
| TypeScript inference | Auto-generate interfaces from JSON data |
| Deep merge | Recursive object merging with array concatenation |
| CSV conversion | Handles nested objects with dot notation flattening |
License
MIT
