Skip to main content
Glama

mcp-gs1br

Model Context Protocol (MCP) server for the GS1 Brasil — Verified by GS1 API.

Queries authoritative product data from the GTIN (EAN-8, UPC-A, EAN-13, ITF-14): brand, description, GPC, NCM, CEST, images, weight, dimensions, licensee. Covers the national database (Cadastro Nacional de Produtos – CNP) and the international database (GS1 Registry Platform).

Prerequisites

  1. Be a GS1 Brasil member.

  2. Accept the terms of use at https://verifiedbygs1.gs1br.org/.

  3. Request access approval at https://fs8.formsite.com/gsurvey/cfw75k23hq/index.

  4. Receive your client_id and client_secret from GS1 Brasil.

After that, use the same username/password from the CNP / Verified by GS1 portal as OAuth credentials.

Related MCP server: commerce-validators

Installation

cd mcp-gs1br
npm install
npm run build

Configuration

Export the credentials as environment variables:

Variable

Required

Description

GS1BR_CLIENT_ID

yes

Client ID received from GS1 Brasil

GS1BR_CLIENT_SECRET

yes

Client Secret received from GS1 Brasil

GS1BR_USERNAME

yes

CNP / Verified by GS1 user email

GS1BR_PASSWORD

yes

Same user's password

GS1BR_ENV

no

production (default) or homologacao

Register as MCP in Claude Code

.claude/mcp.json or equivalent:

{
  "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

In 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": "..." }
    }
  }
}

Exposed tools

gs1_validate_check_digit

Validates the check digit (modulo 10) of a GTIN locally. Does not consume the API. Useful for filtering out bad reads before spending quota.

{ "gtin": "7898357416086" }

gs1_verify_gtin

Queries a GTIN and returns a normalized summary:

{
  "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": { ... }
}

Fields may come empty depending on the contracted query profile (Verification, Verification + National, Verification + International, National + International).

gs1_verify_gtin_raw

Same as above, but returns the raw JSON from the GS1 API (array with dadosInternacionais, dadosNacionais, verificacao).

gs1_enrich_many

Enriches a batch of up to 25 GTINs sequentially. Locally filters invalid check digits to save requests.

{ "gtins": ["7898357416086", "4006381333931", "..."] }

Under the hood

  • OAuth 2.0 password grant against POST {host}/oauth/access-token, header Authorization: Basic base64(client_id:client_secret), JSON body {grant_type, username, password}.

  • In-memory token cache, TTL 3h (expires_in = 10800). Automatic reauthentication on 401/403.

  • Query: GET {host}/provider/v2/verified?gtin={GTIN} with client_id and access_token headers.

  • Hosts:

    • https://api.gs1br.org (production)

    • https://api-hml.gs1br.org (staging)

Common errors

HTTP Code

Situation

200

Success

400

Invalid request

403

User not authorized for the resource

404

GTIN not found

500

GS1 internal error

Business codes (returnCode / returnCodeDescription) returned inside the payload when the GTIN is international — see official manual R1.3.

References

License

MIT.

Available Tools

4 tools
gs1_enrich_manyA

Consulta um lote pequeno de GTINs sequencialmente e retorna os dados normalizados de cada um. Valida dígito verificador localmente antes de chamar a API (economiza requests). Limitado a 25 GTINs por chamada para proteger contra rate limit da GS1.

