Skip to main content
Glama
RafeefSholy

Personal Expense Tracker MCP

by RafeefSholy

Personal Expense Tracker MCP

이 프로젝트가 하는 일

Personal Expense Tracker MCP는 개인 지출을 추적하는 간단한 로컬 MCP 서버입니다.

지출 데이터를 로컬 CSV 파일에 저장합니다.

서버는 MCP 클라이언트에 다섯 가지 특화된 도구를 제공합니다.

  • 새 지출 추가

  • 저장된 지출 목록 보기

  • 지출 요약 만들기

  • 기존 지출 수정

  • 기존 지출 삭제

이 프로젝트는 간단하고 로컬에서 실행하기 쉽게 만들어졌습니다.

은행 계좌나 외부 API가 필요하지 않습니다.


Related MCP server: Expense Tracker MCP

요구사항

시작하기 전에 다음이 설치되어 있는지 확인하세요.

  • Node.js 버전 20 이상

  • npm

  • Git

Node.js 확인

node --version

npm 확인

npm --version

Git 확인

git --version

설치

1 리포지토리 클론

git clone https://github.com/MohammadYousef-001/Personal-Expenses-Tracker.git

2 프로젝트 폴더로 이동

cd Personal-Expenses-Tracker

3 패키지 설치

npm install

npm이 필수 패키지 설치를 완료할 때까지 기다리세요.


데이터 파일

지출은 로컬에 다음 위치에 저장됩니다.

data/expenses.csv

CSV 파일은 다음 열을 사용합니다.

id,amount,category,date,description

열 이름을 변경하지 마세요.


MCP 서버 실행

서버를 시작하려면 다음을 실행하세요.

npm run dev

서버는 MCP 통신을 위해 표준 입력과 출력을 사용합니다.

로컬 서버이므로 웹 포트가 필요하지 않습니다.


MCP Inspector 실행

MCP Inspector는 도구를 수동으로 테스트하는 가장 쉬운 방법입니다.

다음을 실행하세요.

npm run inspect

MCP Inspector가 포함된 브라우저 창이 열립니다.

자동으로 열리지 않으면 터미널에 표시된 URL을 사용하세요.

Inspector에서

  1. 서버에 연결

  2. Tools 섹션 열기

  3. 도구 선택

  4. 입력값 입력

  5. Execute Tool 클릭

  6. 결과 확인


사용 가능한 도구

도구

기능

주요 입력값

add_expense

CSV 파일에 새 지출을 추가합니다

amount category date description

list_expenses

저장된 지출을 나열하고 필터링할 수 있습니다

month category

get_spending_summary

한 달 지출 합계를 계산합니다

month

update_expense

기존 지출 하나를 수정합니다

id 및 지출 필드 최소 하나

delete_expense

기존 지출 하나를 삭제합니다

id


도구 1 add_expense

add_expense를 사용하여 새 지출을 저장하세요.

입력값

amount

지출한 금액입니다.

양수여야 합니다.

category

지출 카테고리입니다.

예시:

groceries
transport
bills
shopping

카테고리는 소문자로 저장되므로 카테고리 이름이 일관되게 유지됩니다.

date

지출 날짜입니다.

다음 형식을 사용해야 합니다.

YYYY-MM-DD

예시:

2026-08-12

날짜는 실제 달력에 존재하는 날짜여야 합니다.

다음은 유효하지 않습니다.

2026-99-99

description

지출에 대한 선택적인 간단한 정보입니다.

예시

{
  "amount": 25,
  "category": "groceries",
  "date": "2026-08-12",
  "description": "milk and bread"
}

요청이 성공하면 지출이 다음 파일에 추가됩니다.

data/expenses.csv

도구 2 list_expenses

list_expenses를 사용하여 저장된 지출을 확인하세요.

필터 없이:

{}

카테고리로 필터링:

{
  "category": "groceries"
}

월로 필터링:

{
  "month": "2026-08"
}

두 필터를 함께 사용:

{
  "month": "2026-08",
  "category": "groceries"
}

월은 다음 형식을 사용해야 합니다.

YYYY-MM

월은 01과 12 사이여야 합니다.

다음은 유효하지 않습니다.

2026-99

도구 3 get_spending_summary

get_spending_summary를 사용하여 지출 요약을 확인하세요.

예시:

{
  "month": "2026-08"
}

결과에는 다음이 포함될 수 있습니다.

  • 선택한 월

  • 총 지출 금액

  • 지출 건수

  • 카테고리별 총 지출

결과 예시:

month: 2026-08
total amount: 150
expense count: 4

category totals:
groceries: 80
transport: 30
bills: 40

실제 값은 data/expenses.csv 안의 데이터에 따라 달라집니다.


예시 프롬프트

지출 추가

I spent 25 on groceries today

이 프롬프트는 다음을 사용할 수 있습니다.

add_expense

지출 찾기

show my grocery expenses for this month

이 프롬프트는 다음을 사용할 수 있습니다.

list_expenses

지출 확인

how much did I spend this month

이 프롬프트는 다음을 사용할 수 있습니다.

get_spending_summary

입력 검증

프로젝트는 도구 입력값을 사용하기 전에 검증합니다.

잘못된 입력의 예시:

  • 음수 금액

  • 0 금액

  • 잘못된 날짜 형식

  • 실제 달력에 없는 날짜

  • 유효하지 않은 월

  • 너무 긴 카테고리

  • 너무 긴 설명

잘못된 입력은 저장되기 전에 거부됩니다.


스키마 테스트

다음을 실행하세요.

npm run check:schema

성공하면 다음 결과가 표시되어야 합니다.

All expense schemas are valid.

문제 해결

문제 1 패키지가 없음

패키지 또는 모듈을 찾을 수 없다는 오류가 표시되면 다음을 실행하세요.

npm install

그런 다음 다시 시도하세요.

npm run dev

문제 2 MCP Inspector가 시작되지 않음

패키지가 설치되어 있는지 확인하세요.

npm install

그런 다음 다음을 실행하세요.

npm run inspect

이전 Inspector 프로세스가 계속 실행 중이면 다음을 누르세요.

Ctrl + C

그런 다음 Inspector를 다시 시작하세요.


문제 3 TypeScript 또는 스키마 오류

다음을 실행하세요.

npm run check:schema

모든 것이 올바르면 다음이 표시되어야 합니다.

All expense schemas are valid.

오류가 있으면 터미널에 표시된 파일 이름과 줄 번호를 확인하세요.

Inspector를 다시 시작하기 전에 오류를 수정하세요.


문제 4 잘못된 날짜

유효한 날짜는 다음 형식을 사용해야 합니다.

YYYY-MM-DD

유효한 예시:

2026-08-12

잘못된 예시:

2026-99-99

문제 5 지출이 반환되지 않음

다음을 확인하세요.

data/expenses.csv

CSV 헤더 아래에 지출 행이 포함되어 있어야 합니다.

파일에 헤더만 있으면 빈 결과가 정상입니다.


프로젝트 구조

중요한 프로젝트 파일:

Personal-Expenses-Tracker/
│
├── data/
│   └── expenses.csv
│
├── docs/
│   ├── design.md
│   └── threat-model.md
│
├── examples/
│
├── src/
│   ├── index.ts
│   ├── schemas/
│   ├── tools/
│   └── lib/
│
├── SECURITY.md
├── package.json
└── README.md

보안

도구 입력값은 신뢰할 수 없는 입력으로 취급됩니다.

프로젝트는 중요한 작업 전에 입력값을 검증합니다.

지출 파일 경로는 애플리케이션이 제어합니다.

MCP 클라이언트에 반환되는 오류는 짧게 유지됩니다.

더 자세한 오류는 디버깅을 위해 로컬 터미널에 남습니다.

지출 도구는 외부 네트워크 요청이 필요하지 않습니다.

더 많은 보안 정보는 다음에서 확인할 수 있습니다.

SECURITY.md

프로젝트 범위

이 프로젝트는 소규모 로컬 개인 지출 추적기입니다.

다음은 포함되지 않습니다.

  • 은행 계좌 연결

  • 자동 은행 거래 가져오기

  • 사용자 로그인

  • 클라우드 데이터베이스

  • 완전한 그래픽 애플리케이션

  • 재무 예측

주요 목표는 로컬 지출 추적을 위한 간단한 MCP 도구를 제공하는 것입니다.


라이선스

이 프로젝트는 MIT 라이선스를 사용합니다.

LICENSE를 참조하세요.

Available Tools

5 tools
add_expenseC

