Back to Home
rb58853 icon

fastchat-mcp

by rb58853

Overview

A Python client integrating Language Models (LLMs) with Model Context Protocol (MCP) servers, enabling natural language interaction with external tools, resources, and prompts via terminal or a FastAPI/WebSocket API.

Installation

Run Command
uvicorn api:app --host 0.0.0.0 --port 8000 --ws-ping-interval 0 --ws-ping-timeout 1200 --workers 1

Environment Variables

  • CRIPTOGRAFY_KEY
  • OPENAI_API_KEY
  • MASTER_TOKEN

Security Notes

The WebSocket API route (`/chat/user`, `/chat/admin`) accepts an `aditional_servers` header. This header's value is parsed as JSON, allowing clients to dynamically inject MCP server configurations. If a malicious client provides a `stdio` protocol server configuration with arbitrary commands, it could lead to Remote Code Execution (RCE) on the server running the FastApp. This constitutes a severe security vulnerability for any publicly exposed API.

Similar Servers

Stats

Interest Score32
Security Score3
Cost ClassMedium
Avg Tokens600
Stars2
Forks2
Last Update2025-12-04

Tags

LLMMCPPythonChatbotAIAPIWebSocketOpenAI