LLM Json Schema
MCP server by buildwithnikhil Verified · npm:llm-json-schema
Converts any JSON Schema into the form each LLM provider accepts, and decodes model output back to the original shape. Reports every change made. Aimed at developers whose tool or output schemas fail with provider errors.
Install LLM Json Schema
Built from the published package, never by AI.
claude mcp add llm-json-schema -- npx -y llm-json-schemaRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"llm-json-schema": {
"args": [
"-y",
"llm-json-schema"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"llm-json-schema": {
"args": [
"-y",
"llm-json-schema"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"llm-json-schema": {
"args": [
"-y",
"llm-json-schema"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add llm-json-schema -- npx -y llm-json-schema{
"mcpServers": {
"llm-json-schema": {
"args": [
"-y",
"llm-json-schema"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add llm-json-schema npx -y llm-json-schemaGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the llm-json-schema block.
About
llm-json-schema rewrites a JSON Schema into the form a target LLM provider accepts. It applies per-model rules for OpenAI strict mode, Anthropic, Gemini, Groq, xAI, DeepSeek, Mistral and Ollama. It reports every change in a losses list and can decode the model's output back into the original shape. The package has no dependencies and requires Node 18 or later.
The source describes it as a library with a convert function, not as a set of MCP tools. It is aimed at developers whose schemas from Zod, Pydantic, TypeBox or MCP servers fail with provider errors. Gemini rules were checked against the live API, and corrections ship as patch releases. The project is at version 0.7 and is licensed under MIT.
Written from the project's README and checked against it.
What you need
- Node.js 18 or later
Try asking
- Convert this JSON Schema so it works with OpenAI strict mode
- Check which keywords this schema loses when sent to Gemini
- Decode this model's tool arguments back into my original shape
Good to know
- Status is 0.7, so the output schema may change between releases.
- Some models need strict: false, such as Claude 3 models and Groq models without documented strict mode.
- A schema with no faithful version for the target makes convert() throw UnsupportedSchemaError.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Making tool schemas work with OpenAI strict mode
- Checking what a schema loses for each provider
- Decoding structured model output back to the original shape
Alternatives to LLM Json Schema
All alternatives →Oh My Posh Validator is listed as an MCP server, but the source is the README for oh-my-posh, a cross platform prompt theme engine. It does not describe an MCP server, tools, or schema validation.
Sim is a workspace for building, deploying and managing AI agents and workflows. Its MCP server lets Claude, Claude Code, Codex or another MCP client manage workspaces, workflows, tables, knowledge bases, files and logs.
Omnara deploys durable AI agents on any model and any machine. It is an open-source, self-hostable managed agent platform under Apache 2.0, with a REST API, TypeScript SDK, CLI, and MCP server.
Strata is an MCP server from Klavis AI for progressive tool usage, described as a way to optimize the AI agent's context window. The repository is deprecated, but it remains public for reference and for local or hosted use.
VoiceMode is an MCP server that adds voice conversations to Claude Code and other MCP capable agents. It uses speech-to-text and text-to-speech. It suits people whose hands or eyes are busy.
Gives an AI agent access to the skills, plugins, MCP connections, and Google Workspace and Microsoft 365 capabilities assigned to you by your OpenWork organization, through one OAuth MCP URL. Intended for people and teams who want to reuse the same setup across agents, tools, and machines.
Compare with Oh My Posh Validator, Sim or Omnara
LLM Json Schema: common questions
Which LLM providers does it support?
The source lists OpenAI, Anthropic, Gemini in both schema dialects, Groq, xAI, DeepSeek, Mistral and Ollama. Vertex AI and Google OpenAPI fields are also covered.
What happens to schema features a provider does not support?
Each change is listed in losses with an action such as rewritten, described, relaxed, restructured or dropped. Described keywords are stated in the description and enforced by check().
Does it work with Zod schemas?
Yes. fromAny() reads the Standard JSON Schema property that Zod 4 implements, so the library does not import Zod itself.
How do I install LLM Json Schema?
In Claude Code run claude mcp add llm-json-schema -- npx -y llm-json-schema. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is LLM Json Schema the official server?
LLM Json Schema is published by npm:llm-json-schema from its verified domain in the official MCP Registry.
Is LLM Json Schema free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is LLM Json Schema safe to use?
It scores 69 of 100. Grades: maintenance B, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to LLM Json Schema?
Similar MCP servers: Oh My Posh Validator, Sim, Omnara, strata.
Does LLM Json Schema work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
