Skip to main content
Glama
mateecs

EDI MCP Server

by mateecs

EDI MCP Server

Python MCP License Status

An MCP (Model Context Protocol) server that exposes EDI (Electronic Data Interchange) document processing as tools an AI model like Claude can call.

Built as a portfolio project extending real-world EDI translation experience into an agent-callable tool server using Anthropic's Model Context Protocol.

Table of contents

Related MCP server: Document Tools

What it does

Exposes tools over MCP:

Tool

What it does

parse_edi_document

Parses raw X12 EDI text into structured JSON (interchange, functional group, transaction set, segments)

convert_edi_format

Converts raw X12 EDI text into clean, named-field JSON (PO/invoice number, date, ship-to, line items)

validate_edi_transaction

Checks the document has a valid envelope (ISA/GS/ST...SE/GE/IEA) and required segments for its transaction type

get_transaction_summary

Produces a plain-English summary (transaction type, sender/receiver, PO/invoice number, line item count)

Currently supports X12 850 (Purchase Order) and 810 (Invoice) transaction sets. The parser (edi_parser.py) is deliberately simplified — it's a portfolio-scale implementation covering the core X12 envelope structure, not a certified EDI translator.

How it works

flowchart LR
    A[Claude / MCP Client] -->|tool call| B(server.py<br/>FastMCP wrappers)
    B --> C(edi_parser.py<br/>parsing · validation · summary)
    C --> D[Raw X12 EDI text]
    C --> E[Structured JSON output]
    B -->|tool result| A

server.py is a thin MCP layer; all real logic lives in edi_parser.py, which stays framework-free so it can be tested and reused on its own.

Project structure

edi-mcp-server/
├── server.py        # MCP tool definitions (thin wrappers using FastMCP)
├── edi_parser.py     # Core parsing/validation/summary logic (no MCP code)
├── sample_850.edi    # Sample X12 850 Purchase Order for testing
├── test_client.py    # Standalone script that calls the server like a real MCP client would
├── requirements.txt
└── README.md

Setup

python3 -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate
pip install -r requirements.txt

Note on MCP SDK versions: this project pins mcp==1.29.1. The mcp package released a 2.0 version that renamed FastMCP to MCPServer and moved its module path — if you pip install mcp without pinning, you may get the newer API and the imports in server.py won't match. Stick to the pinned version, or check the SDK's migration notes if you want to upgrade.

Running it

Test the parsing logic directly:

python3 -c "
from edi_parser import summarize_x12
print(summarize_x12(open('sample_850.edi').read()))
"

Run the full MCP server + simulated client call:

python3 test_client.py

Run the server standalone (for connecting a real MCP client):

python3 server.py

Connecting to Claude Desktop

Add this to your Claude Desktop MCP config file (claude_desktop_config.json — find it via Claude Desktop's settings):

{
  "mcpServers": {
    "edi-processor": {
      "command": "python3",
      "args": ["/absolute/path/to/edi-mcp-server/server.py"]
    }
  }
}

Restart Claude Desktop, and you should be able to ask it things like "Validate this EDI document" or "Summarize this purchase order" while pasting in EDI text — Claude will call your tools directly.

Next steps / ideas to extend this

  • Add more transaction types (856 Ship Notice, 997 Functional Acknowledgment)

  • Add EDIFACT support alongside X12

  • Swap the stdio transport for HTTP so it can run as a hosted service

  • Add proper unit tests (pytest) for edi_parser.py

Why this project

Built to demonstrate the ability to take existing backend/EDI domain knowledge and expose it as agent-callable tools via MCP — the same pattern companies are adopting to make internal systems accessible to AI agents.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables document conversion and processing through an MCP server interface for AI assistants.
    -
  • A
    license
    A
    quality
    A
    maintenance
    Enables Claude and other MCP-compatible agents to process documents, extract structured data, detect PII, and export LLM-ready datasets through natural language tool calls.
    8
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Let AI agents read, validate and acknowledge EDI documents. Parses raw X12 and EDIFACT interchanges into structured JSON, validates envelope integrity, produces plain-language summaries, and generates 997 Functional Acknowledgments.
    4
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mateecs/edi-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server