Designed for deployment on Google Cloud Platform with automated deployment scripts and VM configuration for running the financial data server.
MCP-FinTechCo Server
A production-ready Model Context Protocol (MCP) server built with FastMCP 2.0, providing comprehensive financial technology and economic data tools.
Overview
MCP-FinTechCo is a powerful, scalable FinTech and economic data MCP server designed for real-world financial applications, algorithmic trading, portfolio management, market analysis, and economic research.
What is MCP? The Model Context Protocol is a standardized way to connect large language models (LLMs) to external tools and data sources. Think of it as "the USB-C port for AI" - it provides a uniform interface for AI applications to access financial data, execute functions, and interact with real-time market information.
Built on FastMCP 2.0, this server provides robust access to:
Real-time market data through the Alpha Vantage API (stock quotes, FX rates, crypto prices)
Comprehensive economic indicators through the Federal Reserve Economic Data (FRED) API
Technical analysis with built-in indicators (SMA, RSI)
Economic research tools with historical time series data
Key Features
FastMCP 2.0 Framework: Modern, production-ready MCP implementation optimized for financial and economic data
Alpha Vantage Integration: Comprehensive access to global financial markets
FRED API Integration: 400,000+ US and global economic indicators
Real-Time Market Data: Stock quotes, FX rates, and cryptocurrency prices
Economic Indicators: GDP, CPI, unemployment, and thousands more
Technical Analysis: Built-in indicators (SMA, RSI)
Cloud-Ready: Designed for deployment on Google Cloud Platform
Extensible Architecture: Easy to add new financial and economic tools
Tag-Based Discovery: All tools tagged for easy filtering and discoverability
Interactive Testing: CLI chat interface powered by Claude AI
Comprehensive Logging: Built-in monitoring and debugging capabilities
Financial Data Tools
Stock Market Tools
get_stock_quote
Get real-time stock quotes for any global equity.
Parameters:
symbol(string): Stock ticker symbol (e.g., "AAPL", "MSFT", "TSLA")
Returns:
get_stock_daily
Retrieve daily time series data (OHLCV - Open, High, Low, Close, Volume).
Parameters:
symbol(string): Stock ticker symboloutputsize(string): "compact" (100 days) or "full" (20+ years)
Returns: Historical daily price data with dates, OHLCV values
Technical Indicators
get_sma
Simple Moving Average - identifies trends and support/resistance levels.
Parameters:
symbol(string): Stock tickerinterval(string): "daily", "weekly", "monthly", or intraday ("1min", "5min", etc.)time_period(int): Number of data points (default: 20)series_type(string): "close", "open", "high", "low"
Returns: Time series of SMA values
get_rsi
Relative Strength Index - measures momentum and overbought/oversold conditions.
Parameters:
symbol(string): Stock tickerinterval(string): Time intervaltime_period(int): Lookback period (default: 14)series_type(string): Price type
Returns: RSI values (0-100 scale, >70 = overbought, <30 = oversold)
Foreign Exchange
get_fx_rate
Get real-time foreign exchange rates between any two currencies.
Parameters:
from_currency(string): Source currency code (e.g., "USD", "EUR", "GBP")to_currency(string): Target currency code (e.g., "JPY", "CHF", "AUD")
Returns:
Cryptocurrency
get_crypto_rate
Get real-time cryptocurrency exchange rates.
Parameters:
symbol(string): Crypto symbol (e.g., "BTC", "ETH", "DOGE")market(string): Market currency (default: "USD")
Returns: Real-time crypto price, bid/ask spread, and metadata
Utility Tools
get_city_weather
Get current weather information for any city (demonstration of extensibility).
Parameters:
city(string): City name (e.g., "New York", "London")
Returns: Temperature, humidity, wind speed, and conditions
Note: The weather tool demonstrates the server's extensibility beyond financial data. Future versions may include additional utility tools.
Economic Data Tools (FRED - Federal Reserve Economic Data)
The MCP server integrates with the Federal Reserve Economic Data (FRED) API, providing access to 400,000+ US and global economic indicators. These tools enable comprehensive economic analysis, research, and integration with financial applications.
Tags: economic-data, fred, indicator, time-series
FRED Series Search & Discovery
search_fred_series
Search for economic indicators in FRED database by keyword.
Parameters:
search_text(string): Keywords to search (e.g., "unemployment", "GDP", "inflation")search_type(string): "full_text" (default) or "series_id" for exact matcheslimit(integer): Max results (1-1000, default: 50)
Returns:
search_series_tags
(NEW) Discover categorization tags for economic series matching a search query.
Parameters:
search_text(string): Keywords to search (e.g., "inflation", "employment")limit(integer): Max tags (1-1000, default: 100)
Returns:
Use Cases:
Discover available tags to refine series searches
Understand how economic indicators are categorized
Find related series through tag exploration
search_series_related_tags
(NEW) Find tags related to a search when filtered by existing tags. Advanced exploration tool.
Parameters:
search_text(string): Keywords to searchtag_names(string): Semicolon-delimited tag names (e.g., "monthly;sa")limit(integer): Max related tags (1-1000, default: 100)
Returns: Related tags that commonly appear with the filter tags
Use Cases:
Iteratively refine searches by discovering relevant tag combinations
Explore how attributes (geography, frequency, seasonal adjustment) relate
Build sophisticated queries for specific indicator types
get_fred_releases
Get list of available FRED economic releases (CPI, Employment, GDP, etc.).
Parameters:
limit(integer): Max releases (1-1000, default: 50)
Returns: List of economic releases with metadata
get_series_updates
(NEW) Monitor which economic series have been recently updated.
Parameters:
start_time(string): Filter updates after this time (YYYY-MM-DD, optional)end_time(string): Filter updates before this time (YYYY-MM-DD, optional)limit(integer): Max series (1-1000, default: 100)
Returns:
Use Cases:
Track new economic data releases
Monitor data revisions for specific indicators
Build real-time dashboards with latest data
Create alert systems for important updates
FRED Release Management
get_release_info
(NEW) Get detailed information about a specific FRED economic data release.
Parameters:
release_id(integer): FRED release ID (e.g., 10, 50)
Returns:
Use Cases:
Understand scope and context of specific releases
Access official release documentation
Check for press releases with analysis
get_release_series
(NEW) Get all economic series included in a specific FRED release.
Parameters:
release_id(integer): FRED release IDlimit(integer): Max series (1-1000, default: 100)
Returns: List of all data series published together in the release
Use Cases:
Discover all indicators in major releases (e.g., Employment Situation)
Analyze comprehensive release coverage
Build dashboards tracking all components of a release
get_release_dates
(NEW) Get historical and upcoming release dates for FRED economic data.
Parameters:
release_id(integer): FRED release IDlimit(integer): Max dates (1-1000, default: 100)
Returns:
Use Cases:
Schedule monitoring for upcoming releases
Understand publication frequency patterns
Plan analysis around data release timing
Track historical release schedule
FRED Data Retrieval
get_economic_indicator
Get recent time series data for a specific economic indicator.
Parameters:
series_id(string): FRED series ID (e.g., "UNRATE", "GDP", "CPIAUCSL")start_date(string): Start date in YYYY-MM-DD format (optional)end_date(string): End date in YYYY-MM-DD format (optional)limit(integer): (NEW) Max recent observations (default: 20, max: 100000)
Returns:
Use Cases:
Quick check of current indicator values
Dashboard displaying latest data points
Recent trend analysis
Note: For comprehensive historical analysis with transformations, use get_series_observations instead.
get_series_metadata
Get detailed metadata for a FRED series.
Parameters:
series_id(string): FRED series ID
Returns: Title, units, frequency, seasonal adjustment, date ranges, popularity, notes
get_category_series
Get all economic series within a FRED category.
Parameters:
category_id(integer): FRED category ID (e.g., 12 for employment, 106 for production)limit(integer): Max series (1-1000, default: 50)
Returns:
get_series_observations
Get detailed observations with advanced filtering and transformations.
Parameters:
series_id(string): FRED series IDstart_date(string): Start date (YYYY-MM-DD, optional)end_date(string): End date (YYYY-MM-DD, optional)frequency(string): Aggregation - "d"(daily), "w"(weekly), "m"(monthly), "q"(quarterly), "a"(annual)units(string): Transformation - "lin"(levels), "chg"(change), "pch"(% change), "pca"(% change annual), "log"(log scale)
Returns: Observations with specified transformations applied
Use Cases:
Full historical analysis requiring transformations
Research requiring specific time periods
Calculating growth rates or changes
Economic forecasting and modeling
get_series_vintagedates
(NEW) Get vintage dates showing when a FRED series was revised or updated.
Parameters:
series_id(string): FRED series ID (e.g., "GDP", "UNRATE")limit(integer): Max vintage dates (1-10000, default: 100)
Returns:
Use Cases:
Study economic data revision patterns and magnitude
Research real-time vs. final data for forecasting analysis
Understand data reliability and revision frequency
Academic research on data quality and measurement
Track how initial estimates evolve over time
Note: Each vintage date represents a snapshot of the series at that point in time. Series like GDP are frequently revised as better data becomes available. ALFRED (Archival FRED) provides historical vintages for research.
Popular FRED Series IDs
Labor Market:
UNRATE- Unemployment Rate (%)PAYEMS- Total Nonfarm Payroll (Thousands)ICSA- Initial Claims
Inflation:
CPIAUCSL- Consumer Price Index (All Urban Consumers)CPILFESL- Core CPI (Excluding Food & Energy)DFEDTARU- Federal Funds Rate
GDP & Output:
GDP- Real Gross Domestic Product (Billions)GDPC1- Real GDP per CapitaINDPRO- Industrial Production Index
Interest Rates:
FEDFUNDS- Effective Federal Funds Rate (%)DGS10- 10-Year Treasury Constant Maturity RateDGS2- 2-Year Treasury Rate
Housing:
MORTGAGE30US- 30-Year Mortgage RateHOUST- Housing Starts (Thousands)
Installation
Prerequisites
Python 3.11 or higher
pip (Python package manager)
Git
Alpha Vantage API key (free at https://www.alphavantage.co/support/#api-key)
FRED API key (free at https://fred.stlouisfed.org/docs/api/api_key.html)
Local Setup
Clone the repository:
Create and activate a virtual environment:
Windows:
Linux/Mac:
Install dependencies:
Configure environment variables:
Edit .env and add your API keys:
Run the server:
Usage
Running the Server
Local Development:
With Custom Configuration:
Testing the Server
Automated Test Suite:
This runs automated tests to validate server functionality.
Interactive Chat Test Utility:
This launches an advanced interactive chat interface powered by Claude AI for comprehensive testing of MCP server capabilities. See CHAT_TEST_USAGE.md for detailed usage instructions.
Features:
Natural language conversation with Claude AI
Automatic tool detection and execution
Beautiful terminal UI with the
richlibraryReal-time MCP server tool testing
Visual differentiation between Claude and MCP responses
Requirements for chat_test.py:
Add
ANTHROPIC_API_KEYto your.envfileEnsure
richandanthropicpackages are installed
Project Structure
Configuration
The server uses environment variables for configuration. See .env.sample for all available options.
Key Environment Variables
Variable | Description | Default |
| Alpha Vantage API key (required for market data) | - |
| FRED API key (required for economic data) | - |
| Claude API key (required for chat_test.py) | - |
| Server name | mcp-fintechco-server |
| Server version | 1.0.0 |
| Server port | 8000 |
| Logging level | INFO |
| Environment name | development |
Development
Adding New Financial Tools
All financial tools follow a consistent pattern separating implementation from the MCP wrapper. This allows direct testing through chat_test.py while maintaining MCP server compatibility.
Implementation Pattern:
Create an
asyncimplementation function with_implsuffixCreate an MCP tool wrapper using
@mcp.tool()decorator that calls the implementationInclude comprehensive docstrings with parameters and examples
Implement error handling and logging
Update this README with tool documentation
Update
chat_test.pyto import and use the_implfunctionAdd tests in
test_client.py
Example:
Why This Pattern?
The
@mcp.tool()decorator createsFunctionToolobjects that can't be called directlySeparating implementation allows
chat_test.pyto execute tools for interactive testingMCP server exposes the decorated versions to clients
Same business logic, two access patterns
Testing
Run the automated test suite:
For interactive testing with Claude AI:
Deployment
See DEPLOYMENT.md for detailed instructions on deploying to Google Cloud Platform.
Quick Deployment
This script automates the deployment process to GCP.
API Rate Limits
Alpha Vantage Free Tier:
25 API requests per day
5 API requests per minute
For production use, consider upgrading to a premium plan
FRED API:
120 API requests per minute (shared across all IP addresses)
1 API request per second per IP address
Unlimited daily requests
Free API key registration required
For production use with high demand, consider staggering requests or using batch endpoints.
Use Cases & Combined Analysis Examples
Integrated Market-Economics Analysis
The true power of this MCP server lies in combining real-time market data (Alpha Vantage) with comprehensive economic indicators (FRED) for deeper insights:
Example 1: Employment Report Impact Analysis
Combines: get_economic_indicator(PAYEMS) + get_stock_daily(AAPL) + get_rsi(AAPL)
Example 2: Interest Rate and Currency Correlation
Combines: get_fx_rate(USD, EUR) + get_series_observations(FEDFUNDS)
Example 3: Inflation and Purchasing Power Analysis
Combines: get_economic_indicator(CPIAUCSL) + get_stock_daily(QQQ) + get_series_observations(CPIAUCSL, units=pch)
Example 4: Fed Policy and Cryptocurrency Response
Combines: get_crypto_rate(BTC) + get_series_observations(FEDFUNDS) + get_economic_indicator(FEDFUNDS)
Example 5: Real Estate Market Conditions
Combines: get_category_series(266) (housing) + get_stock_quote(XHB) + get_economic_indicator(MORTGAGE30US)
Example 6: Sector Rotation Based on Economic Cycles
Combines: get_economic_indicator(UNRATE) + get_rsi(QQQ) + get_rsi(IYJ)
Example 7: Leading Indicators for Market Timing
Combines: search_fred_series(leading indicators) + get_series_observations(ICSA) + get_rsi(SPY)
Traditional Use Cases
Algorithmic Trading
Real-time market data for trading algorithms
Technical indicators (SMA, RSI) for signal generation
Historical data for backtesting strategies
Economic data as macro filters for trade entry/exit
Portfolio Management
Multi-asset portfolio tracking with real-time quotes
Monitor economic health (GDP, unemployment) for portfolio rebalancing
Use interest rates to model bond/equity allocation
Risk analysis with technical indicators
Market Research & Analysis
Historical price analysis combined with economic context
Trend identification with SMA during different economic cycles
Momentum analysis (RSI) vs economic expansion/contraction phases
Understand market behavior during Fed policy changes
Economic Research & Forecasting
Discover leading indicators that predict market downturns
Analyze stock sector performance during economic cycles
Monitor inflation impact on different asset classes
Track currency movements vs monetary policy changes
Financial Applications
Stock screeners that filter by technical indicators
Trading dashboards that overlay economic data with price charts
Investment analysis tools combining valuation with macro conditions
Market data APIs for fintech startups
Educational platforms showing market-economics relationships
Troubleshooting
Common Issues
API Key Errors:
Verify
ALPHA_VANTAGE_API_KEYis set in.envCheck that your API key is valid
Ensure you haven't exceeded rate limits
Server won't start:
Verify Python version:
python --version(should be 3.11+)Check dependencies:
pip install -r requirements.txtVerify .env configuration
Invalid Symbol Errors:
Use correct ticker symbols (e.g., "AAPL" not "Apple")
Check that the symbol is traded on a supported exchange
Verify market hours for real-time data
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes with tests
Submit a pull request
Resources
License
This project is licensed under the MIT License. See LICENSE file for details.
Support
For issues, questions, or contributions:
Open an issue on GitHub
Check existing documentation
Review FastMCP and Alpha Vantage documentation
Roadmap
Upcoming Features
Additional Technical Indicators: EMA, MACD, Bollinger Bands, Stochastic Oscillator
Company Fundamentals: Earnings, balance sheets, income statements
Options Data: Real-time options chains and Greeks
News Sentiment: Financial news and sentiment analysis
Sector Performance: Industry and sector analytics
Screeners: Custom stock screening capabilities
Backtesting Tools: Historical strategy testing utilities
Risk Metrics: VaR, Sharpe ratio, beta calculations
Multi-Exchange Support: International market data
WebSocket Streaming: Real-time data feeds
Acknowledgments
Built with FastMCP 2.0
Financial market data from Alpha Vantage
Economic data from Federal Reserve Economic Data (FRED)
Weather data from Open-Meteo (utility example)
Deployed on Google Cloud Platform
Interactive testing powered by Anthropic's Claude AI
Tool tagging and discoverability improvements for enhanced usability
Version: 2.1.0 Last Updated: 2025-11-03 Primary Focus: Financial Technology & Market Data
Latest Enhancements (v2.1.0):
Added 7 new FRED tools for tag-based discovery, release management, and data revision tracking
Enhanced
get_economic_indicatorwith configurable observation limitImproved all FRED tool docstrings with use cases and cross-references
Comprehensive test coverage for all new tools
FRED API coverage increased from 16% to 35%
This server cannot be installed