household-account-book
AI 에이전트를 위한 헤드리스 개인 회계 시스템
AI 에이전트가 사용하기에 적합하도록 설계된 헤드리스 개인 회계 시스템입니다. 사람을 위한 GUI는 없으며, 대신 모든 상호 작용은 REST API 또는 Model Context Protocol (MCP) 서버 stdio 인터페이스를 통해 수행됩니다.
시스템 아키텍처
언어: Python 3.12+
데이터베이스: SQLite (단일 파일, 로컬 저장소)
API 서버: FastAPI (
/docs에서 자동 OpenAPI 문서 제공)MCP 서버: stdio 전송을 통해 도구를 노출하는 Python
mcpSDK배포: Docker 및 Docker Compose
Related MCP server: accounting-mcp-server
폴더 구조
AI/
├── app/
│ ├── __init__.py
│ ├── db.py # SQLAlchemy SQLite connection & tables setup
│ ├── models.py # Pydantic schemas for data validation
│ ├── crud.py # Database operations (CRUD, reports, config)
│ ├── main.py # FastAPI API endpoints
│ └── mcp_server.py # MCP (Model Context Protocol) server configuration
├── tests/
│ ├── __init__.py
│ └── test_core.py # Complete Pytest unit tests suite
├── Dockerfile # Multi-stage optimized Docker file
├── docker-compose.yml # Docker compose configuration (Port 8900, volume mount)
├── .dockerignore
├── pyproject.toml # Poetry/Pip project dependencies
├── SCHEMA.md # Database schema reference for AI models
└── README.md # This manual시작하기 (네이티브 설정)
1. 종속성 설치
Python 3.12+가 설치되어 있는지 확인하세요. 저장소를 클론하고 다음을 실행하세요:
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install required packages
pip install fastapi uvicorn sqlalchemy pydantic mcp
# Install development packages for tests
pip install pytest httpx2. REST API 서버 실행
포트 8900에서 FastAPI 서버를 시작합니다:
uvicorn app.main:app --host 0.0.0.0 --port 8900 --reload대화형 API 문서는 http://localhost:8900/docs 에서 확인할 수 있습니다.
3. MCP 서버 실행
표준 입력/출력(stdio)을 통해 MCP 서버를 로컬에서 실행합니다:
python -m app.mcp_server4. 단위 테스트 실행
테스트 스위트를 실행하려면 다음을 실행하세요:
pytest배포 (Docker 설정)
Docker 및 Docker Compose를 사용하여 원격 또는 로컬 호스트에 애플리케이션을 빌드하고 배포할 수 있습니다 (Docker 29.x가 설치된 Ubuntu 24.04 LTS에서 테스트됨).
1. 컨테이너 시작
분리 모드로 컨테이너를 시작합니다. SQLite 데이터베이스는 컨테이너 내부의 /data/accounting.db에 있는 명명된 볼륨 accounting-data에 영구적으로 저장됩니다.
docker compose up -d --build2. 서비스 상태 확인
서비스가 실행 중이고 정상인지 확인합니다:
# Verify REST API
curl http://localhost:8900/health
# Show container status & health status
docker psAI 에이전트 연결 (MCP 구성)
LLM 클라이언트(예: Claude Desktop)가 회계 시스템과 직접 인터페이스할 수 있도록 하려면 클라이언트 구성 파일에 서버를 추가하세요.
로컬 네이티브 실행의 경우
이 내용을 Claude Desktop 구성 파일에 추가하세요 (일반적으로 Windows의 경우 %APPDATA%\Claude\claude_desktop_config.json, macOS의 경우 ~/Library/Application Support/Claude/claude_desktop_config.json에 위치):
{
"mcpServers": {
"personal-accounting": {
"command": "/path/to/your/venv/bin/python",
"args": ["-m", "app.mcp_server"],
"cwd": "/path/to/your/project/directory",
"env": {
"DATABASE_URL": "sqlite:////path/to/your/project/directory/accounting.db"
}
}
}
}Docker 배포의 경우
회계 서버가 Docker 컨테이너 내에서 실행 중인 경우 활성 컨테이너 내에서 명령을 실행하도록 Claude Desktop을 구성하세요:
{
"mcpServers": {
"personal-accounting-docker": {
"command": "docker",
"args": [
"exec",
"-i",
"accounting-api",
"python",
"-m",
"app.mcp_server"
]
}
}
}API 사용 예제 (curl 명령어)
1. 새 계정 만들기
curl -X POST http://localhost:8900/accounts \
-H "Content-Type: application/json" \
-d '{"name": "Wallet Cash", "type": "cash", "balance": 5000}'curl -X POST http://localhost:8900/accounts \
-H "Content-Type: application/json" \
-d '{"name": "Savings Bank", "type": "bank", "balance": 150000}'2. 모든 계정 나열
curl -X GET http://localhost:8900/accounts3. 지출 기록 (ID 1은 현금 지갑을 나타냄)
curl -X POST http://localhost:8900/transactions \
-H "Content-Type: application/json" \
-d '{
"date": "2026-08-02",
"amount": 850,
"type": "expense",
"category": "Food",
"description": "Lunch at restaurant",
"account_id": 1,
"tags": ["lunch", "outing"]
}'4. 이체 기록 (은행 예금에서 현금 지갑으로 2,000엔 이동)
Savings Bank ID가 2이고 Wallet Cash ID가 1이라고 가정합니다.
curl -X POST http://localhost:8900/transfers \
-H "Content-Type: application/json" \
-d '{
"date": "2026-08-02",
"amount": 2000,
"from_account_id": 2,
"to_account_id": 1,
"description": "ATM withdrawal to wallet"
}'5. 집계 보고서 검색
수입, 지출, 카테고리/계정별 내역의 월간 보고서를 가져옵니다:
curl -X GET "http://localhost:8900/report?frequency=monthly"6. 거래 수정 (오류 수정)
부분 업데이트 — 제공한 필드만 변경됩니다. 계정 잔액은 자동으로 다시 계산됩니다:
# Change the amount of transaction ID 1 from 850 to 950
curl -X PUT http://localhost:8900/transactions/1 \
-H "Content-Type: application/json" \
-d '{"amount": 950}'7. 거래 삭제 (오류 실행 취소)
거래를 삭제하면 계정 잔액에 미친 영향이 취소됩니다 (수입은 다시 차감되고, 지출은 다시 추가됩니다):
curl -X DELETE http://localhost:8900/transactions/18. 이체 삭제
이체를 삭제하면 두 계정 잔액에 미친 영향이 모두 취소됩니다:
curl -X DELETE http://localhost:8900/transfers/19. 계정 삭제
계정을 참조하는 거래나 이체가 아직 있으면 계정 삭제가 거부(400) 됩니다. 먼저 해당 항목을 제거한 다음 삭제하세요:
curl -X DELETE http://localhost:8900/accounts/1This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceDouble-entry accounting service for personal finance with MCP tools, enabling AI agents to manage accounts, transactions, budgets, and analytics via PostgreSQL.
- -licenseNot gradedqualityNot gradedmaintenanceA personal accounting MCP server that enables AI assistants to record and query financial transactions through natural language, supporting income/expense tracking, balance inquiry, and monthly summaries.
- FlicenseNot gradedqualityBmaintenanceA read-only MCP server that gives AI agents structured access to a Beancount personal finance ledger.1
- AlicenseNot gradedqualityAmaintenanceDouble-entry accounting ledger MCP server for autonomous agents that enables creating accounts, posting journal entries, and generating financial reports.MIT
Related MCP Connectors
Hosted MCP server for Mini Accountant: invoices, expenses, customers, analytics, tax estimates.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dht-net/household-account-book'
If you have feedback or need assistance with the MCP directory API, please join our Discord server