Skip to main content
Glama

ApiColombiaMCP

A Model Context Protocol (MCP) server that provides information about Colombia through the API Colombia service.

πŸ“Š Data Source

This project uses the API Colombia service for educational and practical purposes. The API provides comprehensive information about Colombia including departments, regions, cities, and general country data.

Note: This implementation is for educational and practical purposes only. The API Colombia service is a public, open-source project that provides free access to Colombian data.

Related MCP server: mcp-colombia

πŸ—οΈ Architecture Overview

This project follows Clean Architecture principles with a modular, scalable structure designed for maintainability and extensibility.

πŸ“ Project Structure

ApiColombiaMCP/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts                 # Main server entry point
β”‚   β”œβ”€β”€ services/                # Business logic layer
β”‚   β”‚   └── country.services.ts  # Country data operations
β”‚   β”œβ”€β”€ tools/                   # Tool definitions layer
β”‚   β”‚   └── index.ts            # MCP tool configurations
β”‚   └── shared/                  # Shared utilities layer
β”‚       β”œβ”€β”€ constants/           # Centralized constants
β”‚       β”‚   └── index.ts       # Tool names, descriptions, config
β”‚       β”œβ”€β”€ types/              # Type definitions
β”‚       β”‚   └── response.mcp.ts # MCP response types
β”‚       └── index.ts           # Shared exports
β”œβ”€β”€ .env                         # Environment variables
β”œβ”€β”€ package.json                 # Dependencies and scripts
└── tsconfig.json               # TypeScript configuration

🎯 Architecture Layers

1. Presentation Layer (index.ts)

  • Responsibility: Server initialization and tool registration

  • Key Features:

    • Uses constants for configuration

    • Dynamic tool registration from centralized configuration

    • Clean separation from business logic

2. Tools Layer (tools/)

  • Responsibility: MCP tool definitions and configurations

  • Key Features:

    • Centralized tool configuration

    • Interface-based tool definitions

    • Easy extension for new tools

    • Type-safe tool registration

3. Business Logic Layer (services/)

  • Responsibility: Core business operations

  • Key Features:

    • External API integration

    • Data transformation and formatting

    • Error handling and validation

    • Environment-based configuration

4. Shared Layer (shared/)

  • Responsibility: Cross-cutting concerns and utilities

  • Key Features:

    • Centralized constants and configuration

    • Shared type definitions

    • Error message standardization

    • Reusable utilities

πŸ”§ Key Components

Constants (shared/constants/index.ts)

export const TOOL_NAMES = {
  GET_COUNTRY: 'getCountry',
} as const;

export const TOOL_DESCRIPTIONS = {
  GET_COUNTRY: 'Get information about a country',
} as const;

Tool Configuration (tools/index.ts)

export interface ToolConfig {
  name: string;
  description: string;
  handler: () => Promise<ApiColombiaResponse>;
}

export const tools: ToolConfig[] = [
  {
    name: TOOL_NAMES.GET_COUNTRY,
    description: TOOL_DESCRIPTIONS.GET_COUNTRY,
    handler: getCountry,
  },
];

Service Implementation (services/country.services.ts)

  • Fetches data from API Colombia

  • Formats response for MCP compatibility

  • Handles errors gracefully

  • Uses environment variables for configuration

πŸš€ Adding New Tools

To add a new tool, follow these steps:

  1. Add constants in shared/constants/index.ts:

export const TOOL_NAMES = {
  GET_COUNTRY: 'getCountry',
  NEW_TOOL: 'newTool', // Add your new tool name
} as const;
  1. Create service in services/ directory:

// services/new-tool.service.ts
export async function newToolService(): Promise<ApiColombiaResponse> {
  // Your implementation
}
  1. Add tool configuration in tools/index.ts:

export const tools: ToolConfig[] = [
  {
    name: TOOL_NAMES.GET_COUNTRY,
    description: TOOL_DESCRIPTIONS.GET_COUNTRY,
    handler: getCountry,
  },
  {
    name: TOOL_NAMES.NEW_TOOL,
    description: TOOL_DESCRIPTIONS.NEW_TOOL,
    handler: newToolService,
  },
];

