Countries MCP Server
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
Install dependencies:
npm installAdd a
.envfile in the root directory as .example shows
Running the Application
Development Mode
npm run devProduction Mode
Build the application:
npm run buildStart the server:
npm startUsing Docker
Build and run using Docker Compose:
docker-compose up --buildAPI Documentation
Endpoints
POST /mcp
Main endpoint for MCP communication.
Headers:
Accept: application/json, text/event-streammcp-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-idheader
Subsequent Requests:
Include the session ID received from the initial request
Maintains the session context for continued interaction
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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