ParametersJSON Schema
NameRequiredDescriptionDefault
gtinsYesLista de GTINs (máximo 25 por chamada).
environmentNo
skipInvalidCheckDigitNoSe true (padrão), GTINs com dígito verificador inválido não são enviados à API.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description reveals that check digits are validated locally before calling the API (saving requests) and that there is a 25 GTIN limit to avoid rate limits. This goes beyond the parameter descriptions and gives insight into the tool's internal behavior. No annotations were provided, so the description carries the responsibility and performs well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, providing all necessary information in two sentences. It avoids redundancy and clearly states the key constraints and behaviors without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives sufficient context for a batch enrichment tool: it states the purpose, the batch size limit, and the check-digit validation behavior. While it does not describe the return format in detail, no output schema is provided, and mentioning 'returns normalized data' is adequate for an agent to understand the expected outcome. It also implicitly differentiates from sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds context for the gtins parameter (batch, limit) and skipInvalidCheckDigit (default true, filters invalid GTINs), but it does not explain the 'environment' parameter. Schema descriptions cover gtins and skipInvalidCheckDigit, but environment lacks any description. The tool description does not fully compensate for this gap, so a score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries a small batch of GTINs sequentially and returns normalized data, and it distinguishes itself from sibling tools like gs1_verify_gtin by focusing on batch enrichment. It also mentions the 25 GTIN limit and local check-digit validation, making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for batch enrichment with multiple GTINs ('lote pequeno') and mentions the limit and check-digit validation to save requests. While it does not explicitly contrast with single-verification tools, the context makes it clear when this batch tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gs1_validate_check_digitA

Valida localmente o dígito verificador (módulo 10) de um GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13) ou GTIN-14 (ITF-14). Não requer credenciais e não faz chamada HTTP. Útil para filtrar códigos com erro de leitura antes de consultar a API.

ParametersJSON Schema
NameRequiredDescriptionDefault
gtinYesCódigo GTIN como string. Aceita com ou sem pontuação; apenas dígitos são considerados.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Sem anotações, a descrição assume o peso e entrega bastante: execução local, dispensa de credenciais, ausência de chamada HTTP e comportamento de ignorar pontuação. Não detalha o formato de retorno nem tratamento de erros, mas para uma validação modular simples o comportamento central está bem exposto.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Duas frases objetivas: a primeira entrega a operação e o escopo, a segunda os diferenciais comportamentais e o caso de uso. Não há palavras desnecessárias nem repetição do nome da ferramenta.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Para um único parâmetro, sem schema de saída e sem anotações, a descrição cobre propósito, formato de entrada, restrições comportamentais e contexto de uso. A única lacuna relevante é a ausência do formato de retorno, mas o comportamento de validação é simples o suficiente para ser inferido.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

A cobertura do schema é de 100% e a descrição do parâmetro 'gtin' já documenta a aceitação de pontuação e o uso de apenas dígitos. A descrição da ferramenta repete essa regra sem acrescentar significado novo ao parâmetro. O baseline 3 é adequado.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

A descrição informa verbo específico ('valida'), recurso ('dígito verificador'), algoritmo ('módulo 10') e escopo (GTIN-8, GTIN-12, GTIN-13, GTIN-14). Diferencia-se dos siblings ao afirmar que a validação é local e sem chamada HTTP. Não há ambiguidade sobre o que a ferramenta faz.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A descrição indica explicitamente quando usar: filtrar códigos com erro de leitura antes de consultar a API, e menciona que não exige credenciais nem HTTP. Não nomeia um sibling específico, mas o contexto 'antes de consultar a API' deixa claro que a alternativa é a verificação via API. Faltou um 'quando não usar' explícito.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gs1_verify_gtinA

Consulta um GTIN na API Verified by GS1 (GS1 Brasil) e retorna um resumo normalizado: marca, descrição, GPC, NCM, CEST, imagens, peso, dimensões, licenciado. Requer credenciais GS1BR_* em variáveis de ambiente. Para a estrutura crua, use gs1_verify_gtin_raw.

ParametersJSON Schema
NameRequiredDescriptionDefault
gtinYesGTIN de 8, 12, 13 ou 14 dígitos.
environmentNoAmbiente GS1: 'production' (padrão) ou 'homologacao'. Sobrescreve GS1BR_ENV.

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description mentions the need for credentials and the output nature (normalized summary), but does not disclose potential error behaviors, rate limits, or side effects. Since no annotations are provided, the description carries the full burden; it is adequate but not rich in behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that efficiently convey the core functionality, required credentials, and an important alternative. It is well-structured and free of unnecessary details, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While it lists the fields returned in the summary, it does not describe the output format in detail (e.g., JSON structure, field types, or potential error responses). However, given the tool's simplicity and that the sibling raw tool handles raw output, this is sufficient for most use cases, leaving only minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides descriptions for both 'gtin' and 'environment' (including enum values and default behavior). The tool description adds little beyond restating the purpose, so it does not significantly enhance parameter understanding beyond the schema. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: querying a GTIN via the Verified by GS1 API (GS1 Brasil) and returning a normalized summary with specific fields (marca, descrição, GPC, NCM, CEST, imagens, peso, dimensões, licenciado). It also distinguishes itself from the sibling tool gs1_verify_gtin_raw by emphasizing the normalized format, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: it requires GS1BR_* credentials in environment variables, and it directs users to gs1_verify_gtin_raw for raw structure. This clearly differentiates when to use this tool versus alternatives, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gs1_verify_gtin_rawA