πŸ”’ Environment Configuration

The project uses environment variables for configuration:

# .env
API_COLOMBIA_URL=https://api-colombia.com/api/

The service gracefully falls back to default URLs if environment variables are not set.

πŸ§ͺ Development

Prerequisites

  • Node.js (v16.9+ or v14.19+)

  • pnpm (package manager)

Package Manager Setup

This project uses pnpm as the package manager. If you encounter package manager conflicts:

  1. Enable Corepack (included with Node.js 16.9+):

corepack enable
  1. Install pnpm (if not available):

npm install -g pnpm
  1. Verify pnpm version:

pnpm --version

Installation

# Install dependencies
pnpm install

# Build the project
pnpm build

# Run the MCP server
node build/index.js

Troubleshooting Package Manager Issues

If you see package manager errors:

  • Ensure Corepack is enabled: corepack enable

  • Clear npm cache: npm cache clean --force

  • Use pnpm directly instead of npm/yarn

  • Check that .npmrc file exists in the project root

πŸ“‹ Features

  • Country Information: Get comprehensive data about Colombia

  • Clean Architecture: Modular, testable, and maintainable code

  • Type Safety: Full TypeScript support

  • Error Handling: Graceful error management

  • Environment Configuration: Flexible configuration management

  • Scalable Design: Easy to extend with new tools

πŸ”§ Technologies Used

  • TypeScript: Type-safe JavaScript

  • MCP SDK: Model Context Protocol server development

  • Zod: Schema validation

  • Node.js: Runtime environment

🎯 Benefits of This Architecture

  • πŸ”„ Scalability: Easy to add new tools and features

  • πŸ“ Maintainability: Clear separation of concerns

  • πŸ§ͺ Testability: Each layer can be tested independently

  • πŸ“‹ Type Safety: Full TypeScript coverage

  • πŸš€ Consistency: Centralized configuration and constants

  • πŸ”§ Flexibility: Environment-based configuration

  • πŸ“– Readability: Clean, well-organized code structure

This architecture ensures your MCP server is ready for production use and can grow with your needs!

Available Tools

4 tools
getCountryC

Get information about a country

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.9/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 'Get information,' implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, this is a significant gap in transparency about its behavior.

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: 'Get information about a country.' It is front-loaded with the core action and resource, with zero wasted words. This makes it highly concise and well-structured for its simple purpose.

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

Completeness2/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what information is returned, how it's formatted, or any behavioral traits. While minimalism might suffice for basic tools, the lack of output details and behavioral context leaves gaps that could hinder effective use by 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 tool has 0 parameters, and schema description coverage is 100%, meaning there are no parameters to document. The description doesn't need to add parameter semantics beyond the schema. A baseline of 4 is appropriate as it avoids redundancy and the absence of parameters is clear from the 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 'Get information about a country' clearly states the verb ('Get') and resource ('country'), making the purpose understandable. However, it lacks specificity about what type of information is retrieved (e.g., demographics, geography, statistics) and doesn't differentiate from potential sibling tools, which are unrelated to countries. This makes it vague but minimally viable.

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. It doesn't mention prerequisites, context for usage, or any exclusions. Given that sibling tools like 'getRegions' or 'getRegionById' might relate to geographic data, there's no indication of how this tool fits into that ecosystem, leaving usage unclear.

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

getDepartmentsByRegionB

Get list of departments for a specific region by region ID

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/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 full burden. It states a read operation ('Get list'), but doesn't disclose behavioral traits such as permissions needed, rate limits, pagination, or error handling. This is a significant gap for a tool with zero 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 with no wasted words. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary details.

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

Completeness2/5

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

