Skip to main content
Glama
fichapao-mcp-server

fichapao-mcp-server

by kratos4ai

FichaPao MCP 서버

Postgres를 사용하여 제과점 기술 시트를 제어하는 FichaPao AI 에이전트를 위한 HTTP MCP 서버입니다.

이 앱의 목적은 자유로운 SQL 노출 없이 에이전트에게 안전한 도구를 제공하는 것입니다.

아키텍처

OpenWebUI
  -> Agente FichaPao AI
  -> MCP HTTP /mcp
  -> fichapao-mcp-server
  -> Postgres

Related MCP server: mcp-enterprise-starter

MCP 도구

  • search_recipe: 이름으로 기술 시트를 검색합니다.

  • get_recipe: recipe_id, version_id 또는 이름으로 기술 시트를 조회합니다.

  • create_recipe_draft: 0.1 버전의 초안 기술 시트를 생성합니다.

  • update_draft: 초안 또는 수정 버전의 내용을 업데이트합니다.

  • create_new_version: 초안으로 새 버전을 생성합니다.

  • approve_version: 차단된 보류 항목이 없는 경우 버전을 승인합니다.

  • list_pending_items: 보류 항목을 나열합니다.

  • register_production_test: 생산 테스트를 등록합니다.

  • compare_versions: 두 버전을 비교합니다.

  • archive_recipe: 기술 시트를 보관(아카이브)합니다.

  • get_database_stats: 데이터베이스 요약을 확인합니다.

구현된 규칙

  • 새 기술 시트는 항상 초안(rascunho)으로 시작합니다.

  • 초기 버전은 0.1입니다.

  • 승인된 기술 시트는 직접 편집할 수 없습니다.

  • 승인된 기술 시트를 변경하려면 초안으로 새 버전을 만들어야 합니다.

  • 중요한 보류 항목이 있으면 승인이 차단됩니다.

  • 0.x 버전의 첫 승인은 1.0이 됩니다.

  • 데이터베이스 구분:

    • current_version_id: 가장 최근 버전 또는 작업 중인 버전.

    • active_version_id: 생산 중인 승인된 버전.

로컬 실행

cp .env.example .env
docker compose up --build

상태 확인(Health check):

curl http://localhost:3001/health

MCP 엔드포인트:

http://localhost:3001/mcp

docker-compose.yml에서 로컬 포트는 3000을 사용하는 일반적인 앱과의 충돌을 피하기 위해 3001:3000으로 매핑되어 있습니다.

MCP_API_KEY가 설정된 경우 다음을 전송하세요:

Authorization: Bearer sua-chave

EasyPanel에 배포

두 개의 서비스를 생성하세요:

  1. Postgres

  2. 이 저장소를 가리키는 Docker 앱

앱 환경 변수:

NODE_ENV=production
PORT=3000
DATABASE_URL=postgresql://usuario:senha@host:5432/fichapao
AUTO_MIGRATE=true
MCP_API_KEY=troque-por-uma-chave-forte
CORS_ORIGIN=*

배포 후 유효성 검사:

https://seu-dominio/health

OpenWebUI 설정:

Admin Settings -> External Tools -> Add MCP Server
URL: https://seu-dominio/mcp
Auth: Bearer token com o valor de MCP_API_KEY

데이터베이스

주요 마이그레이션:

migrations/001_init.sql

테이블:

  • recipes

  • recipe_versions

  • pending_items

  • production_tests

  • change_history

개발

npm install
npm run typecheck
npm run build
npm run dev

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers