Lifesign
Lifesign — 사용자 상태 및 건강 원격 측정 서버
경량 HTTP 서비스: 모바일에서 보고하는 장치 상태 + 건강 데이터를 수신하고, **MCP(Model Context Protocol)**를 통해 AI 에이전트가 읽을 수 있도록 노출합니다. 단일 프로세스, 단일 포트.
✨ 특징
📱 모바일 보고: iOS 단축 명령어
POST /ingest로 배터리/위치/네트워크/건강 스냅샷 전송🤖 MCP 게이트웨이: 동일 프로세스에
/mcp마운트, Hermes 등 AI 에이전트가 직접 읽기🏗️ 단일 포트 단일 프로세스: 업로드 + 조회 + MCP 모두 8764 포트 재사용, 2차 HTTP 홉 없음
🐳 Docker 지원: GitHub Actions에서 자동 이미지 빌드, 1Panel에서 원클릭 Compose 배포
Related MCP server: Rouse Context
🏗️ 아키텍처
手机 (iOS 快捷指令)
│ POST https://<your-domain>/user-status/ingest ← 仅上传经反代
▼
1Panel OpenResty (反向代理)
│ proxy_pass → <host-ip>:8764/ingest
▼
┌──────────────────────────────┐
│ FastAPI + FastMCP 同一进程 │
│ (单端口 8764) │
│ │
│ POST /ingest 手机上传 │
│ GET /query_all agent读取 │
│ /mcp MCP 网关 (同进程) │
└──────┬───────────────────────┘
│ 本机回环 http://127.0.0.1:8764/mcp
▼
Hermes Agent (AI)모바일 업로드: 공용 HTTPS가 리버스 프록시를 통해 →
8764/ingestAI 읽기: 로컬 루프백 직접 연결
8764/mcp(공용 네트워크 경유 안 함)공유 메모리: MCP 도구가
app.store를 직접 읽음, 직렬화/2차 요청 불필요
🔌 엔드포인트
메서드 | 경로 | 인증 | 설명 |
|
| Bearer 모바일 키 | 모바일이 최신 상태 보고 |
|
| Bearer agent 키 | 전체 스냅샷 반환 |
|
| 없음 | 상태 확인 (Docker HEALTHCHECK 용) |
|
| 없음 (로컬 루프백) | MCP streamable-http 엔드포인트 |
🔑 인증 및 구성
두 개의 공유 비밀 키만으로 신원 식별 (신원 식별용, 필드 수준 권한 아님), 모두 환경 변수로 재정의 가능:
용도 | 환경 변수 | 기본값 (개발 전용) | 엔드포인트 |
모바일 키 |
|
|
|
agent 키 |
|
|
|
수신 포트 |
|
| — (run.sh 사용) |
⚠️ 프로덕션 배포 시 환경 변수로 기본 키를 반드시 재정의하고, 저장소 내 기본값을 사용하지 마십시오.
🚀 빠른 시작
로컬 실행
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
./run.sh start # 后台启动 :8764
./run.sh status
./run.sh stopDocker 실행
# 本地构建
docker build -t lifesign:local .
docker run -d --name lifesign -p 8764:8764 \
-e USER_STATUS_PHONE_KEY='<phone-key>' \
-e USER_STATUS_AGENT_KEY='<agent-key>' \
lifesign:local1Panel Compose 배포 (권장)
1Panel → 컨테이너 → 오케스트레이션에서 새 오케스트레이션 생성 후
docker-compose.yml붙여넣기;이미지는 GitHub Actions에서 자동 빌드되어 GHCR로 푸시되며, 배포 시 바로 가져옴;
1개의 포트
8764만 열면 되며, 나머지는 리버스 프록시가 처리.
모바일 데이터 전송
# 经公网反代(手机端快捷指令用这个)
curl -s -X POST https://<your-domain>/user-status/ingest \
-H "Authorization: Bearer <phone-key>" \
-H "Content-Type: application/json" \
-d '{"deviceStage":{"battery":{"percentage":87,"is_charging":true}}}'
# 或内网直连
curl -s -X POST http://<host-ip>:8764/ingest \
-H "Authorization: Bearer <phone-key>" \
-H "Content-Type: application/json" \
-d '{"deviceStage":{"battery":{"percentage":87,"is_charging":true}}}'Hermes MCP 설정 (config.yaml)
mcp_servers:
user-status:
type: streamable-http
url: http://127.0.0.1:8764/mcp # 本机回环,不走公网
connect_timeout: 10
timeout: 30확인: hermes mcp test user-status; Hermes 재시작 후 도구가 mcp_user_status_*로 등록됨.
🐳 Docker 이미지 빌드 (GitHub Actions)
저장소 내 .github/workflows/docker-build.yml:
트리거:
main브랜치 push / 수동workflow_dispatch/ 태그 생성산출물:
ghcr.io/<owner>/lifesign:latest및:<git-sha>이중 태그플랫폼:
linux/amd64,linux/arm64설명: 이미지는 비공개 (비공개 저장소 → GHCR 패키지 비공개), 1Panel 배포 시 Docker 설정에 GHCR 로그인 자격 증명 (
ghcr.io사용자 이름 + PAT)을 추가해야 함.
✅ 테스트
. .venv/bin/activate
python -m pytest tests/ -v🗂️ 프로젝트 구조
lifesign/
├── app/
│ ├── main.py # FastAPI 入口(挂载 MCP 网关)
│ ├── mcp_server.py # FastMCP 工具定义(get_status/get_battery/...)
│ ├── store.py # 线程安全内存存储
│ ├── models/status.py # Pydantic 数据模型
│ └── routers/ # /ingest 与 /query_all 路由
├── config/clients.example.yaml # 身份配置模板(真实文件勿提交)
├── panel_api.py # 1Panel API 签名请求辅助脚本
├── docker-compose.yml # 1Panel Compose 部署编排
├── Dockerfile
├── run.sh # 本机后台启停
└── tests/📜 라이선스
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
Hosted MCP server for live public-data APIs and Skills for AI agents.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA real-time system diagnostics MCP server that gives AI agents live access to CPU, RAM, disk, network, processes, and hardware health metrics, with zero cloud dependency.7Apache 2.0
- AlicenseNot gradedqualityBmaintenanceTurn your Android phone into an MCP server. AI assistants connect on demand, query your health data, notifications, app usage, and take actions on your device — all end-to-end encrypted, no cloud sync.14Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.7AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceLocal-first MCP server that enables AI agents to safely control and observe Android mobile devices, supporting device diagnostics, app lifecycle management, async task execution, and performance monitoring through a policy-constrained interface with explicit confirmations.1Apache 2.0