Rushhaabhhh/MCP-Server
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.
The Model Context Protocol (MCP) Server is a lightweight, standardized bridge that connects Claude and other LLMs to real-world APIs through Anthropic's Model Context Protocol (MCP).
Model Context Protocol (MCP) Server
This project is a lightweight, standardized bridge that connects Claude and other LLMs to real-world APIs through Anthropic's Model Context Protocol (MCP). This server enables seamless integration between AI applications and external data sources without requiring custom integration work for each API.
Project Overview
The MCP Server implements Anthropic's open standard protocol to expose multiple API capabilities (tools, resources, and prompts) through a unified interface. This allows any MCP-compatible AI application to interact with various external services including financial data, weather information, news feeds, and GitHub repositories.
Postman Collection : Postman Colletion Link
Video not included as the OpenAI API key became invalid before the loom video could be recorded
Architecture
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā Claude/LLM āāāāāŗā MCP Server āāāāāŗā External APIs ā
ā Application ā ā (This Project) ā ā ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāā
ā API Handlers ā
ā āāāāāāāāāāāāāāā ā
ā ā Finance API ā ā
ā ā Weather API ā ā
ā ā News API ā ā
ā ā GitHub API ā ā
ā āāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāā
Features
Multi-API Support
- Financial Data: Real-time stock prices, market data, and financial analytics
- Weather Services: Current conditions, forecasts, and weather alerts
- News Integration: Latest news articles, headlines, and content aggregation
- GitHub Integration: Repository data, commits, issues, and developer statistics
MCP Protocol Implementation
- Standardized tool exposure through MCP specification
- Resource management for external API data
- Prompt templates for common API interactions
- Unified request/response handling
Intelligent Request Routing
- Mixed Prompt Handler (
/mcp
): Processes complex queries spanning multiple APIs - Dedicated Endpoints: Individual API access points for specific use cases
- Smart routing based on user intent and query analysis
Performance & Reliability
- Caching Strategies: Redis-based caching for frequently accessed data
- Rate Limiting: Built-in protection against API quota exhaustion
- Error Handling: Robust error recovery and graceful degradation
- Comprehensive Logging: Detailed request/response logging for debugging
Developer Experience
- Simple JSON-based request format
- Consistent API responses across all endpoints
- TypeScript implementation for type safety
- Comprehensive documentation and examples
Tech Stack
Core Technologies
- Node.js with TypeScript: Server runtime and type safety
- Express.js: Web framework and routing
- MCP Protocol: Anthropic's standardized AI-API bridge specification
External API Integrations
- Financial APIs: Yahoo Finance
- Weather APIs: OpenWeatherMap
- News APIs: NewsAPI
- GitHub API: GitHub Personal Access Token (PAT)
Infrastructure
- Redis: Caching layer for performance optimization
- Docker: Containerization for easy deployment
- Prometheus: Metrics collection and monitoring
- Grafana: Visualizes the metrics collected by Prometheus
Project Structure
src/
āāā mcpHandler/ # MCP protocol handlers
ā āāā financeHandler.ts
ā āāā githubHandler.ts
ā āāā mcpHandler.ts # Mixed prompt processor
ā āāā newsHandler.ts
ā āāā weatherHandler.ts
āāā routes/ # API route definitions
ā āāā financeRoute.ts
ā āāā githubRoute.ts
ā āāā mcpRoute.ts # Main MCP endpoint
ā āāā newsRoute.ts
ā āāā weatherRoute.ts
āāā services/ # External API service clients
ā āāā financeService.ts
ā āāā githubService.ts
ā āāā mcpService.ts
ā āāā newsService.ts
ā āāā openai.ts
ā āāā weatherService.ts
āāā utils/
ā āāā redis.ts # Redis configuration
āāā index.ts # Application entry point
API Endpoints
Mixed Prompt Handler
POST /mcp
Processes complex queries that may require data from multiple APIs.
Individual API Endpoints
POST /news - News and article queries
POST /github - GitHub repository and developer data
POST /weather - Weather conditions and forecasts
POST /finance - Financial data and market information
Request Format
All endpoints accept a simple JSON payload:
{
"userMessage": "Your query or request here"
}
Running locally
The entire system can be run locally with a single command using Docker Compose.
# Build and run with Docker Compose
docker-compose up --build
# Run specific services
docker-compose up redis mcp-server
Configuration
Environment Variables
# Server Configuration
PORT=3000
# Redis Configuration
REDIS_URL=redis://localhost:6379
# API Keys
OPENAI_API_KEY=your_openai_key
ALPHA_VANTAGE_API_KEY=your_finance_key
WEATHER_API_KEY=your_weather_key
NEWS_API_KEY=your_news_key
GITHUB_TOKEN=your_github_token
Usage Examples
Financial Data Query
curl -X POST http://localhost:3000/finance \
-H "Content-Type: application/json" \
-d '{"userMessage": "What is the current price of AAPL stock?"}'
Mixed Query (Multiple APIs)
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"userMessage": "What is the weather like in New York and what are the latest tech news?"}'
GitHub Repository Analysis
curl -X POST http://localhost:3000/github \
-H "Content-Type: application/json" \
-d '{"userMessage": "Show me the latest commits in the React repository"}'