Skip to content

eantz/expense-tracker-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Tracker MCP

The basic functionality of this MCP server is to track user's expense. However, the main concept of this MCP server is user can choose their own provider to store the expense. So they can jump switch AI client without losing historical data.

Currently this expense tracker support 2 providers : CSV and Notion.

CSV provider will store csv file to the folder managed by your AI client. For example when using Claude Desktop for Windows, it will be stored in C:\Users\{your_username}\AppData\Local\AnthropicClaude\app-0.9.3. You may need to move this file to another location if you want to switch to another AI client.

Notion provider will store the data to a Notion database. You need to provide Notion integration token and database ID in order to make it work. However with this provider, you don't need to manually move file when swithcing AI client.

In the future, this MCP server can be extended to support more providers such as Google Sheet.

Tech stack

Language : Golang

Libraries :

How to use

Clone this repo and build

Linux : go build -o expense-tracker-mcp .

Windows : GOOS=windows GOARCH=amd64 go build -o expense-tracker-mcp.exe .

Mac : GOOS=darwin GOARCH=amd64 go build -o expense-tracker-mcp . or GOOS=darwin GOARCH=arm64 go build -o expense-tracker-mcp .

disclaimer : I only test build on Windows via WSL

To use with CSV provider

On your AI client (I test this on Claude Desktop), add config for this MCP server

{
    "mcpServers": {
        "expense-tracker": {
            "command": "/path/to/build/output",
            "args": [
				"-provider=csv"
			]
        }
    }
}

To use with Notion provider

  1. Duplicate this Notion template.

There is a duplicate button at the top of the page. Please do not rename any database property / column name since they are needed for the MCP server to work.

  1. Obtain Notion integration token by creating internal integrations and give permission to your recently duplicated template. Follow this guide to setup your integration. Please take note of your integration key, we will need it later.

  2. Take a note of your database ID

    • open your recently duplicated template
    • click triple dots (...) beside database name (in this template, the database name is Expenses)
    • click View Database to open database in full page
    • On your database fullpage view, click Share, and click Copy Link
    • paste your link somewhere and copy its database ID part. Link example : https://www.notion.so/{workspaceID}/{databaseID}?v={versionID}&pvs=4
  3. On your AI client (I test this on Claude Desktop), add config for this MCP server

{
    "mcpServers": {
        "expense-tracker": {
            "command": "/path/to/build/output",
            "args": [
				"-provider=notion",
				"-token=ntn_XXXX",
				"-parentDatabaseId=YYYY"
			]
        }
    }
}
  1. Restart your AI client and enjoy

Limitation

As you can see in How to use section above, using Notion as the provider is quite hard to setup. This is because MCP spec for auth is not in final form yet. Although you can use existing oauth flow as a workaround, I choose not to do it for simplicity purpose. Since to introduce oauth flow in notion your integration should be submitted as a public integration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages