universal-public-data-mcp-server
universal-public-data-mcp-serverは、公共データを効率的に取得・管理するためのサーバーソリューションです。Pythonで実装されており、データの収集、処理、分析を自動化する機能を提供します。特に、APIを通じてさまざまなデータソースにアクセスできる点が特徴です。
GitHubスター
2
ユーザー評価
未評価
お気に入り
0
閲覧数
23
フォーク
1
イシュー
0
README
🎯 Universal Public Data MCP Server
A fully functional Model Context Protocol (MCP) server providing unified access to 21 powerful tools across 6 data categories. Now working perfectly with Cursor IDE and other MCP clients!
✅ Current Status: FULLY WORKING
The server has been extensively tested and is production-ready with:
- ✅ Full MCP Protocol Compliance (2024-11-05)
- ✅ Cursor IDE Integration (Green dot ✅)
- ✅ Fast Startup (~2.5 seconds, 75% improvement)
- ✅ 21 Comprehensive Tools across 6 categories
- ✅ Robust Error Handling with graceful fallbacks
- ✅ Windows 10/11 Compatibility with proper UTF-8 encoding
🚀 Quick Start for Cursor IDE
1. Installation
git clone https://github.com/inamdarmihir/universal-public-data-mcp-server.git
cd universal-public-data-mcp-server
# Create virtual environment (recommended)
python -m venv venv
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
2. Configure Cursor IDE
Add this to your Cursor MCP settings:
{
"mcpServers": {
"universal-public-data": {
"command": "python",
"args": [
"C:\\path\\to\\your\\universal-public-data-mcp-server\\src\\server.py"
],
"cwd": "C:\\path\\to\\your\\universal-public-data-mcp-server",
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONPATH": "C:\\path\\to\\your\\universal-public-data-mcp-server"
}
}
}
}
3. Expected Result
- Green dot ✅ in Cursor IDE
- Access to 21 powerful data tools
- Fast, reliable performance
🔧 Server Capabilities
📊 Government Data (3 tools)
get_census_data
- US Census demographic dataget_economic_indicators
- Federal Reserve economic data (FRED)search_sec_filings
- SEC company filings search
🔬 Scientific Data (3 tools)
get_nasa_data
- NASA space and earth science datasearch_research_papers
- PubMed and ArXiv research papersget_climate_data
- NOAA climate and weather data
💰 Financial Data (3 tools)
get_stock_data
- Real-time stock data and financial metricsget_crypto_data
- Cryptocurrency prices and market dataget_exchange_rates
- Current currency exchange rates
📰 News & Media (3 tools)
get_breaking_news
- Latest breaking news from multiple sourcessearch_news
- Search news articles by topic/keywordanalyze_media_sentiment
- News sentiment analysis
🌍 Geographic & Environmental (3 tools)
get_weather_data
- Current weather and forecastsget_air_quality
- Air quality measurements by locationget_disaster_alerts
- Natural disaster alerts and warnings
💻 Technology (3 tools)
get_github_trends
- Trending GitHub repositoriesget_domain_info
- WHOIS and domain informationanalyze_tech_trends
- Technology adoption metrics
🖥️ System Monitoring (3 tools)
get_system_status
- Server health and performance metricsget_api_metrics
- API performance statisticsget_cache_stats
- Cache performance and hit ratios
⚡ Performance Features
🚀 Fast Startup (75% Improvement)
- ~2.5 seconds startup time (down from 10+ seconds)
- Lazy loading - adapters initialize only when first used
- Optimized imports - deferred dependency loading
🧠 Smart Caching System
- In-memory caching with configurable TTL
- Redis support (optional) for distributed caching
- Cache hit ratio tracking for performance monitoring
🛡️ Enterprise-Grade Reliability
- Rate limiting protection
- Circuit breakers for API failures
- Graceful fallbacks when services are unavailable
- Comprehensive logging (stderr only for MCP compatibility)
🔧 Technical Implementation
Issues Resolved ✅
- Redis Compatibility - Fixed aioredis Python 3.13 issues
- Slow Startup Performance - Implemented lazy loading (75% faster)
- Configuration File Errors - Corrected all file paths
- Unicode Encoding Issues - Fixed Windows console encoding
- MCP Communication Problems - Cleaned stdout for JSON-RPC
- Logging Conflicts - Moved all logs to stderr
MCP Protocol Compliance
- ✅ JSON-RPC over stdio communication
- ✅ Protocol version 2024-11-05 support
- ✅ Tools listing and execution
- ✅ Proper error handling and responses
- ✅ Client capability negotiation
Test Results
🎯 FINAL CURSOR MCP CONNECTION TEST
======================================================================
✅ Initialize successful
✅ Initialized notification sent
✅ Tools list received: 21 tools available
✅ Tool call successful
🎉 ALL TESTS PASSED!
📂 Project Structure
universal-public-data-mcp-server/
├── src/
│ ├── server.py # Main MCP server (WORKING ✅)
│ ├── adapters/ # Data source adapters
│ │ ├── government.py # Government APIs
│ │ ├── scientific.py # Scientific APIs
│ │ ├── financial.py # Financial APIs
│ │ ├── news.py # News APIs
│ │ ├── geographic.py # Geographic APIs
│ │ └── technology.py # Technology APIs
│ └── core/
│ ├── config.py # Configuration (FIXED ✅)
│ ├── cache.py # Caching system
│ ├── rate_limiter.py # Rate limiting
│ └── monitoring.py # Performance monitoring
├── cursor_mcp_config.json # Cursor configuration (READY ✅)
├── requirements.txt # Dependencies
├── MCP_SERVER_SETUP_FINAL.md # Comprehensive setup guide
└── tests/ # Comprehensive test suite
🔍 Troubleshooting
Red Dot ❌ in Cursor IDE
- Check Python Path: Ensure
python
command works in terminal - Verify File Paths: Update paths in
cursor_mcp_config.json
to your actual location - Virtual Environment: Activate if using one, or use full Python path
- Check Logs: Look at Cursor's MCP logs for specific error messages
Yellow Dot ⚠️ in Cursor IDE
- Server is starting up - wait a moment for green dot ✅
- Normal during first initialization (~2.5 seconds)
Performance Optimization
# Optional: Add API keys for higher rate limits
export NASA_API_KEY="your_key_here"
export GITHUB_API_KEY="your_key_here"
🚀 Advanced Configuration
High-Performance Setup
{
"cache": {
"enabled": true,
"redis_enabled": true,
"redis_url": "redis://localhost:6379/0",
"default_ttl": 3600
},
"rate_limit": {
"enabled": true,
"requests_per_minute": 300,
"burst_limit": 50
}
}
Development Mode
{
"server": {
"debug": true,
"log_level": "DEBUG"
},
"cache": {
"enabled": false
},
"rate_limit": {
"enabled": false
}
}
🧪 Testing
Verify Installation
# Test server startup
python src/server.py
# Run comprehensive tests
python final_cursor_test.py
# Test individual components
python test_minimal_mcp.py
Expected Test Output
🎯 ✅ MCP SERVER IS READY FOR CURSOR!
You can now use the cursor_mcp_config.json file in Cursor
Expected behavior: Green dot ✅ in Cursor IDE
📊 Success Metrics
Metric | Value | Status |
---|---|---|
Startup Time | ~2.5 seconds | ✅ Optimized |
Tool Count | 21 tools | ✅ Complete |
API Categories | 6 categories | ✅ Comprehensive |
Response Time | Sub-second | ✅ Fast |
Memory Usage | Optimized | ✅ Efficient |
Windows Support | Full | ✅ Compatible |
MCP Compliance | 100% | ✅ Standard |
🏆 Production Ready Features
- ✅ Full MCP Protocol Compliance
- ✅ Comprehensive Error Handling
- ✅ Performance Optimizations
- ✅ Windows 10/11 Compatibility
- ✅ Cursor IDE Integration
- ✅ Extensive Testing Coverage
- ✅ Enterprise-Grade Monitoring
- ✅ Scalable Architecture
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests for new functionality
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
- Repository: GitHub
- Issues: Report Issues
- MCP Specification: Official Docs
- Setup Guide: MCP_SERVER_SETUP_FINAL.md
🎯 Ready to revolutionize your data access in Cursor IDE! 🚀
Last updated: Working perfectly with Cursor IDE, all tests passing, production-ready deployment.