Gujejiani/mcp-server
3.1
If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project is a Clean Architecture Node.js/TypeScript application that provides weather information through a REST API and the Model Context Protocol (MCP) for integration with LLM agents.
Tools
1
Resources
0
Prompts
0
Weather API & MCP Server
This project is a Clean Architecture Node.js/TypeScript application that exposes weather information via both a REST API and the Model Context Protocol (MCP) for LLM agent integration.
Features
- REST API:
/weather/currentreturns static weather data (Tbilisi, 22°C, Clear) - MCP Server: Exposes a
getCurrentWeathertool for LLM agents via stdio - Clean Architecture: Domain, Application, Infrastructure, and API layers
- Structured Logging: Pino logger, contextual fields, no sensitive data
- Dependency Injection: Typedi
- TypeScript, ESLint, Prettier: Enforced code quality
Project Structure
<repo>
├── src/
│ ├── api/ # Express REST API, controllers, routes
│ ├── application/ # Use cases, interfaces
│ ├── domain/ # Models, errors
│ ├── infrastructure/# DB/API implementations
│ └── mcpServer.ts # MCP server entry point
├── tests/ # Unit and integration tests
├── package.json
├── tsconfig.json
└── README.md
Running the REST API
npm run build
npm start
# Visit http://localhost:3000/weather/current
Running the MCP Server (for LLM agents)
MCP_MODE=true npm run dev
- The MCP server will start in stdio mode.
- Connect an LLM agent (e.g., Claude Desktop, MCP Inspector) with the launch command:
MCP_MODE=true node dist/api/server.js - The agent can call the
getCurrentWeathertool with{ city: "Tbilisi" }.
Tool Example
- Tool Name:
getCurrentWeather - Input:
{ city: string } - Output:
{ "temperature_c": 22, "condition": "Clear", "city": "Tbilisi", "timestamp": "2025-05-12T12:00:00.000Z" }
Notes
- All logs are sent to stderr to avoid interfering with MCP protocol messages.
- Weather data is static for demonstration. Replace with real API integration as needed.
- See
copilot-instructions.mdfor full coding and architecture guidelines.