gs1br
Enables querying authoritative product data from GS1 Brasil's Verified by GS1 API via GTIN, including brand, description, classifications, images, weights, dimensions, and licensee details, with support for national and international bases and batch enrichment.
README
mcp-gs1br
Model Context Protocol (MCP) server for the GS1 Brasil — Verified by GS1 API.
Consulta dados autoritativos de produtos a partir do GTIN (EAN-8, UPC-A, EAN-13, ITF-14): marca, descrição, GPC, NCM, CEST, imagens, peso, dimensões, licenciado. Cobre a base nacional (Cadastro Nacional de Produtos – CNP) e a base internacional (GS1 Registry Platform).
Pré-requisitos
- Ser associado GS1 Brasil.
- Aceitar o termo de uso em https://verifiedbygs1.gs1br.org/.
- Solicitar liberação de acesso em https://fs8.formsite.com/gsurvey/cfw75k23hq/index.
- Receber da GS1 Brasil seu
client_ideclient_secret.
Depois disso você usa o mesmo username/password do portal CNP / Verified by GS1 como credenciais OAuth.
Instalação
cd mcp-gs1br
npm install
npm run build
Configuração
Exporte as credenciais como variáveis de ambiente:
| Variável | Obrigatória | Descrição |
|---|---|---|
GS1BR_CLIENT_ID |
sim | Client ID recebido da GS1 Brasil |
GS1BR_CLIENT_SECRET |
sim | Client Secret recebido da GS1 Brasil |
GS1BR_USERNAME |
sim | E-mail do usuário CNP / Verified by GS1 |
GS1BR_PASSWORD |
sim | Senha do mesmo usuário |
GS1BR_ENV |
não | production (padrão) ou homologacao |
Registrar como MCP no Claude Code
.claude/mcp.json ou equivalente:
{
"mcpServers": {
"gs1br": {
"command": "node",
"args": ["/caminho/absoluto/para/mcp-gs1br/dist/index.js"],
"env": {
"GS1BR_CLIENT_ID": "...",
"GS1BR_CLIENT_SECRET": "...",
"GS1BR_USERNAME": "seu@email",
"GS1BR_PASSWORD": "...",
"GS1BR_ENV": "production"
}
}
}
}
Claude Desktop
No claude_desktop_config.json:
{
"mcpServers": {
"gs1br": {
"command": "node",
"args": ["/caminho/absoluto/para/mcp-gs1br/dist/index.js"],
"env": { "GS1BR_CLIENT_ID": "...", "GS1BR_CLIENT_SECRET": "...", "GS1BR_USERNAME": "...", "GS1BR_PASSWORD": "..." }
}
}
}
Tools expostas
gs1_validate_check_digit
Valida localmente o dígito verificador (módulo 10) de um GTIN. Não consome a API. Útil para filtrar leituras ruins antes de gastar quota.
{ "gtin": "7898357416086" }
gs1_verify_gtin
Consulta um GTIN e retorna um resumo normalizado:
{
"gtin": "7898357416086",
"found": true,
"source": "national",
"status": "Válido",
"brand": "GS1 Brasil",
"description": "GS1 Brasil Tênis de Corrida Style Azul com Branco Tamanho 37",
"gpcCategoryCode": "10001070",
"gpcCategoryName": "Calçados Esportivos - Uso Geral",
"ncm": "0000.00.00",
"cest": "28.059.00",
"imageUrls": ["https://cnp30blob.blob.core.windows.net/cnp3files/..."],
"grossWeight": { "value": 2.8, "unitCode": "KGM" },
"netWeight": { "value": 2.8, "unitCode": "KGM" },
"netContent": { "value": 1, "unitCode": "EA" },
"dimensions": {
"height": { "value": 40, "unitCode": "CMT" },
"width": { "value": 17, "unitCode": "CMT" },
"depth": { "value": 10, "unitCode": "CMT" }
},
"licensee": {
"name": "GS1 BRASIL - ASSOCIACAO BRASILEIRA DE AUTOMACAO",
"licenseType": "GCP",
"managingOrganization": "GS1 Brasil"
},
"syncInformationCCG": true,
"raw": { ... }
}
Campos podem vir vazios dependendo do perfil de consulta contratado (Verificação, Verificação + Nacional, Verificação + Internacional, Nacional + Internacional).
gs1_verify_gtin_raw
Mesmo que acima, mas retorna o JSON cru da API GS1 (array com dadosInternacionais, dadosNacionais, verificacao).
gs1_enrich_many
Enriquece um lote de até 25 GTINs sequencialmente. Filtra localmente dígitos verificadores inválidos para economizar requests.
{ "gtins": ["7898357416086", "4006381333931", "..."] }
Por baixo dos panos
- OAuth 2.0 password grant contra
POST {host}/oauth/access-token, headerAuthorization: Basic base64(client_id:client_secret), body JSON{grant_type, username, password}. - Token cache em memória, TTL 3h (expires_in = 10800). Reautenticação automática em 401/403.
- Consulta:
GET {host}/provider/v2/verified?gtin={GTIN}com headersclient_ideaccess_token. - Hosts:
https://api.gs1br.org(produção)https://api-hml.gs1br.org(homologação)
Erros comuns
| Código HTTP | Situação |
|---|---|
| 200 | Sucesso |
| 400 | Requisição inválida |
| 403 | Usuário sem autorização para o recurso |
| 404 | GTIN não encontrado |
| 500 | Erro interno GS1 |
Códigos de negócio (returnCode / returnCodeDescription) retornados dentro do payload quando o GTIN é internacional — vide manual oficial R1.3.
Referências
- Portal API GS1 Brasil: https://portalapi.gs1br.org/
- Manual R1.3 (PDF): Manual de Uso da API Verified by GS1 R1.3
- Manual CNP (PDF): API de Cadastro e Consulta CNP v3
Licença
MIT.
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.