MCP.so
Sign In

A FastAPI-based server providing WebSocket communication, file management, and tools endpoints.

πŸš€ Features

  • πŸ“ File Management API
  • πŸ”Œ WebSocket Communication
  • πŸ› οΈ Tools Endpoint
  • πŸ“„ Static File Serving
  • βœ… Comprehensive Test Suite

πŸ› οΈ Installation

  1. Clone the repository:
git clone https://github.com/khaosans/mcp-server.git
cd mcp-server
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

πŸƒβ€β™‚οΈ Running the Server

Start the server with:

uvicorn server:app --reload --host 0.0.0.0 --port 8080

πŸ§ͺ Running Tests

Run the test suite with:

python test_server.py

πŸ“‘ API Endpoints

HTTP Endpoints

  • GET /files?q=<query>: Search files in the public directory
  • GET /files/{filename}: Read a specific file
  • POST /tools: Execute tools (currently supports summarization)
  • GET /public/*: Serve static files

WebSocket Endpoint

  • ws://localhost:8080/ws: WebSocket endpoint for real-time communication

πŸ“ License

MIT License

πŸ‘€ Author

khaosans

More from Other