Consulta um GTIN na API Verified by GS1 e retorna o payload JSON cru, exatamente como recebido da GS1 Brasil (array com 'dadosInternacionais', 'dadosNacionais' e 'verificacao'). Útil quando o consumidor precisa de campos não expostos por gs1_verify_gtin.

ParametersJSON Schema
NameRequiredDescriptionDefault
gtinYesGTIN de 8, 12, 13 ou 14 dígitos.
environmentNoAmbiente GS1: 'production' (padrão) ou 'homologacao'. Sobrescreve GS1BR_ENV.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description conveys that the tool performs a read-only query ('Consulta') and returns raw data, implying no transformation or side effects. It lists the output structure, but does not address error handling (e.g., invalid GTIN or API failure) or potential variability in the payload. This is adequate but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that efficiently cover purpose and use case. It avoids redundant phrasing and is well-structured, with the main functionality stated first and a rationale for using the tool second. No unnecessary details are included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of annotations and output schema, the description provides essential context: it names the resource, mentions the raw payload and specific fields, and gives a usage scenario. It does not cover edge cases or error behavior, but for a simple query tool, this level of detail is reasonably complete. The reference to a sibling tool aids in placement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The parameter schema descriptions are clear: gtin is a string of 8-14 digits, and environment is an enum with production/homologacao. The description does not add extra meaning beyond the schema, but the schema itself is sufficiently descriptive. No ambiguity exists for the agent to misinterpret the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: it queries the GS1 Verified API and returns the raw JSON payload exactly as received. It specifies the resource (GS1 Verified API) and the verb (consulta/retorna), and names the expected fields (dadosInternacionais, dadosNacionais, verificacao). It also distinguishes itself from a sibling tool by emphasizing the raw output, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear use case: it is useful when the consumer needs fields not exposed by gs1_verify_gtin. However, it does not explicitly state when NOT to use this tool (e.g., when the processed output is sufficient), leaving some inference to the agent. The mention of the alternative tool offers sufficient guidance for most scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedgs1_enrich_many
    • First observedgs1_validate_check_digit
    • First observedgs1_verify_gtin
    • First observedgs1_verify_gtin_raw

TDQS

A4.5/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clear, distinct purpose: check digit validation, single normalized lookup, single raw lookup, and batch normalized lookup. The descriptions explicitly differentiate raw vs normalized and single vs batch, leaving no ambiguity.

Naming Consistency5/5

All tools follow the consistent pattern gs1_ + verb + noun/modifier (validate_check_digit, verify_gtin, verify_gtin_raw, enrich_many). The verb is always lowercase and the object is clearly descriptive, with only minor variation like 'raw' and 'many' as modifiers.

Tool Count5/5

Four tools is well-scoped for a GTIN validation and lookup server. It covers the essential operations without bloat, staying within the ideal range of 3–15 tools.

Completeness5/5

The server covers the full lifecycle of what an agent needs: local check digit validation, single lookup (both normalized and raw), and batch lookup. There are no dead ends—users can validate, query individually, and enrich in bulk.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying Open Food Facts product database by barcode, full-text search, category, brand, or country.
    5 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables retrieving inbound Brazilian electronic fiscal documents (supplier invoices, CT-e, events) directly from SEFAZ using your company's A1 digital certificate, with incremental NSU sync, query-budget protection, and DANFE PDF generation.
    MIT