x12sdk
Python SDK and MCP server to read, validate and generate synthetic HIPAA X12 health files
x12sdk is an open-source MCP server for healthcare software. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- Runs
- Locally
- Version
- 3.1.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add x12sdk -- uvx x12sdkAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"x12sdk": {
"command": "uvx",
"args": [
"x12sdk"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"x12sdk": {
"command": "uvx",
"args": [
"x12sdk"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"x12sdk": {
"command": "uvx",
"args": [
"x12sdk"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"x12sdk": {
"type": "stdio",
"command": "uvx",
"args": [
"x12sdk"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add x12sdk -- uvx x12sdkOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.x12sdk]
command = "uvx"
args = ["x12sdk"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"x12sdk": {
"command": "uvx",
"args": [
"x12sdk"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "x12sdk": { "command": "uvx", "args": [ "x12sdk" ] } } }Or run: gemini mcp add -s user x12sdk uvx -- x12sdk
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "x12sdk": { "command": "uvx", "args": [ "x12sdk" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.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
Add to cline_mcp_settings.json
{ "mcpServers": { "x12sdk": { "command": "uvx", "args": [ "x12sdk" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.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
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "x12sdk": { "command": "uvx", "args": [ "x12sdk" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "x12sdk": { "command": "uvx", "args": [ "x12sdk" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "x12sdk": { "command": "uvx", "args": [ "x12sdk" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About x12sdk
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.
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
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_x12Name 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_claimsName 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
What it does
- 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
Pricing
Open source
Free open-source Python package under Apache-2.0.
x12sdk 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.