RL-MCP

RL-MCP

A Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.

Category
访问服务器

README

🚀 RL-MCP: Ryan's Model Context Protocol Server

Python FastAPI PostgreSQL Docker

🎯 A powerful, scalable Model Context Protocol (MCP) server built with modern Python technologies

🌟 What is RL-MCP?

RL-MCP is a robust Model Context Protocol server designed to provide AI models with structured access to external data and services. Think of it as a bridge 🌉 that allows AI assistants to interact with your applications, databases, and APIs in a standardized, secure way.

🎪 Current Features

  • 🔐 Secure Authentication - Built-in auth system to protect your endpoints
  • 📊 RESTful API - Clean, well-documented API endpoints with FastAPI
  • 🗄️ PostgreSQL Integration - Robust database layer with SQLModel/SQLAlchemy
  • 🐳 Docker Ready - Fully containerized development and deployment
  • 🔄 Database Migrations - Alembic-powered schema management
  • 📈 Health Monitoring - Built-in health checks and connection monitoring
  • 🎨 Interactive Docs - Auto-generated API documentation
  • 🛠️ Development Tools - Pre-commit hooks, linting, and formatting

📈 Stock Market Intelligence

🚀 Transform your applications with AI-powered financial intelligence

RL-MCP includes a comprehensive Stock Market Intelligence API that combines cutting-edge AI with real-time financial data:

🧠 AI-Powered Capabilities

  • 🔍 Vector Search: Semantic search across news, analysis, and market data using advanced NLP
  • 📊 Sentiment Analysis: Real-time sentiment scoring for news and market content
  • 🤖 Smart Analysis: AI-driven stock analysis with confidence scoring and recommendations
  • 🎯 Relevance Scoring: Intelligent content ranking and filtering

💹 Real-Time Market Data

  • 📈 Live Pricing: Current stock prices with change indicators and market metrics
  • 📰 News Intelligence: Latest financial news with sentiment analysis from multiple sources
  • 🌍 Market Overview: Comprehensive market summaries with top movers and trends
  • 🔥 Trending Analysis: Most active and discussed stocks based on data volume

High-Performance Architecture

  • 🚀 Intelligent Caching: Multi-layer caching for lightning-fast responses
  • 🔄 Background Processing: Async data ingestion and processing
  • 📊 Performance Monitoring: Built-in health checks and cache statistics
  • 🛡️ Enterprise-Ready: Secure, scalable, and production-ready

🎯 Use Cases

  • 🤖 AI Trading Assistants - Portfolio analysis and trading signals
  • 📊 Financial Research - Market research and competitive intelligence
  • 📱 Investment Apps - Smart notifications and educational content
  • 🏢 Enterprise Systems - Risk management and client reporting

📚 Comprehensive Documentation

Explore our detailed stock market API documentation:

🚀 Future Vision

This MCP server is designed to be the foundation for AI-powered applications that need:

  • 🤖 AI Model Integration - Seamless connection between AI models and your data
  • 🔌 Plugin Architecture - Extensible system for adding new capabilities
  • 📡 Real-time Communication - WebSocket support for live data streaming
  • 🌐 Multi-tenant Support - Serve multiple clients with isolated data
  • 🔍 Advanced Search - Vector search and semantic querying capabilities
  • 📊 Analytics Dashboard - Monitor usage, performance, and insights

🛠️ Technology Stack

  • 🐍 Backend: Python 3.12 + FastAPI
  • 🗄️ Database: PostgreSQL with SQLModel
  • 🐳 Containerization: Docker + Docker Compose
  • 🔄 Migrations: Alembic
  • 🧪 Code Quality: Black, isort, pylint, pre-commit hooks
  • 📚 Documentation: Auto-generated OpenAPI/Swagger docs
  • 🧠 AI/ML: Sentence Transformers, Vector Search, Sentiment Analysis

🚀 Quick Start

Prerequisites

  • 🐳 Docker and Docker Compose
  • 🐍 Python 3.12+ (for local development)
  • 🍺 Homebrew (macOS) or equivalent package manager

