MCP Multi-API Server
Used for configuration management, allowing the server to load API keys and other environment variables from a .env file
Version control system used for cloning the repository
Platform hosting the repository that needs to be cloned during installation
Required runtime environment for the MCP server, version 18+ needed to run the application
Package manager used for installing dependencies and running scripts for the MCP server
Programming language used for implementing the server with type safety
Alternative package manager that can be used instead of npm for dependency management
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Multi-API Serverget weather in Tokyo and stock price for Tesla"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Multi-API Server ๐
A Model Context Protocol (MCP) server that bridges AI/LLMs with multiple real-world APIs including weather, finance, and news services. This server acts as a standardized interface, allowing any MCP-compatible AI application to seamlessly interact with external APIs without custom integration work.
๐ Features
Multi-API Support: Weather (OpenWeatherMap), Finance (Alpha Vantage), News (NewsAPI)
MCP Protocol Compliant: Full implementation of Anthropic's MCP standard
Intelligent Caching: Configurable TTL-based caching to reduce API calls
Rate Limiting: Built-in rate limiting to respect API quotas
Comprehensive Logging: Winston-based logging with multiple transports
Error Handling: Robust error handling with meaningful error messages
TypeScript: Fully typed for better developer experience
Related MCP server: MCP-Server
๐ Prerequisites
Node.js 18+
npm or yarn
API keys for:
๐ ๏ธ Installation
Clone the repository:
git clone https://github.com/yourusername/mcp-multi-api-server.git
cd mcp-multi-api-serverInstall dependencies:
npm installCopy the environment template and add your API keys:
cp .env.example .envEdit
.envand add your API keys:
OPENWEATHER_API_KEY=your_key_here
ALPHA_VANTAGE_API_KEY=your_key_here
NEWS_API_KEY=your_key_hereBuild the project:
npm run build๐ Usage
Starting the Server
npm startFor development with auto-reload:
npm run dev๐๏ธ Architecture
src/
โโโ index.ts # Entry point & MCP server setup
โโโ api/ # API client implementations
โโโ tools/ # MCP tool definitions
โโโ utils/ # Utilities (cache, rate limiter, logger)
โโโ types/ # TypeScript type definitionsโ๏ธ Configuration
Environment Variables
Variable | Description | Default |
| OpenWeatherMap API key | Required |
| Alpha Vantage API key | Required |
| NewsAPI key | Required |
| Server port | 3000 |
| Logging level | info |
| Weather cache TTL (seconds) | 300 |
| Finance cache TTL (seconds) | 60 |
| News cache TTL (seconds) | 600 |
| Rate limit requests | 100 |
| Rate limit window (ms) | 60000 |
๐งช Testing
Run the test script:
npm testUsing MCP Inspector (Visual Testing)
# Install MCP Inspector globally
npm install -g @modelcontextprotocol/inspector
# Run the inspector
mcp-inspector node dist/index.jsThis opens a web interface at http://localhost:5173 where you can:
See all available tools
Test tool calls interactively
View request/response logs
Manual STDIO Testing
# Start the server
node dist/index.js
# Run the test script
node dist/test-runner.js
## Testing Individual APIs
### Test Weather API
```bash
# Create a test file: test-weather.ts
import { getCurrentWeather, getWeatherForecast } from './src/api/weather.js';
async function testWeather() {
try {
console.log('Testing current weather...');
const current = await getCurrentWeather('London');
console.log('Current weather:', current);
console.log('\nTesting forecast...');
const forecast = await getWeatherForecast('Paris', 3);
console.log('Forecast:', forecast);
} catch (error) {
console.error('Error:', error);
}
}
testWeather();Run:
npx tsx test-weather.tsTest Finance API
import { getStockQuote, getCurrencyExchange } from './src/api/finance.js';
async function testFinance() {
try {
console.log('Testing stock quote...');
const stock = await getStockQuote('AAPL');
console.log('Stock:', stock);
console.log('\nTesting currency exchange...');
const exchange = await getCurrencyExchange('USD', 'EUR');
console.log('Exchange:', exchange);
} catch (error) {
console.error('Error:', error);
}
}
testFinance();Test News API
# Create a test file: test-news.ts
import { getTopHeadlines, searchNews } from './src/api/news.js';
async function testNews() {
try {
console.log('Testing headlines...');
const headlines = await getTopHeadlines('us', 'technology');
console.log('Headlines:', headlines);
console.log('\nTesting search...');
const search = await searchNews('artificial intelligence');
console.log('Search results:', search);
} catch (error) {
console.error('Error:', error);
}
}
testNews();
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Discover and call 10,000+ production APIs from one MCP server. Pay-per-call billing for AI agents.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) Server that provides unified access to multiple external APIs (weather, news, financial data) through a single, consistent interface for AI agents and LLMs.1-
- AlicenseNot gradedqualityDmaintenanceA lightweight bridge connecting LLMs to real-world APIs like finance, weather, news, and GitHub through Anthropic's Model Context Protocol, enabling unified access and intelligent query routing.2 npmMIT
- AlicenseNot gradedqualityCmaintenanceA unified MCP server providing AI agents with 40+ developer APIs including geolocation, crypto prices, DNS lookup, and web scraping. Enables natural language access to various tools through a single gateway.1MIT
- AlicenseNot gradedqualityDmaintenanceA bridge that enables any LLM to access and interact with documented REST APIs through the Model Context Protocol (MCP).2 npm6MIT