Skip to main content
Glama

Countries MCP Server

by Pedrohmlara

Countries MCP

This project implements a Model Context Protocol (MCP) server that provides country-related data using the REST Countries API. It's built using TypeScript and Express, with Docker support for easy deployment.

Prerequisites

  • Node.js (v14 or higher)
  • Docker and Docker Compose
  • npm or yarn package manager

Installation

  1. Install dependencies:
npm install
  1. Add a .env file in the root directory as .example shows

Running the Application

Development Mode

npm run dev

Production Mode

  1. Build the application:
npm run build
  1. Start the server:
npm start

Using Docker

  1. Build and run using Docker Compose:
docker-compose up --build

API Documentation

Endpoints

POST /mcp

Main endpoint for MCP communication.

Headers:

  • Accept: application/json, text/event-stream
  • mcp-session-id: Session identifier (null for new sessions)

Initial Request:

  • First request should not include a session ID
  • Server will respond with a new session ID in the mcp-session-id header

Subsequent Requests:

  • Include the session ID received from the initial request
  • Maintains the session context for continued interaction
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server that provides country-related data from the REST Countries API, allowing users to query information about countries through natural language.

  1. Prerequisites
    1. Installation
      1. Running the Application
        1. Development Mode
        2. Production Mode
        3. Using Docker
      2. API Documentation
        1. Endpoints

      Related MCP Servers

      • -
        security
        F
        license
        -
        quality
        An MCP server providing timezone conversions and time-related operations via RESTful API endpoints, featuring comprehensive error handling and timezone database integration.
        Last updated -
        Python
      • -
        security
        F
        license
        -
        quality
        A tutorial MCP server implementation that provides country information, demonstrating the Model Context Protocol for building AI-powered applications with external service integration capabilities.
        Last updated -
      • -
        security
        F
        license
        -
        quality
        A MCP server that uses Amap API to provide location-based services, allowing users to get geographic information based on IP addresses and search for nearby points of interest.
        Last updated -
        9
        Python
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        This MCP server enables interaction with the Open States API, allowing users to access legislative data from US state governments through natural language commands.
        Last updated -
        Python

      View all related MCP servers

      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/Pedrohmlara/countries-mcp'

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