Expense Tracker MCP Server
Expense Tracker MCP Server
FastMCP(v3.x)와 Python으로 구축된 Model Context Protocol(MCP) 서버로, 지출 추적을 위한 도구와 리소스를 MCP 호환 클라이언트(예: Claude Desktop, MCP Inspector)에 제공합니다.
📋 전제 사항
Python: 3.10+ (Python 3.14에서 테스트됨)
uv: 빠른 Python 패키지 설치 프로그램 및 의존성 해석기 (astral.sh/uv)
Node.js:
v22.x또는v24.x(LTS) — MCP Inspector UI에 필요Claude Desktop (선택): Claude 내에서 직접 도구를 테스트하려면
Related MCP server: Demo MCP Server
🚀 셋업 및 설치
1. 프로젝트 및 환경 초기화
# Initialize uv project (if starting fresh)
uv init .
# Install FastMCP
uv add fastmcp2. MCP Inspector UI를 위한 Node.js 준비
MCP Inspector(@modelcontextprotocol/inspector)는 Node.js v22.19.0+ 또는 v24+가 필요합니다. nvm-windows를 사용하는 경우:
nvm install lts
nvm use 24inspector를 전역으로 설치하거나 npx가 이를 가져오도록 허용하세요:
npm install -g @modelcontextprotocol/inspector🛠️ 실행 및 개발
옵션 A: 인터랙티브 웹 UI (MCP Inspector)
핫 리로딩과 함께 MCP Inspector 웹 UI를 실행하려면:
uv run fastmcp dev inspector main.py이 터미널 창을 열어 두세요.
콘솔에서 인증 토큰이 포함된 로컬 URL을 출력합니다:
MCP Inspector Web is up and running at: http://127.0.0.1:6274?MCP_INSPECTOR_API_TOKEN=<token>브라우저에서 해당 링크를 열어 도구를 테스트하고, 스키마를 확인하며 실시간 요청/응답 로그를 볼 수 있습니다.
옵션 B: 서버 직접 실행 (STDIO)
MCP 서버를 표준 I/O 모드로 실행하려면:
uv run fastmcp run main.py(또는 uv run python main.py)
🤖 Claude Desktop에 연결
1. 설정 파일 위치
Windows에서 Claude Desktop의 설정 파일은 다음 위치에 저장됩니다:
%APPDATA%\Claude\claude_desktop_config.json(전체 경로: C:\Users\<YourUsername>\AppData\Roaming\Claude\claude_desktop_config.json)
2. 설정 구성
mcpServers 아래에 expense-server 정의를 추가하세요.
참고: Windows에서는 Claude Desktop과 같은 GUI 앱이쉘
PATH를 상속하지 못하는 경우가 많습니다. 항상uv.exe의 절대 경로를 지정하세요.
{
"mcpServers": {
"expense-server": {
"command": "C:\\Users\\hp\\AppData\\Local\\Python\\pythoncore-3.14-64\\Scripts\\uv.exe",
"args": [
"run",
"--directory",
"g:\\Projects\\expense-tracker-mcp-server",
"fastmcp",
"run",
"main.py"
]
}
}
}3. Claude Desktop 다시 시작
Claude Desktop을 완전히 종료하세요(시계가 있는 Windows 트레이에서 종료되었는지 확인).
Claude Desktop을 다시 엽니다.
Settings > Developer에서
expense-server가 연결되었는지 확인하세요.
🧰 사용 가능한 도구 (현재 main.py)
Tool | Parameters | Description |
|
|
|
|
| 두 수를 더하고 합을 반환합니다. |
🔧 문제 해결
1. Unknown command "main"..."
FastMCP 3.x에서 fastmcp dev는 명령 그룹입니다. fastmcp dev main.py 대신 fastmcp dev inspector main.py를 사용하세요.
2. node:util does not provide an export named 'styleText'
Node.js가 v20.12보다 이전 버전입니다. nvm install lts && nvm use 24를 통해 Node v22+ 또는 v24+로 업데이트하세요.
3. Cannot find self node optional dependencies bug`
Node 버전 전환으로 손상된 npx 캐시입니다. 실행:
npm cache clean --force
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx" -ErrorAction SilentlyContinue
npm install -g @modelcontextprotocol/inspectorAvailable Tools
2 toolsadd_numbersA
Add two numbers together.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the operation but does not explicitly mention that it is pure, has no side effects, or what the return value is. While obvious for addition, it falls short of full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with zero filler. It is front-loaded and every word earns its place, exemplifying appropriate conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a trivial addition tool with a clear input schema and an output schema (as indicated by the signal), the description is largely sufficient. It lacks explicit mention of edge cases or preconditions, but none are expected for this operation, making it nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%—the description does not mention parameters by name or add any nuance. The schema already declares a and b as required numbers, but the description adds no value beyond that, failing to compensate for the low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Add two numbers together' uses a specific verb and resource, clearly stating exactly what the tool does. It is distinct from siblings like roll_dice and add_expense, so agents can easily differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use this tool versus alternatives, nor any exclusions. There is no context about when addition is appropriate or not, leaving the agent to infer usage from the name and schema alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
roll_diceA
Roll n_dice 6-sided dice and return the results.
| Name | Required | Description | Default |
|---|---|---|---|
| n_dice | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It correctly implies a random stochastic process and states the output ('return the results'), but does not explicitly mention randomness, the range of outcomes (1–6 per die), or that subsequent calls produce independent results. This is adequate for a simple tool but lacks any deeper context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the core action, and contains no filler words. Every term contributes to understanding the tool's behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (one parameter, simple output) and the presence of an output schema, the description is complete enough. It explains the parameter's role and the action's purpose. It could mention the non-deterministic nature more explicitly, but that is implicit for a dice-rolling tool, and the output schema likely covers return formatting.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero description coverage for the parameter n_dice, so the description must compensate. It does so by framing n_dice as the number of dice to roll, adding semantic meaning to an otherwise bare integer field. However, it does not specify constraints like minimum value or positivity, which would have improved clarity further.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear, specific action: 'Roll n_dice 6-sided dice and return the results.' The verb 'Roll' and resource 'dice' are unambiguous, and the tool is easily distinguished from siblings like add_numbers or list_expenses, which handle arithmetic or expense management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to use this tool versus alternatives, nor any exclusions or prerequisites. Sibling tools are unrelated, but the description provides no context for selection, leaving the agent to infer its suitability from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
add_numbers - First observed
roll_dice
TDQS
Scored across 2 tools
The two tools have completely disjoint purposes—one rolls dice and the other adds numbers. There is no ambiguity between them and no chance of an agent misselecting one for the other.
Both tool names follow the same verb_noun snake_case pattern: roll_dice and add_numbers. The naming is predictable and straightforward.
A server named 'Expense Tracker' offers only two tools that perform unrelated operations (dice rolling and arithmetic). This is a severe mismatch between scope and purpose, making the count completely inappropriate.
The tools do not cover any expense tracking functionality whatsoever—no add expense, list expenses, delete expense, or summaries. The surface is entirely incomplete for the stated domain.
Maintenance
Related MCP Connectors
Build your own tools from chat: design, test and host them on a shareable MCP server URL.
1This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA basic educational MCP server that provides simple tools for mathematical calculations, text manipulation, and time retrieval. Designed for learning MCP implementation patterns and development purposes.-
- FlicenseBqualityDmaintenanceA simple demonstration MCP server that provides basic utility tools including dice rolling and number addition functionality. This server serves as a tutorial example for setting up both local and remote MCP servers using FastMCP.3-
- FlicenseNot gradedqualityDmaintenanceEnables rolling dice with customizable sides and counts, returning results and totals via MCP Streamable HTTP transport.-
- FlicenseCqualityBmaintenanceProvides MCP tools for rolling dice and adding two numbers, usable by MCP-compliant clients like Claude Desktop.5-