
Pyro2 MCP Server
Python-based MCP server implementation for maintaining conversation continuity across multiple projects
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?
- Managing conversations for hardware design projects
- Generating engineering specifications based on user input
- 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.
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
- SupabaseManager: Handles data persistence operations
- MCPConversationClient: Manages conversation flow
- 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
- Clone this repository
- Install the required packages:
pip install -r requirements.txt
- Set up a Supabase project with the following tables:
projects
- For storing project informationchats
- For storing chat sessions related to projectsmessages
- For storing conversation messages
- 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 requestconversation_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 requestconversation_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
-
Chat API:
/api/chat
- Processes chat requests for specific projects
- Maintains conversation context between sessions
- Parameters:
projectId
: Unique identifier for the projectuserInput
: User's message
-
Projects API:
/api/projects
- Manages project information
- Endpoints:
GET /api/projects
: List all projectsPOST /api/projects
: Create a new project
Database Schema
The system uses Supabase with the following tables:
-
Projects table:
id
: UUID (primary key)name
: Stringdescription
: Stringcreated_at
: Timestampupdated_at
: Timestamp
-
Chats table:
id
: UUID (primary key)project_id
: UUID (foreign key to projects.id)created_at
: Timestampupdated_at
: Timestamp
-
Messages table:
id
: UUID (primary key)chat_id
: UUID (foreign key to chats.id)role
: String (user/assistant)content
: Texttool_call
: JSON (optional)tool_result
: JSON (optional)created_at
: Timestamp
Running the Server
-
Run the MCP server:
python server.py
-
Run the Chat API server:
python api/chat.py
-
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:
- Create projects via the Projects API
- Make requests to the Chat API with different project IDs
- The system will maintain separate conversation history for each project
- 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)을 통해 하드웨어 설계 프로세스를 지원하는 도구를 제공합니다. 먼저 명확한 질문을 통해 요구사항을 파악한 다음 종합적인 엔지니어링 사양을 생성하여 사용자의 하드웨어 설계를 돕습니다.
설치
- 이 저장소를 복제합니다
- 필요한 패키지를 설치합니다:
pip install -r requirements.txt
- 루트 디렉토리에 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
}
사용 흐름
- 하드웨어 설계 요청으로 시작
ask_clarifying_questions
도구를 사용하여 누락된 정보 식별- 충분한 정보가 수집되면
generate_engineering_requirements
도구를 사용하여 공식 엔지니어링 사양 생성
서버 확장
이 서버에 더 많은 도구를 추가하려면:
@mcp.tool()
데코레이터로 새 함수 정의- 적절한 타입 힌트와 문서 문자열 추가(FastMCP가 도구 메타데이터를 생성하는 데 사용됨)
- 도구의 기능 구현
- 새 도구에 대한 문서로 이 README.md 업데이트
서버 실행
python server.py
클라이언트에서 서버에 연결하려면 클라이언트별 MCP 연결 지침을 따르세요.