Pyro2 MCP Server

Pyro2 MCP Server

By magic-fo GitHub

Python-based MCP server implementation for maintaining conversation continuity across multiple projects

pyro2 mcp
Overview

what is Pyro2 MCP?

Pyro2 MCP is a Python-based Model Client Protocol (MCP) server designed to maintain conversation continuity across multiple projects, integrating with Supabase for data storage and providing a consistent interface for various LLM APIs.

how to use Pyro2 MCP?

To use Pyro2 MCP, clone the repository, install the required packages, set up a Supabase project, and configure your API keys in a .env file. Then, run the server and use the provided API endpoints to manage projects and conversations.

key features of Pyro2 MCP?

  • Project-based conversation continuity
  • Integration with Supabase for data persistence
  • Support for Claude API
  • Tool calling capability for generating clarifying questions and engineering requirements
  • Serverless API endpoints for easy access

use cases of Pyro2 MCP?

  1. Managing conversations for hardware design projects
  2. Generating engineering specifications based on user input
  3. Maintaining context across multiple project discussions

FAQ from Pyro2 MCP?

  • Can Pyro2 MCP handle multiple projects simultaneously?

Yes! It is designed to maintain conversation continuity across different projects.

  • Is there a specific setup required for Supabase?

Yes, you need to create specific tables for projects, chats, and messages in Supabase.

  • How do I run the server?

You can run the server using the command python server.py after setting up your environment.

Content

Pyro2 MCP Server

Python-based MCP (Model Client Protocol) server implementation for maintaining conversation continuity across multiple projects. This server integrates with Supabase for data storage and provides a consistent interface for interacting with various LLM APIs.

Features

  • Project-based conversation continuity
  • Integration with Supabase for data persistence
  • Support for Claude API
  • Tool calling capability
  • Serverless API endpoints

Core Components

  1. SupabaseManager: Handles data persistence operations
  2. MCPConversationClient: Manages conversation flow
  3. API Endpoints: Provides HTTP interfaces for clients

Setup and Configuration

See documentation for setup and usage instructions.

Description

This server provides tools to assist in hardware design processes through the Model Context Protocol (MCP). It helps users get clear engineering requirements by first asking clarifying questions and then generating comprehensive engineering specifications.

The system now features:

  • Project-based conversation management
  • Conversation continuity across sessions
  • Seamless switching between multiple projects
  • State persistence via Supabase

Installation

  1. Clone this repository
  2. Install the required packages:
    pip install -r requirements.txt
    
  3. Set up a Supabase project with the following tables:
    • projects - For storing project information
    • chats - For storing chat sessions related to projects
    • messages - For storing conversation messages
  4. Create a .env file in the root directory with your API keys and configuration:
    # API Keys
    GOOGLE_API_KEY=your_gemini_api_key
    ANTHROPIC_API_KEY=your_claude_api_key
    GOOGLE_MODEL_NAME=gemini-2.0-flash-thinking-exp
    ANTHROPIC_MODEL_NAME=claude-3-7-sonnet-latest
    
    # Supabase configuration
    SUPABASE_URL=your_supabase_url
    SUPABASE_KEY=your_supabase_key
    
    # Server configuration
    PORT=3000
    PROJECT_API_PORT=3001
    

Available Tools

ask_clarifying_questions

This tool generates clarifying questions about hardware design requirements based on the user's input and conversation history.

Input parameters:

  • user_input (string): The user's query or hardware design request
  • conversation_history (array): Previous exchanges between the user and assistant

Output: A JSON string with the following structure:

{
  "response": "The generated questions about hardware design requirements",
  "is_final_requirement": false
}

generate_engineering_requirements

This tool generates formal engineering requirements for a hardware design project based on the provided conversation history.

Input parameters:

  • user_input (string): The user's query or hardware design request
  • conversation_history (array): Previous exchanges between the user and assistant

Output: A JSON string with the following structure:

{
  "response": "Comprehensive engineering requirements document",
  "is_final_requirement": true
}

Project-Based Conversation System

The system now supports maintaining conversation continuity across multiple projects:

API Endpoints

  1. Chat API: /api/chat

    • Processes chat requests for specific projects
    • Maintains conversation context between sessions
    • Parameters:
      • projectId: Unique identifier for the project
      • userInput: User's message
  2. Projects API: /api/projects

    • Manages project information
    • Endpoints:
      • GET /api/projects: List all projects
      • POST /api/projects: Create a new project

