the-great-abby
MCP Serverthe-great-abbypublic

test_mcp_client

基于WebSocket的实时聊天应用,使用FastAPI、PostgreSQL和Redis构建。

Repository Info

0
Stars
0
Forks
0
Watchers
1
Issues
Python
Language
-
License

About This Server

基于WebSocket的实时聊天应用,使用FastAPI、PostgreSQL和Redis构建。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Chat Client

Onboarding Complete AI-IDE Ready Rule Coverage Docs Coverage Troubleshooting Assistant Knowledge Graph

A real-time chat application with WebSocket support, built with FastAPI, PostgreSQL, and Redis.


New here? Start with our WELCOME.md or .ai-ide-welcome.md for a quick overview and links to all onboarding resources!


Features

  • Real-time chat using WebSocket connections
  • User authentication with JWT tokens
  • Message history and persistence
  • Rate limiting and connection management
  • Health monitoring and telemetry
  • Comprehensive test suite

Project Structure

mcp_chat_client/
├── backend/                 # FastAPI backend
│   ├── app/                # Application code
│   │   ├── api/           # API endpoints and routers
│   │   ├── core/          # Core functionality
│   │   ├── db/            # Database models and sessions
│   │   ├── models/        # SQLAlchemy models
│   │   ├── schemas/       # Pydantic schemas
│   │   └── services/      # Business logic services
│   ├── tests/             # Test suite
│   ├── alembic/           # Database migrations
│   └── Dockerfile         # Backend container definition
├── docker/                 # Docker configuration
│   ├── dev/               # Development environment
│   └── test/              # Test environment
├── docker-compose.dev.yml  # Development compose file
├── docker-compose.test.yml # Test compose file
└── .env.example           # Environment variables template

Prerequisites

  • Docker and Docker Compose
  • Python 3.9+
  • Node.js 16+ (for frontend development)

Quick Start

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp_chat_client.git
    cd mcp_chat_client
    
  2. Copy the environment template:

    cp .env.example .env
    
  3. Update the .env file with your configuration:

    • Set your database credentials
    • Configure Redis settings
    • Set up JWT secret key
    • Configure API keys for AI services
  4. Start the development environment:

    docker compose -f docker-compose.dev.yml up -d
    
  5. Access the application:

    • Backend API: http://localhost:8000
    • API Documentation: http://localhost:8000/docs

Development

Backend Development

  1. Install dependencies:

    cd backend
    pip install -r requirements.txt
    pip install -r requirements-test.txt
    
  2. Run database migrations:

    ./run_migration.sh
    
  3. Start the development server:

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
    

Testing

  1. Start the test environment:

    docker compose -f docker-compose.test.yml up -d
    
  2. Run the test suite:

    cd backend
    pytest
    
  3. Generate coverage report:

    pytest --cov=app tests/
    

API Documentation

The API documentation is available at /docs when running the application. It includes:

  • REST API endpoints
  • WebSocket connection details
  • Authentication requirements
  • Request/response schemas

Environment Variables

See .env.example for all required environment variables. Key variables include:

  • Database configuration (PostgreSQL)
  • Redis settings
  • JWT configuration
  • WebSocket settings
  • Test environment settings
  • Monitoring configuration
  • AI provider API keys

To set up your environment:

  1. Copy .env.example to .env and fill in the values as needed.
  2. Run bash validate_env.sh to check for missing or empty variables.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

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

Admin API

See docs/admin_endpoints.md for a full guide to all admin-only API endpoints, including usage tips and example requests.

  • Troubleshooting & Environment Issues: docs/env_troubleshooting.md
  • Known Issues: KNOWN_ISSUES.md

AI-IDE Onboarding API

To serve onboarding, rules, and knowledge graph data via HTTP for AI-IDE tools:

make -f Makefile.ai ai-ide-api-build   # Build the Docker image
make -f Makefile.ai ai-ide-api-up      # Start the API at http://localhost:8080
make -f Makefile.ai ai-ide-api-down    # Stop the API

Example endpoints:

  • http://localhost:8080/metadata
  • http://localhost:8080/rules
  • http://localhost:8080/knowledge-graph

Quick Start

1

Clone the repository

git clone https://github.com/the-great-abby/test_mcp_client
2

Install dependencies

cd test_mcp_client
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerthe-great-abby
Repotest_mcp_client
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation