p3-edi-mcp
A read-only MCP server for diagnosing EDI order processing and Shopify inventory issues, enabling support teams to answer tickets via Claude without direct database or code access.
README
p3-edi-mcp
Servidor MCP de diagnóstico (somente leitura) para os dois sistemas EDI:
- P3-EDI-Processor — ciclo de vida de pedidos DSV (850 outbound, 855/856 inbound, fulfillment Shopify).
- edi-shopify-orchestration — consumo de arquivos 846 e sincronização de inventário em 65+ lojas Shopify.
Dá ao time (via Claude, como custom connector) a capacidade de responder tickets sobre os dois
sistemas sem depender de acesso direto ao código/banco. Nenhuma escrita em banco ou no Shopify —
queries somente SELECT, GraphQL somente query.
Tools
| Tool | Sistema | O que faz |
|---|---|---|
diagnose_order |
P3 | Timeline completa do ciclo EDI de um pedido com checks, evidências e causas prováveis |
check_dsv_eligibility |
P3 | Reproduz (read-only) a decisão de elegibilidade DSV de um pedido/item e explica cada gate |
get_raw_edi_files |
P3 | Retorna o conteúdo bruto dos arquivos 855/856 de um pedido |
diagnose_inventory |
Orchestration | Por que o SKU X está com estoque errado na loja Y |
get_846_history |
Orchestration | Histórico de aparições de um SKU/arquivo nas runs 846 |
list_recent_failures |
Ambos | Falhas recentes nos dois sistemas |
Resources: runbook://pedidos e runbook://inventario — o conhecimento tácito de diagnóstico,
também resumido nas instructions do servidor.
Rodando localmente
npm install
cp .env.example .env # preencher as variáveis
npm run dev
Healthcheck: GET /health. Endpoint MCP (Streamable HTTP, stateless): POST /mcp com
Authorization: Bearer $MCP_AUTH_TOKEN.
Env vars
MCP_AUTH_TOKEN= # bearer token exigido em POST /mcp
PORT=3000
P3_DATABASE_URL= # Postgres do P3-EDI-Processor (único banco de produção)
ORCH_DATABASE_URL= # Postgres do edi-shopify-orchestration
SHOPIFY_API_VERSION=2026-04
Autenticação Shopify: sem tokens novos a provisionar. O MCP lê o token offline por loja direto
da tabela Session do banco do P3 (o app Remix já persiste isso via OAuth). Sem sessão válida
para uma loja, as tools degradam (retornam os facts de banco e listam em warnings o que
dependeria do Shopify) em vez de falhar.
Deploy (Railway)
Ver instruções passadas pelo assistente na sessão de setup — resumo: criar serviço a partir deste repo no mesmo projeto Railway dos dois sistemas (para usar internal URLs dos Postgres), configurar as env vars acima, expor a URL pública e apontar como custom connector no Claude.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.