
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
expense-log-mcp
Advanced tools
A MCP server that provides tools for logging expenses.
Clone the repository:
git clone https://github.com/evanxd/expense-log-mcp.git
Install dependencies:
npm install
Set up the database:
.env
file in the root of the project..env
file:
DB_USER="postgres"
DB_HOST="localhost"
DB_PORT="5432"
DB_DATABASE="postgres"
DB_PASSWORD="YOUR_DB_PASSWORD"
DATABASE_URL="postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_DATABASE}?schema=public"
npx prisma db push
npm run db:seed
Build the project:
npm run build
Set up the MCP server:
"mcpServers": {
"expense-log-mcp": {
"command": "node",
"args": [
"/path/to/expense-log-mcp/dist/index.js"
],
"env": {
"DATABASE_URL": "postgresql://postgres:YOUR_DB_PASSWORD@localhost:5432/postgres?schema=public"
}
}
}
The server exposes the following tools:
addExpense
Adds a new expense record.
Parameters:
Name | Type | Description |
---|---|---|
ledgerId | string | The ID of the ledger to add the expense to. |
categoryId | string | The ID of the expense category. |
messageId | string | A unique ID for the message to prevent duplicates. |
description | string | A description of the expense. |
amount | number | The amount of the expense. |
payer | string | The name of the person who paid. |
Returns:
A JSON string confirming the expense has been added, e.g.:
{
"success": true,
"code": "OK",
"message": "Expense added successfully.",
"data": {
"expenseId": "clx...456"
}
}
deleteExpense
Deletes an expense record.
Parameters:
Name | Type | Description |
---|---|---|
ledgerId | string | The ID of the ledger the expense belongs to. |
messageId | string | The unique message ID of the expense to be deleted. |
Returns:
A JSON string confirming the expense has been deleted, and including details of the deleted expense, e.g.:
{
"success": true,
"code": "OK",
"message": "Expense deleted successfully.",
"data": {
"id": "clx...123",
"description": "Lunch",
"amount": 15.75,
"createdAt": "Sun Sep 07 2025"
}
}
getExpenseCategories
Retrieves the list of all expense categories.
Parameters:
None.
Returns:
A JSON string containing the list of expense categories, e.g.:
{
"success": true,
"code": "OK",
"message": "Expense categories retrieved successfully.",
"data": [
{
"expenseCategoryId": "clx...1",
"expenseCategoryName": "Transportation"
},
{
"expenseCategoryId": "clx...2",
"expenseCategoryName": "Utilities"
}
]
}
getGroupedExpenses
Retrieves and groups expenses by payer and then by category name, returning the total amount for each category, with optional filters for category IDs, payer, and a date range.
Parameters:
Name | Type | Description |
---|---|---|
ledgerId | string | The ID of the ledger to retrieve expenses from. |
categoryIds | string[] | Optional. An array of category IDs to filter by. |
payer | string | Optional. The name of the payer to filter by. |
startDate | string | Optional. The start date for filtering expenses (ISO 8601 format). |
endDate | string | Optional. The end date for filtering expenses (ISO 8601 format). |
Returns:
A JSON string containing the grouped expenses, e.g.:
{
"success": true,
"code": "OK",
"message": "Grouped expenses retrieved successfully.",
"data": {
"Payer1": {
"expenseCategories": {
"Entertainment": 100,
"Transportation": 50
},
"totalAmount": 150
},
"Payer2": {
"expenseCategories": {
"Dining/Snacks": 75
},
"totalAmount": 75
}
}
}
This project uses Prisma to manage the database schema. The schema is defined in prisma/schema.prisma
and includes the following models:
Ledger
: Represents a collection of expenses.ExpenseCategory
: Represents a category for an expense.Expense
: Represents a single expense record. A unique constraint is added on ledgerId
and messageId
to prevent duplicate expenses.All models include createdAt
and updatedAt
timestamps. IDs are generated using cuid()
.
Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the MIT License.
FAQs
A MCP server that provides tools for logging expenses.
The npm package expense-log-mcp receives a total of 732 weekly downloads. As such, expense-log-mcp popularity was classified as not popular.
We found that expense-log-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.