add a new expense

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYesThe expense date in YYYY-MM-DD format
amountYesThe expense amount, up to 1000000
categoryYesThe normalized expense category
descriptionNoA short optional description of the expense

TDQS

C2.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=false, so the description does not need to restate that this is a write operation. However, it adds no behavioral context beyond what the name implies—it simply restates 'add a new expense', which is effectively a tautology. There is no mention of side effects, idempotency, validation rules, or what happens on conflict, making it entirely uninformative for behavioral expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short (five words), which could be seen as concise, but it is under-specified rather than efficiently structured. It lacks any front-loaded information beyond a bare verb phrase. There is no hierarchy of information; it is merely a label, failing to earn its place by providing any useful detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With four parameters, three of which are required, and no output schema, the description is completely inadequate. It does not mention required fields, expected input format (though schema covers this), possible side effects, or return behavior. An agent has no way to anticipate the tool's behavior or success criteria beyond the raw schema, making the description insufficient for correct invocation in a meaningful context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage of all four parameters, including descriptions for amount, category, date, and optional description. The description adds no parameter-specific meaning, so the baseline score of 3 applies. While the description doesn't harm parameter understanding, it also doesn't supplement the schema or clarify relationships between parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'add a new expense' conveys a clear verb (add) and resource (expense). It is distinct from sibling tools like update_expense and delete_expense simply by the verb 'add', so an agent can infer its core purpose. However, it does not explicitly distinguish itself from potential overlap or specify any scope (e.g., personal vs. shared), so it stops short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or when 'add' is preferred over 'update' or other siblings. An agent is left to infer usage purely from the tool name and schema, which is insufficient for a choice among several expense-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_expenseA
Destructive

delete an existing expense by ID

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the expense

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false, indicating a destructive write operation. The description adds no further behavioral context beyond restating the action; it does not mention side effects, irreversibility, or the nature of the response. It does not contradict the annotations, so it meets the baseline but adds little value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that clearly communicates the action and target. It is front-loaded and contains no extraneous words, achieving appropriate brevity for a simple operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter delete operation with no output schema, the description covers the essential purpose and key parameter. It does not describe return values or error conditions, but these are often standard for delete operations and are not critical given the tool's simplicity. The description is complete enough for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema fully covers the single parameter 'id' with a description, and the tool description also mentions 'by ID', but adds no additional semantic detail beyond what the schema provides. With 100% schema description coverage, the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'delete an existing expense by ID' clearly states the action (delete) and the resource (expense), and specifies the identifier used. It is unambiguous and easily distinguishes from siblings like add_expense, update_expense, and list_expenses through the verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly conveys usage by the verb 'delete', but it does not explicitly state when to use it versus the alternatives, nor does it mention any constraints such as required existence or irreversibility. The context is clear enough for an agent to infer usage, but no explicit guidance or exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_spending_summaryC
Read-only

get a spending summary

ParametersJSON Schema
NameRequiredDescriptionDefault
monthNoA calendar month in YYYY-MM format

TDQS

C2.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is fully covered and the bar is lower. The description adds only the marginal notion that this returns an aggregated summary, but does not disclose what gets aggregated or scoped. It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The phrase is four words with zero waste and a front-loaded verb, which is efficient. However, the brevity stems more from under-specification than from disciplined trimming, so it does not reach the level of a well-packaged, substance-complete definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with one optional parameter and annotations covering safety, this is a simple tool, but the description omits what the summary contains and what happens when month is omitted. With no output schema and no descriptive context, an agent still cannot predict the return shape or default time scope.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% — the single month parameter is fully documented with the description 'A calendar month in YYYY-MM format' and a regex pattern. Per the rubric, the baseline is 3 when the schema does the heavy lifting, and the description adds nothing beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a verb ('get') and a resource ('spending summary'), and it distinguishes itself from the CRUD siblings (add/update/delete/list_expenses) as the aggregation view. However, it essentially restates the tool name ('get_spending_summary' → 'get a spending summary') and adds no new information about what the summary contains, so it sits at minimum viable rather than distinctly helpful.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to choose this tool vs its siblings. There is no mention of how a summary differs from list_expenses, when the optional month should be supplied, or what default scope applies if month is omitted. With four sibling tools, this leaves the decision entirely to the agent's inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_expensesB
Read-only

