fastmcp-server
0
FastMCP Server is a lightweight Model Context Protocol server designed to facilitate communication with AI models via an API built using FastAPI. It features flexible configuration through environment variables, supporting endpoints for messaging and server status checks.
FastMCP Server
FastMCP Server is a simple implementation of a Model Context Protocol (MCP) server using FastMCP. It provides an API for communication with AI models using the FastAPI framework.
Features
/chat
endpoint: Receives user messages and returns responses from the AI model.- Configuration via environment variables: Allows flexible configuration for API keys and model selection.
Requirements
- Python 3.9+
- API key (e.g., Anthropic Claude API)
Installation
- Clone the repository.
- Create and activate a virtual environment.
- Install dependencies.
- Set environment variables.
Usage
- Start the server.
- Access
http://localhost:8000
via browser or API client. - Send POST requests to
/chat
endpoint.
API Specification
GET /
- Endpoint to check the server status.
POST /chat
- Parameters:
message
(string) - Response: AI model's response.