CoolFace
Apppublic

Nazia3135devloper/phase3-mcp

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

MCP Server for AI-Powered Todo Application

This is the MCP (Multi-Agent Collaboration Protocol) server that powers the AI functionality for the todo application. It processes natural language commands and interacts with the backend API to manage tasks.

Dependencies

  • Python 3.11+
  • OpenAI API key
  • Access to the backend database

Environment Variables

Create a .env file with the following variables:

bash
OPENAI_API_KEY=your_openai_api_key_here
DATABASE_URL=your_database_connection_string
SECRET_KEY=your_secret_key

Installation

  1. 1.Clone the repository
  2. 2.Navigate to the mcp-server directory
  3. 3.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Set up environment variables
  2. 2.Run the server:
bash
   python main.py

Deployment Options

Deploy to Hugging Face Spaces

This project is configured for deployment on Hugging Face Spaces. The Space uses Docker to run the MCP server.

Deploy with Docker

  1. 1.Build the Docker image:
bash
   docker build -t mcp-server .
  1. 1.Run the container:
bash
   docker run -e OPENAI_API_KEY=your_key -e DATABASE_URL=your_db_url mcp-server

Architecture

The MCP server connects to the same database as the main backend API and provides AI-powered task management functionality through natural language processing.

Available Tools

  • create_task: Create a new todo task
  • get_tasks: Retrieve todo tasks based on filters
  • update_task: Update an existing todo task
  • delete_task: Delete a todo task
  • toggle_task_completion: Toggle the completion status of a todo task