list expenses with optional filters

ParametersJSON Schema
NameRequiredDescriptionDefault
monthNoA calendar month in YYYY-MM format
categoryNoThe normalized expense category

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true, so the tool is known to be safe. The description adds no behavioral context beyond 'list expenses'—nothing about pagination, sorting, default behavior (e.g., what happens if no filters are provided), or response format. Given annotations cover safety, the description fails to enrich the agent's understanding of how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, short sentence with no redundant words or filler. It is efficiently front-loaded with the core action ('list expenses') and the key feature ('optional filters'). Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 optional params, no nested objects, no output schema) and strong annotations, the description is minimally adequate. However, it does not explain whether the filters can be combined, what the response looks like, or if there are limits. An agent would have to infer these from the schema and typical conventions. It is complete enough for a basic call but leaves room for ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both month and category are fully described in the schema. The description's phrase 'optional filters' adds no extra meaning about semantics like combined filtering or format. The baseline is 3 because the schema carries the full load; the description offers no additional insight.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists expenses and mentions optional filters, which maps to the parameters. It is distinct from the siblings (add/update/delete/spending summary) since 'list' is unambiguous. However, it does not explicitly name the filter dimensions (month, category) or contrast with the summary tool, so it's specific but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. The description does not mention that get_spending_summary is for aggregated data, nor does it indicate that list_expenses is for raw expense details. The usage context is only implied by the verb 'list' and not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_expenseB

update an existing expense by ID

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the expense
dateNoThe expense date in YYYY-MM-DD format
amountNoThe expense amount, up to 1000000
categoryNoThe normalized expense category
descriptionNoA short optional description of the expense

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=false and destructiveHint=false, so the mutation nature is expected. The description adds that it updates an existing expense by ID, implying the target must exist. However, it does not disclose whether it performs a partial update (only provided fields) or a full replacement, nor what happens if the ID is not found. Given the annotations, the additional information is minimal but not contradictory.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, compact sentence that front-loads the core action. There is no filler or redundant information. It earns its place with zero waste, making it exemplarily concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 5 parameters, no output schema, and only basic annotations, the description is insufficiently complete. It does not explain the update semantics (partial vs. full), error behavior for missing ID, or what the tool returns. While parameters are covered by the schema, key operational context is absent, leaving an agent to guess.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% since every parameter (id, date, amount, category, description) has its own description in the schema. The tool description adds no parameter-specific details beyond what the schema already provides. The baseline of 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'update' and identifies the resource 'expense' and the key 'by ID'. It clearly distinguishes from sibling tools (add, delete, list, summary) by indicating this modifies an existing record. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives, such as using add_expense for new expenses or delete_expense for removal. The description relies on the tool name and context, but does not explicitly state conditions or exclusions.

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.

  1. 5 tool updatesv0.1.0
    • First observedadd_expense
    • First observeddelete_expense
    • First observedget_spending_summary
    • First observedlist_expenses
    • First observedupdate_expense

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: add, update, delete, list, and summarize expenses. There is zero overlap, making it easy for an agent to select the right tool for the task.

Naming Consistency5/5

All tools follow the consistent verb_noun pattern (add_expense, update_expense, delete_expense, list_expenses, get_spending_summary). This creates a predictable and uniform naming convention.

Tool Count5/5

With only 5 tools, the server is tightly scoped for a personal expense tracker. Each tool serves a necessary function without unnecessary bloat, and the count is well within the ideal range.

Completeness4/5

The toolset covers full CRUD for expenses (add, update, delete, list) plus a summary function. A minor gap is the lack of a direct 'get_expense' by ID, but the list tool with filters can likely retrieve individual expenses, so it's a workable limitation.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to track personal expenses through natural language interactions with comprehensive category support and financial summaries. Provides both local and remote MCP server options with SQLite storage for fast expense management operations.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server for tracking expenses with local SQLite storage. Provides tools to add, list, and summarize expenses by category.
    -
  • F
    license
    A
    quality
    C
    maintenance
    MCP server for managing personal expenses, enabling users to add, list, and summarize expenses by category, with data stored in a local SQLite database.
    3
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables managing and analyzing personal expenses through MCP tools, including adding expense records, listing expenses within date ranges, and summarizing spending by category, with expense categories exposed as an MCP resource.
    -