supriyakundu99
MCP Serversupriyakundu99public

mcp python test

一个使用FastAPI构建的学生管理服务,集成了MCP协议,支持数据库操作和Cursor IDE工具。

Repository Info

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

About This Server

一个使用FastAPI构建的学生管理服务,集成了MCP协议,支持数据库操作和Cursor IDE工具。

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

Student Management MCP Server

A FastAPI-based student management system with MCP (Model Context Protocol, also known as Method Call Protocol) integration for Cursor IDE.

Prerequisites

  • Docker and Docker Compose
  • Python 3.12 or higher (for local development)
  • uv (for dependency management)
  • Cursor IDE

Quick Start

  1. Clone the repository:
git clone https://github.com/supriyakundu99/mcp-python-test.git
cd mcp-python-test
  1. Build and start the containers (app and PostgreSQL) using Docker Compose:
docker compose up --build -d
  1. The FastAPI MCP server will be running at http://localhost:3000 and the MCP endpoint at http://localhost:3000/mcp.

  2. The PostgreSQL database will be available at localhost:5432 (user: postgres, password: postgres, db: students).


Note:

  • The database schema and tables are initialized automatically using init.sql on first run.
  • To stop the containers:
    docker compose down
    

Cursor IDE Integration

  1. Create or update your sample-mcp.json file in your Cursor IDE workspace:
{
    "mcpServers": {
        "student-mcp-http-python": {
            "url": "http://127.0.0.1:3000/mcp"
        }
    }
}
  1. Restart Cursor IDE to load the MCP configuration.

  2. The Student Management System MCP tools will now be available in your Cursor IDE.

Available MCP Tools

  • get_all_students: Retrieve all student records
  • get_student_statistics: Get statistical information about students
  • create_student: Create a new student record
  • get_student: Get student details by ID
  • update_student: Update student information
  • delete_student: Delete a student record
  • add_marks: Add marks for a student
  • update_marks: Update marks for a student
  • search_students_by_name: Search students by name
  • search_students_by_department: Search students by department
  • search_students_by_class: Search students by class year
  • search_students_by_marks_range: Search students by marks range
  • get_student_marks: Get marks for a specific student
  • get_students_above_marks: Get students with marks above threshold
  • get_students_below_marks: Get students with marks below threshold

Development

Local Setup

  1. Install dependencies and set up a virtual environment using uv and pyproject.toml:
uv sync
  1. Start the PostgreSQL database using Docker Compose:
docker compose up -d db
  1. Initialize the database schema and tables by running the provided SQL script:
docker exec -i <your_postgres_container_name> psql -U <your_db_user> -d <your_db_name> < init.sql

Replace <your_postgres_container_name>, <your_db_user>, and <your_db_name> with your actual container, user, and database names.

  1. Run the application:
python src/main.py

Database Schema

Students Table

  • id: Serial Primary Key
  • name: VARCHAR(100)
  • roll_number: VARCHAR(20) Unique
  • department: VARCHAR(50)
  • class_year: INTEGER
  • email: VARCHAR(100) Unique

Student Marks Table

  • id: Serial Primary Key
  • student_id: INTEGER (Foreign Key)
  • subject: VARCHAR(100)
  • marks: FLOAT
  • semester: INTEGER

Quick Start

1

Clone the repository

git clone https://github.com/supriyakundu99/mcp-python-test
2

Install dependencies

cd mcp-python-test
npm install
3

Follow the documentation

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

Repository Details

Ownersupriyakundu99
Repomcp-python-test
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