RealJSON MCP 服务器
一个本地 Model Context Protocol 服务器,为 AI 智能体提供 19 个 JSON 工具。它通过 stdio 在你的设备上运行,无需上传,也无需 API 密钥。
一行命令安装
需要 Node.js 20 或更高版本。MCP 客户端会在需要时启动服务器。
Claude Desktop:添加到 claude_desktop_config.json:
{
"mcpServers": {
"realjson": {
"command": "npx",
"args": ["-y", "@realjson/mcp-server"]
}
}
} Claude Code:
claude mcp add realjson -- npx -y @realjson/mcp-server Cursor:将相同的配置块添加到 ~/.cursor/mcp.json(或项目中的 .cursor/mcp.json):
{
"mcpServers": {
"realjson": {
"command": "npx",
"args": ["-y", "@realjson/mcp-server"]
}
}
} 专业版许可证:在服务器条目中添加 env 配置块:
{
"mcpServers": {
"realjson": {
"command": "npx",
"args": ["-y", "@realjson/mcp-server"],
"env": { "REALJSON_LICENSE": "rj1.…" }
}
}
} 可用工具
每个工具都是纯函数,只处理你传入的文本,不会访问网络或你的文件。
-
json_formatPretty-print JSON with a chosen indent (optionally sorting keys). -
json_minifyStrip all whitespace from JSON. -
json_validateCheck whether text is valid JSON. Returns {valid, error?, type?}. -
json_sort_keysSort object keys alphabetically (natural order), recursively by default. -
jsonpath_queryQuery JSON with a JSONPath expression ($.a.b[*], filters [?(@.x>1)], recursive descent ..). Returns matched values with their paths. -
json_to_schemaInfer a JSON Schema from sample JSON (an array is treated as multiple samples). Set structured_output to get a schema accepted by LLM structured outputs / function calling (OpenAI strict mode, Anthropic, Gemini): object root, additionalProperties false, every property required (missing ones become nullable). -
json_schema_validateValidate JSON against a JSON Schema; returns every error with its JSON pointer path. -
json_to_csvConvert a JSON array (or object) to CSV, flattening nested objects to dot.path columns. -
json_to_xmlConvert JSON to well-formed XML (keys starting with @ become attributes). -
jsonl_convertConvert between a JSON array and JSON Lines (NDJSON). direction "to_jsonl" takes JSON, "to_json" takes JSONL text. -
json_diffCompare two JSON documents and return RFC 6902-style add/remove/replace operations turning `a` into `b`. -
json_to_codeGenerate typed code from JSON: Go structs, Python dataclasses/Pydantic, Java records, Rust serde structs or Zod schemas. -
json_repairFix almost-JSON and LLM output: extracts JSON from chat text and ```json fences, closes truncated output, escapes stray quotes and raw newlines, fixes comments, single/curly quotes, unquoted keys, missing/trailing commas, Python True/False/None and NaN/undefined. Returns the repaired JSON and the fixes applied. -
finetune_validateValidate a fine-tuning dataset (JSON Lines) before uploading it: OpenAI chat (SFT), OpenAI preference (DPO), Anthropic Claude (Amazon Bedrock) or prompt/completion. Returns the detected format, per-line errors and warnings (roles, missing assistant turns, weights, DPO pairs, duplicates, minimum example count) and stats including an approximate token count. -
json_chaosInject edge cases (nulls, type swaps, huge strings, unicode, deep nesting) into JSON to test consumers. Pass a seed for reproducible output. -
jwt_decodeDecode a JWT (header, payload, exp/nbf status). Optionally verify an HS256/HS384/HS512 signature with a secret — verification happens locally. -
json_to_yamlConvert JSON to YAML. -
xml_to_jsonConvert XML to JSON (attributes become @name keys, text next to children becomes #text, repeated siblings become arrays). -
csv_to_jsonConvert CSV text to a JSON array of objects (or arrays without a header row), with optional type inference.
免费版与专业版限额
免费版:每次调用 256 KB,每天 300 次(本地时间午夜重置)。专业版:每次调用 10 MB,调用不限次数,并支持批量工具。超出限额的调用会返回一条正常结果,说明限额、重置时间和升级方式;小体积输入的 json_validate 与 json_repair 始终可用。
查看价格隐私优先的设计
服务器不包含任何网络代码。用量记录在你磁盘上的一个小文件中,专业版许可证通过公钥离线验证:没有账号、没有遥测、没有许可证服务器。
realjson.com 上的 WebMCP
在支持 WebMCP(navigator.modelContext)的浏览器中,realjson.com 会注册其主要工具,让浏览器内的智能体直接调用。所有处理仍在页面内完成。
常见问题
RealJSON MCP 服务器是什么?
一个开放的 Model Context Protocol 服务器,把 RealJSON 的格式化、校验、修复、JSONPath、Schema、对比和转换功能作为工具提供给 AI 智能体调用。
我的 JSON 会被上传吗?
不会。服务器通过 stdio 在本地运行,不包含网络代码,你的数据不会离开你的设备。
支持哪些客户端?
任何能启动 stdio 服务器的 MCP 客户端,包括 Claude Desktop、Claude Code、Cursor、VS Code、Windsurf 和 Zed。
使用限额是多少?
免费版为每次调用 256 KB、每天 300 次。专业版为每次调用 10 MB,调用不限次数。小体积的校验与修复调用不会被拦截。
WebMCP 是什么?
WebMCP 是一种浏览器 API,允许网页向浏览器内的 AI 智能体提供工具。API 可用时 RealJSON 会注册其主要工具,否则不做任何事。