Skip to main content
Glama

MCP-CEP

MCP server for querying ZIP codes using the ViaCEP public API.
Compatible with Goose as a Command-line Extension.


👤 Author

Wendell Barreto
https://github.com/wendellbigato


🚀 Installation

1. Clone this repository

git clone https://github.com/wendellbigato/mcp-cep.git
cd mcp-cep

Please change the above URL to the real one when posting.


2. Create and activate the virtual environment

python3.11 -m venv .venv
source .venv/bin/activate  # Linux/macOS
# ou
.venv\Scripts\activate.bat  # Windows

3. Install dependencies with uv or pip

Using uv :

uv pip install -e ".[cli]"

Or with normal pip:

pip install -e ".[cli]"

Related MCP server: cep-tools

🧩 Setting up as an extension in Goose

  1. Execute:

goose configure
  1. Select Add Extension

  2. Choose Command-line Extension

  3. Fill in the fields:

Field

Value

Extension name

mcp-cep

Command to run

/caminho/completo/para/uv --directory /caminho/para/mcp-cep run main.py

Timeout

300

Environment

(blank, or customize if needed)

Use which uv and pwd to find the correct paths.


✅ How to test on Goose

After setting up, start:

goose session --with-extension mcp-cep

And send commands like:

Repita: Olá!
Qual o endereço do CEP 01001000?

🧰 Available tools

  • echo(texto: str) : repeats the sent text.

  • buscar_cep(cep: str) : query address information via ViaCEP.


📄 License

This project is licensed under the MIT License.

Available Tools

3 tools
buscar_cepB

Consulta informações de um CEP brasileiro usando a API ViaCEP.

Args:
    cep: Código de Endereçamento Postal no formato 01001000 ou 01001-000.

Returns:
    Um dicionário com informações de endereço como rua, bairro, cidade e estado.
ParametersJSON Schema
NameRequiredDescriptionDefault
cepYes

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the external API (ViaCEP) which adds some context, but doesn't describe error handling, rate limits, authentication requirements, or what happens with invalid CEP formats beyond the two examples given. For a tool that queries external data, this is a significant gap.

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 efficiently structured with clear sections: purpose statement, Args with parameter details, and Returns with output information. Every sentence adds value without redundancy, making it easy to parse and understand quickly.

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

Completeness3/5

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

For a single-parameter lookup tool with no output schema, the description provides adequate coverage of the basic functionality. It explains what the tool does, parameter format, and return structure. However, it lacks important contextual details like error conditions, API limitations, or performance characteristics that would be helpful for an AI agent.

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 description provides valuable parameter semantics that aren't in the schema. While the schema only indicates 'cep' is a required string, the description specifies it must be a Brazilian postal code and shows two valid formats (01001000 or 01001-000). With 0% schema description coverage, this description compensates well for the single parameter.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Consulta informações de um CEP brasileiro' (consult information about a Brazilian postal code). It specifies the action (consult) and resource (CEP information), though it doesn't explicitly differentiate from its sibling 'buscar_ceps_por_logradouro' beyond the different input method.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it mentions the API (ViaCEP), it doesn't indicate when to choose this over 'buscar_ceps_por_logradouro' or other potential methods for obtaining Brazilian address information.

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

buscar_ceps_por_logradouroA

Busca todos os CEPs associados a um logradouro em uma cidade e estado.

Args:
    uf: Sigla do estado (ex: SP, RJ)
    cidade: Nome da cidade (ex: São Paulo)
    logradouro: Nome da rua, avenida, praça etc (ex: Praça da Sé)

Returns:
    Lista de dicionários com endereços que correspondem à busca.
ParametersJSON Schema
NameRequiredDescriptionDefault
ufYes
cidadeYes
logradouroYes

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the search functionality and return format ('Lista de dicionários com endereços'), but doesn't mention potential limitations like partial matches, empty results, rate limits, or authentication requirements. It adequately covers basic behavior but lacks operational 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 perfectly structured and concise. It begins with the core purpose, then provides a well-organized parameter section with clear examples, and concludes with return value information. Every sentence adds essential value with zero waste.

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 tool's moderate complexity (3 required parameters, no output schema, no annotations), the description is quite complete. It covers purpose, parameters with examples, and return format. However, without annotations or output schema, it could benefit from more behavioral context about how the search works and what the returned dictionaries contain.

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

