# x12sdk

> x12sdk is an open-source MCP server for healthcare software. Python SDK and MCP server to read, validate and generate synthetic HIPAA X12 health files. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted
- **Repository:** https://github.com/owgreen-dev/x12sdk
- **MCP Registry name:** io.github.owgreen-dev/x12sdk
- **Categories:** [healthcare software](https://ai-powered.com/categories/healthcare-software)
- **Listing updated:** 2026-11-27

## About

x12sdk parses, checks and writes HIPAA X12 health care transactions in Python, covering 837 claims, 835 remittances, 270/271 eligibility, 276/277 claim status and 834 enrollment. Each file is read into typed Pydantic models that follow the implementation guide rules and can be written back out byte for byte.

Beyond parsing, it flattens 835 files into one row per service line for spreadsheets and pandas, reports validation errors with their location in the file, and matches remittances to claims by patient control number. A seeded generator produces valid synthetic files with no protected health information, including matched claim and remittance pairs with mixed outcomes.

It suits health data engineers, revenue-cycle analysts and developers testing EDI pipelines. It also ships an MCP server so AI assistants can validate, parse and generate X12 text without reading files from disk.

## Features

- **Typed transaction models:** Each supported X12 transaction set parses into validated Pydantic models that serialize back to the original text.
- **File validation with locations:** Invalid files are reported with the loop and claim where the problem sits, and the CLI exits non-zero for use in builds.
- **835 to table conversion:** Remittances become one row per paid service line with adjustment totals by group code, ready for CSV or pandas.
- **Seeded synthetic generation:** Generates reproducible valid files for all nine transaction sets, so test data never contains real patient information.
- **Claim and remittance matching:** Joins claims to their payments on the patient control number and flags claims with no remittance or payments with no claim.
- **MCP server for assistants:** Exposes read-only validate, parse, list, and generate tools over stdio for AI clients, working only on text passed to it.

## Good for

- Validate 837 claim files in a build pipeline before sending them to a clearinghouse
- Convert 835 remittance files into spreadsheets for payment reconciliation
- Generate synthetic claims and remittances for testing healthcare billing software
- Analyse denial reasons by payer and reason code across remittance files
- Let an AI assistant check or draft X12 transactions without exposing real data

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add x12sdk -- uvx x12sdk
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "x12sdk": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "x12sdk"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add x12sdk -- uvx x12sdk
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.x12sdk]
command = "uvx"
args = ["x12sdk"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

Or run: gemini mcp add -s user x12sdk uvx -- x12sdk

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

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

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

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

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "x12sdk": {
      "command": "uvx",
      "args": [
        "x12sdk"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

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

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

## Tools

From the tool list in its README, going by the names, 2 of 5 tools read data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `validate_x12` (name suggests: reads): Parses X12 text against the implementation guide; for an invalid file, where and why it failed
- `parse_x12`: Each transaction as JSON, loop by loop
- `list_claims` (name suggests: reads): One flat row per claim from an 837 (P, I or D), 835, 276 or 277
- `generate_x12`: A synthetic file of any supported set, reproducible from a seed
- `generate_claim_pair`: A synthetic 837 and the 835 that answers it

## FAQ

### Which X12 transaction sets are supported?

Parsing and generation cover 837P, 837I, 837D, 835, 834, 270/271 and 276/277.

### Does the tool upload my files anywhere?

Everything runs locally, and the browser playground runs the library in the tab so the file is not uploaded.

### What license is x12sdk released under?

It is released under the Apache License 2.0.

### Can x12sdk write X12 back out?

Yes, parsed transactions serialize back to X12, and a writer adds interchange and functional group envelopes with consistent control numbers.

### Is x12sdk free?

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

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

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

### What are the best alternatives to x12sdk?

The closest alternatives to x12sdk are HIPAA FHIR MCP (prototype), sellhealthinsurancedatatoai.com, Automatedrcm Billing MCP, Dingdawg Healthcare Agent and Healthparse Healthcare Data Gateway.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [HIPAA FHIR MCP (prototype)](https://ai-powered.com/mcp/hipaa-fhir-mcp-prototype): HIPAA FHIR MCP (prototype) is an open-source MCP server for health and science.
- [sellhealthinsurancedatatoai.com](https://ai-powered.com/mcp/sellhealthinsurancedatatoai-com): sellhealthinsurancedatatoai.com is a free MCP server for healthcare software.
- [Automatedrcm Billing MCP](https://ai-powered.com/mcp/automatedrcm-billing-mcp): Automatedrcm Billing MCP is a freemium MCP server for healthcare software.
- [Dingdawg Healthcare Agent](https://ai-powered.com/mcp/dingdawg-healthcare-agent): Dingdawg Healthcare Agent is a freemium MCP server for healthcare software.
- [Healthparse Healthcare Data Gateway](https://ai-powered.com/mcp/healthparse-healthcare-data-gateway): Healthparse Healthcare Data Gateway is a paid MCP server for healthcare software.
- [Dingdawg Healthcare Agent](https://ai-powered.com/mcp/dingdawg-healthcare-agent-2): Dingdawg Healthcare Agent is a freemium MCP server for healthcare software.
- [K01 Synthetic Health Data](https://ai-powered.com/mcp/k01-synthetic-health-data): K01 Synthetic Health Data is an MCP server for health and science.
- [Langcare MCP Fhir](https://ai-powered.com/mcp/langcare-mcp-fhir): Langcare MCP Fhir is an open-source MCP server for health and science.

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