Given no annotations, no output schema, and a mismatch between description (implies region ID input) and schema (0 parameters), the description is incomplete. It doesn't explain how to specify the region, what the return format is, or other contextual details needed for effective use.

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 input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description adds context by mentioning 'region ID', which implies an input, but since there are no parameters in the schema, this is slightly misleading. Baseline is 4 for 0 parameters, but the mismatch between description and schema slightly reduces clarity.

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 verb ('Get list of') and resource ('departments'), specifying it's for a specific region by region ID. However, it doesn't differentiate from sibling tools like 'getRegions' or 'getRegionById', which might retrieve different data types, so it misses full sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'getRegions' or 'getRegionById'. The description implies usage for department data by region, but lacks explicit context, exclusions, or prerequisites.

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

getRegionByIdB

Get detailed information about a specific region by ID

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/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. While 'Get detailed information' implies a read-only operation, it doesn't specify aspects like authentication requirements, rate limits, error handling, or what 'detailed information' entails (e.g., fields returned). This is a significant gap for a tool with zero 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 that front-loads the core purpose ('Get detailed information about a specific region by ID') with zero waste. Every word earns its place, making it appropriately sized and well-structured for clarity.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but has clear gaps. It states what the tool does but lacks behavioral context (e.g., response format, error cases) and usage guidelines relative to siblings. For a tool with no structured data to rely on, this leaves the agent under-informed.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't add parameter details beyond what the schema provides, as there are none to document. A baseline of 4 is applied since the description doesn't introduce unnecessary parameter information.

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 with a specific verb ('Get') and resource ('detailed information about a specific region by ID'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'getRegions' or 'getCountry', which might provide similar regional information through different mechanisms.

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 like 'getRegions' (which likely lists regions) or 'getDepartmentsByRegion' (which might retrieve related data). It lacks explicit when/when-not instructions or named alternatives, leaving usage context implied rather than stated.

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

getRegionsB

Get list of regions in Colombia

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/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 states the action ('Get list') but doesn't describe traits like whether this is a read-only operation, if it requires authentication, rate limits, or what the return format looks like (e.g., list structure, fields included). This is inadequate for a tool with zero 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 that directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain behavioral aspects like safety, authentication, or return values, which are crucial for an agent to use the tool effectively. For a simple list tool, more context on output format or constraints would improve completeness.

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 input schema has 0 parameters with 100% coverage, so the schema fully documents that no inputs are required. The description adds no parameter information, which is acceptable since there are no parameters to explain. Baseline is 4 for 0 parameters, as the description doesn't need to compensate for any gaps.

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 verb ('Get') and resource ('list of regions in Colombia'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'getRegionById' (which fetches a single region) or 'getDepartmentsByRegion' (which fetches departments within regions), missing full sibling distinction.

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. It doesn't mention that 'getRegionById' is for retrieving a specific region by ID, 'getDepartmentsByRegion' is for departments within regions, or 'getCountry' might provide broader country info, leaving the agent to infer usage from tool names alone.

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

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: getCountry retrieves country-level information, getRegions lists regions, getRegionById provides details for a specific region, and getDepartmentsByRegion fetches departments for a given region. There is no overlap in functionality, making tool selection straightforward.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with camelCase styling (e.g., getCountry, getRegions, getRegionById, getDepartmentsByRegion). The naming is predictable and enhances readability across the toolset.

Tool Count4/5

With 4 tools, the count is reasonable for a server focused on Colombian geographic data. It covers key entities (country, regions, departments) but feels slightly thin, as operations like searching or filtering might be missing, though not critical for the core scope.

Completeness4/5

The toolset provides good coverage for retrieving geographic information in Colombia, including country details, regions, and departments. However, there are minor gaps, such as no tools for cities or municipalities, which agents might need to work around for more granular data.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

  • A
    license
    A
    quality
    D
    maintenance
    Provides access to geographical and tourism information about Colombia, including regions, departments, cities, and tourist attractions through the API Colombia service.
    15
    19
    5
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    This MCP server connects AI agents with Colombian e-commerce, travel, and financial services, allowing users to search MercadoLibre, find hotels, and compare banking products like CDTs and loans. It enables seamless integration with local services in pesos colombianos through specialized tools for shopping, travel planning, and financial simulation.
    8
    19
    2
    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/esneyder/apicolombia-mcp'

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