# pyxsd

> pyxsd is an open-source MCP server for developer tools. Let an agent inspect XSD schemas, validate XML and follow errors to the exact source line. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, Windows
- **Website:** https://pyxsd.knorby.com/mcp.html
- **Repository:** https://github.com/knorby/pyxsd
- **MCP Registry name:** io.github.knorby/pyxsd
- **Categories:** developer tools, files and documents
- **Listing updated:** 2026-11-14

## About

pyxsd is mainly a Python library that compiles XML Schema into classes and binds documents into typed trees. Its MCP server exposes that engine to an agent over stdio: load schema and XML inputs for a session, explore compiled schemas, validate, follow diagnostics to exact source occurrences, run bounded XPath queries, compare schemas, export records and read retained output files.

Safety defaults are conservative. Execution is disabled by default, and the one tool that runs supplied Python, pyxsd_preview_transform, needs an explicit trusted-local opt-in; the docs warn it runs with the launching user's privileges, not in a sandbox. Resource limits for file size, XML depth, worker count and deadlines are also off until enabled with --resource-limits. Output is kept in a store under the project root's .pyxsd/mcp, or in a temporary store with --no-persist.

Start it with uvx --from 'pyxsd[mcp]' pyxsd-mcp on Python 3.11 or newer. Installing the mcp-all extra adds Arrow-based projected records.

## Features

- **Schema exploration:** Inspect compiled XSD schemas and their types.
- **Diagnostics trail:** Follow a validation issue to its exact source occurrence.
- **Bounded XPath:** Run limited XPath queries against loaded documents.
- **Schema comparison:** Compare schemas and export records.
- **Execution off by default:** Transform previews need an explicit trusted-local opt-in.
- **Retained artifacts:** Keeps bounded outputs in a project store for later reading.

## Good for

- Validate XML feeds against a multi-file schema
- Debug why a document fails with exact locations
- Diff two versions of an XSD
- Preview a transform on sample documents
- Export schema-derived records for analysis

## Install

### Claude Code (Terminal)

```sh
claude mcp add pyxsd -- uvx pyxsd
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "pyxsd": {
      "command": "uvx",
      "args": [
        "pyxsd"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "pyxsd": {
      "command": "uvx",
      "args": [
        "pyxsd"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "pyxsd": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pyxsd"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "pyxsd": {
      "command": "uvx",
      "args": [
        "pyxsd"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "pyxsd": {
      "command": "uvx",
      "args": [
        "pyxsd"
      ]
    }
  }
}
```

## Tools

- `pyxsd_preview_transform`: Previews a user-supplied transform; requires the trusted-local execution opt-in.

## FAQ

### Is it safe to run?

Execution is disabled by default; trusted-local transform previews run unsandboxed and must be switched on at launch.

### Which Python version?

Python 3.11 or newer.

### Does it use the network?

The server is stdio-only and runs beside the client.

### Where are outputs kept?

In <project-root>/.pyxsd/mcp unless you set --state-dir or --no-persist.

### Is pyxsd free?

Yes. pyxsd is open source, so you can use and self-host it for free.

### How do I add pyxsd to Claude Code?

Run this command in your terminal: claude mcp add pyxsd -- uvx pyxsd

### What are the best alternatives to pyxsd?

The closest alternatives to pyxsd are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/pyxsd