Database Schema

The system uses Supabase with the following tables:

  1. Projects table:

    • id: UUID (primary key)
    • name: String
    • description: String
    • created_at: Timestamp
    • updated_at: Timestamp
  2. Chats table:

    • id: UUID (primary key)
    • project_id: UUID (foreign key to projects.id)
    • created_at: Timestamp
    • updated_at: Timestamp
  3. Messages table:

    • id: UUID (primary key)
    • chat_id: UUID (foreign key to chats.id)
    • role: String (user/assistant)
    • content: Text
    • tool_call: JSON (optional)
    • tool_result: JSON (optional)
    • created_at: Timestamp

Running the Server

  1. Run the MCP server:

    python server.py
    
  2. Run the Chat API server:

    python api/chat.py
    
  3. Run the Projects API server:

    python api/projects.py
    

Using with Multiple Projects

The system allows users to switch between different projects while maintaining conversation context:

  1. Create projects via the Projects API
  2. Make requests to the Chat API with different project IDs
  3. The system will maintain separate conversation history for each project
  4. When returning to a previous project, the entire conversation context is preserved

Examples

Creating a new project

curl -X POST http://localhost:3001/ \
  -H "Content-Type: application/json" \
  -d '{"name": "Underwater Drone", "description": "Project for creating a seabed scanning drone"}'

Sending a chat message to a project

curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -d '{"projectId": "project-uuid", "userInput": "수중 드론을 만들고 싶다"}'

Testing

Run the tests with:

python -m unittest discover -s tests

하드웨어 설계 MCP 서버

하드웨어 설계 프로세스를 지원하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다.

설명

이 서버는 모델 컨텍스트 프로토콜(MCP)을 통해 하드웨어 설계 프로세스를 지원하는 도구를 제공합니다. 먼저 명확한 질문을 통해 요구사항을 파악한 다음 종합적인 엔지니어링 사양을 생성하여 사용자의 하드웨어 설계를 돕습니다.

설치

  1. 이 저장소를 복제합니다
  2. 필요한 패키지를 설치합니다:
    pip install -r requirements.txt
    
  3. 루트 디렉토리에 Gemini API 키가 포함된 .env 파일을 생성합니다:
    GOOGLE_API_KEY=your_gemini_api_key
    

사용 가능한 도구

ask_clarifying_questions

이 도구는 사용자의 입력과 대화 기록을 기반으로 하드웨어 설계 요구사항에 대한 명확한 질문을 생성합니다.

입력 매개변수:

  • user_input (string): 사용자의 질문 또는 하드웨어 설계 요청
  • conversation_history (array): 사용자와 어시스턴트 간의 이전 대화 내용

출력: 다음 구조의 JSON 문자열:

{
  "response": "하드웨어 설계 요구사항에 대한 생성된 질문",
  "is_final_requirement": false
}

generate_engineering_requirements

이 도구는 제공된 대화 기록을 기반으로 하드웨어 설계 프로젝트에 대한 공식 엔지니어링 요구사항을 생성합니다.

입력 매개변수:

  • user_input (string): 사용자의 질문 또는 하드웨어 설계 요청
  • conversation_history (array): 사용자와 어시스턴트 간의 이전 대화 내용

출력: 다음 구조의 JSON 문자열:

{
  "response": "종합적인 엔지니어링 요구사항 문서",
  "is_final_requirement": true
}

사용 흐름

  1. 하드웨어 설계 요청으로 시작
  2. ask_clarifying_questions 도구를 사용하여 누락된 정보 식별
  3. 충분한 정보가 수집되면 generate_engineering_requirements 도구를 사용하여 공식 엔지니어링 사양 생성

서버 확장

이 서버에 더 많은 도구를 추가하려면:

  1. @mcp.tool() 데코레이터로 새 함수 정의
  2. 적절한 타입 힌트와 문서 문자열 추가(FastMCP가 도구 메타데이터를 생성하는 데 사용됨)
  3. 도구의 기능 구현
  4. 새 도구에 대한 문서로 이 README.md 업데이트

서버 실행

python server.py

클라이언트에서 서버에 연결하려면 클라이언트별 MCP 연결 지침을 따르세요.

No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details