🎯 One-Command Setup

Get up and running in seconds! Our setup script handles everything:

make setup-environment

This magical command will:

  • 🔧 Install all required dependencies
  • 🐍 Create and configure a Python virtual environment
  • 🐳 Set up Docker containers
  • 📦 Install all Python packages
  • ✅ Verify everything is working

🏃‍♂️ Running the Application

🐳 Docker Development (Recommended)

# Build and start all services
make up

# Or run in background
docker compose up -d

Your services will be available at:

  • 🌐 API Server: http://localhost:8000
  • 📚 API Docs: http://localhost:8000/docs
  • 📈 Stock API: http://localhost:8000/v1/stock
  • 🗄️ Database Admin: http://localhost:8080 (Adminer)

🐍 Local Development

# Activate virtual environment
source venv/bin/activate

# Start the api and db at port 8000
make up

📖 API Documentation

Once running, explore the interactive API documentation:

  • 📊 Swagger UI: http://localhost:8000/docs
  • 📋 ReDoc: http://localhost:8000/redoc
  • 🔍 OpenAPI Spec: http://localhost:8000/openapi.json

🔑 Authentication

All API endpoints require authentication. Include your auth token in requests:

curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8000/v1/item

📈 Stock API Quick Example

# Search for Tesla battery technology insights
curl -X POST "http://localhost:8000/v1/stock/search" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Tesla battery technology innovations",
    "symbols": ["TSLA"],
    "similarity_threshold": 0.8,
    "limit": 10
  }'

# Get current Apple stock price
curl -H "Authorization: Bearer YOUR_TOKEN" \
     "http://localhost:8000/v1/stock/price/AAPL"

# Get market summary
curl -H "Authorization: Bearer YOUR_TOKEN" \
     "http://localhost:8000/v1/stock/market/summary"

🗄️ Database Management

🔄 Creating Migrations

When you modify database models:

MSG="Add new awesome feature" make migration

🏗️ Database Commands

# Start the api and db at port 8000
make up

# Check database health
curl http://localhost:8000/health

🛠️ Development Workflow

📦 Managing Dependencies

# Regenerate requirements.txt with latest versions
make regen-requirements

🧹 Cleanup

# Remove all containers and volumes
make clean

🔍 Code Quality

Pre-commit hooks automatically run:

  • 🎨 Black - Code formatting
  • 📋 isort - Import sorting
  • 🔍 Pylint - Code linting

🏗️ Project Structure

rl-mcp/
├── 📁 app/                    # Main application code
│   ├── 📁 api/               # API layer
│   │   └── 📁 v1/           # API version 1
│   │       ├── 📁 base/     # Base models and tables
│   │       ├── 📁 item/     # Item management endpoints
│   │       └── 📁 stock/    # 📈 Stock market intelligence
│   │           ├── 📁 services/  # AI services (vector search, market data)
│   │           ├── 📄 routes_stock.py     # Stock API endpoints
│   │           ├── 📄 models_stock.py     # Data models
│   │           └── 📄 controllers_stock.py # Business logic
│   ├── 📁 databases/        # Database configuration
│   └── 📄 main.py          # Application entry point
├── 📁 docs/                 # 📚 Comprehensive documentation
│   └── 📁 stock/           # Stock API documentation
├── 📁 docker/               # Docker configurations
├── 📁 migrations/           # Database migrations
├── 📁 scripts/             # Utility scripts
├── 📁 utilities/           # Helper utilities
└── 📄 Makefile            # Development commands

🤝 Contributing

We welcome contributions! 🎉

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch
  3. ✨ Make your changes
  4. 🧪 Run tests and linting
  5. 📝 Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

Having issues? 🤔


<div align="center">

🚀 Built with ❤️ for the future of AI-powered applications

Ready to revolutionize how AI models interact with your data? Let's build something amazing together!

📈 Featuring comprehensive stock market intelligence with AI-powered semantic search, real-time data, and intelligent caching 🤖💹

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选