Parameters5/5

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

The description provides excellent parameter semantics beyond the 0% schema coverage. It clearly explains each parameter's purpose with concrete examples: 'uf: Sigla do estado (ex: SP, RJ)', 'cidade: Nome da cidade (ex: São Paulo)', and 'logradouro: Nome da rua, avenida, praça etc (ex: Praça da Sé)'. This fully compensates for the lack of schema descriptions.

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 purpose with specific verb ('Busca') and resource ('CEPs associados a um logradouro'), including the required geographic context ('em uma cidade e estado'). It distinguishes itself from the sibling 'buscar_cep' by specifying it searches for multiple CEPs associated with a street rather than a single CEP.

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 clear context for when to use this tool (searching for all CEPs associated with a street in a city/state). It doesn't explicitly mention when NOT to use it or name alternatives, though the distinction from 'buscar_cep' is implied by the different functionality described.

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

echoB

Repete o texto enviado.

ParametersJSON Schema
NameRequiredDescriptionDefault
textoYes

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'repeats' text, implying a read-only or echo operation, but doesn't disclose any behavioral traits such as side effects, error handling, or output format. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence in Portuguese ('Repete o texto enviado'), with zero wasted words. It's appropriately sized and front-loaded, conveying the core purpose without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally complete. It states what the tool does but lacks details on behavior, usage, or output. For such a simple tool, this might be adequate, but it leaves gaps in understanding how the tool operates beyond its basic function.

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 description adds no parameter semantics beyond the input schema, which has 0% description coverage. However, with only 1 parameter ('texto'), the tool's purpose inherently clarifies its use: the parameter is the text to repeat. This compensates well for the low schema coverage, making the parameter meaning clear from context.

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

Purpose3/5

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

The description 'Repete o texto enviado' (Repeats the sent text) states the tool's purpose with a clear verb ('repeats') and resource ('text'), but it's somewhat vague about what 'repeats' entails (e.g., returns, outputs, echoes). It doesn't distinguish from sibling tools like 'buscar_cep', but they serve different functions, so differentiation isn't critical here.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or in what context. It lacks explicit usage instructions, prerequisites, or exclusions, leaving the agent to infer usage based on the simple purpose alone.

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. 3 tool updates
    • First observedbuscar_cep
    • First observedbuscar_ceps_por_logradouro
    • First observedecho

TDQS

B3.3/5.0

Scored across 3 tools

Disambiguation4/5

The first two tools have clearly distinct purposes: buscar_cep queries by CEP number, while buscar_ceps_por_logradouro queries by address components. However, the echo tool is completely unrelated to the CEP domain, creating a minor ambiguity about the server's primary focus. The core CEP tools are well-differentiated.

Naming Consistency3/5

Two tools follow a consistent Portuguese verb_noun pattern (buscar_cep, buscar_ceps_por_logradouro), but the third tool (echo) breaks this pattern with an English name. The naming is readable but lacks full consistency across the set due to the language and pattern mismatch.

Tool Count3/5

Three tools is borderline for a CEP server. While the two core CEP tools provide basic lookup functionality, the inclusion of an unrelated echo tool makes the count feel artificially inflated. For a focused CEP service, 2-4 domain-specific tools would be more appropriate.

Completeness3/5

The server covers the essential CEP lookup operations: query by CEP and query by address components. However, there are notable gaps for a complete CEP service - no tools for address validation, reverse geocoding, or handling CEP ranges. The echo tool adds no value to the CEP domain coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables querying detailed address information from Brazilian postal codes (CEPs) via the ViaCEP API, returning data such as street names, neighborhoods, cities, states, regions, and IBGE codes.
    1
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying Brazilian CEP (postal code) addresses via the public ViaCEP API, returning formatted HTML with address details.
    GPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for querying Brazilian postal codes (CEP) from the official Correios source, supporting read-only lookups via natural language in any MCP-compatible client.
    MIT