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/current
returns static weather data (Tbilisi, 22°C, Clear) - MCP Server: Exposes a
getCurrentWeather
tool 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
getCurrentWeather
tool 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.md
for full coding and architecture guidelines.