Agent skill

Add MCP Tool

by letehaha in letehaha/moneymatter

Add a new tool to the MoneyMatter MCP server. An agent skill from letehaha/moneymatter.

AGPL-3.0Auto-check: notesAgent Workflows

Install Add MCP Tool

skills CLI
$ npx skills add letehaha/moneymatter --skill add-mcp-tool -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letehaha/moneymatter add-mcp-tool --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letehaha/moneymatter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-mcp-tool .claude/skills/add-mcp-tool && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-mcp-tool
GitHub stars
162
Token cost
~1.9k tokens
SKILL.md length
669 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Add a new tool to the MoneyMatter MCP server. An agent skill from letehaha/moneymatter.

  • Works in 7 steps: Create the tool file → Register the tool in server.ts → Update server-card.json → …
  • The user asks to add MCP tool
  • SKILL.md covers When to use, Architecture at a glance, Checklist (complete every step) and Anti-patterns, plus 1 more section
  • Calls npm; reaches mcp.moneymatter.app

What it does

Add MCP Tool is an agent skill from letehaha/moneymatter. Add a new tool to the MoneyMatter MCP server. Auto-triggers when the user asks to "add MCP tool", "new MCP tool", "expose X via MCP", or when exposing any existing backend service to MCP clients. Handles every metafile the drift tests check.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol. The repository describes itself as: Open-source, self-hosted budget tracker and personal finance app. Bank sync, multi-currency, investments, and a built-in MCP server for Claude and ChatGPT. The licence is AGPL-3.0.

When your agent uses it

  • The user asks to add MCP tool
  • Expose X via MCP
  • Exposing any existing backend service to MCP clients

Example prompts

  • “add MCP tool”
  • “new MCP tool”
  • “expose X via MCP”
  • “/add-mcp-tool”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Create the tool file
  2. Register the tool in server.ts
  3. Update server-card.json
  4. Update the connect-moneymatter SKILL.md
  5. Recompute SKILL.md sha256
  6. Verify drift tests pass
  7. Lint check (optional but cheap)

What it can do on your machine

Read from SKILL.md and the folder at commit 3e49eef. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mcp.moneymatter.app

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add MCP Tool loads about 1.9k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 669 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Grep, Glob, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from letehaha/moneymatter at commit 3e49eef, republished under its AGPL-3.0 licence (© letehaha). 669 words, ~1,866 tokens.

Download SKILL.mdSave it as .claude/skills/add-mcp-tool/SKILL.md (or your agent's skills folder).
name
add-mcp-tool
description
Add a new tool to the MoneyMatter MCP server. Auto-triggers when the user asks to "add MCP tool", "new MCP tool", "expose X via MCP", or when exposing any existing backend service to MCP clients. Handles every metafile the drift tests check.
allowed-tools
Read, Write, Edit, Grep, Glob, Bash

Add MCP Tool

Adds a new tool to the MCP server at https://mcp.moneymatter.app/mcp without breaking any drift check.

When to use

  • User asks to add/expose a new MCP tool
  • User wants an existing backend service callable by MCP clients (Claude Desktop, ChatGPT, etc.)
  • Any time the tool list at packages/frontend/public/.well-known/mcp/server-card.json needs to grow

Architecture at a glance

Each MCP tool is a thin wrapper over an existing backend service:

Service (@services/...)
  ↓ called by
MCP tool file (packages/backend/src/services/mcp/tools/<name>.ts)
  ↓ registered in
createMcpServer() (packages/backend/src/services/mcp/server.ts)

Three metafiles stay in sync via drift tests:

  • packages/frontend/public/.well-known/mcp/server-card.json — machine-readable tool list
  • packages/frontend/public/skills/connect-moneymatter/SKILL.md — human-readable agent skill
  • packages/frontend/public/.well-known/agent-skills/index.json — contains sha256 of the SKILL.md above

Checklist (complete every step)

When adding tool my_new_tool:

1. Create the tool file

Path: packages/backend/src/services/mcp/tools/my-new-tool.ts (kebab-case filename)

Use this template verbatim. Adjust imports, tool name, description, inputSchema, service call, and tool: string in trackMcpToolUsed.

typescript
import { trackMcpToolUsed } from '@js/utils/posthog';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { myService } from '@services/path/to/my-service';
import { z } from 'zod';

import { getUserId, jsonContent } from './helpers';

const inputSchema = {
  someId: z.number().describe('...'),
  optionalFilter: z.string().optional().describe('...'),
};

export function registerMyNewTool(server: McpServer) {
  server.registerTool(
    'my_new_tool',
    {
      description: 'What it returns and when an agent should call it. One sentence plus a hint on key fields.',
      inputSchema,
    },
    async (args, extra) => {
      const userId = getUserId({ extra });
      trackMcpToolUsed({ userId, tool: 'my_new_tool', clientId: extra.authInfo?.clientId });

      const result = await myService({ userId, ...args });
      return jsonContent({ data: result });
    },
  );
}

Rules:

  • Tool name is snake_case (matches MCP convention) and must exactly equal the string in server-card.json.
  • Register function is register<PascalCase>. File is <kebab-case>.ts.
  • inputSchema is a plain object of Zod schemas (no outer z.object(...)), declared as a module-scope const, never inline inside registerTool(). Every MCP session builds its own McpServer, so an inline shape is rebuilt per session (zod v4 schemas are ~30 KB each).
  • For tools with no inputs: omit inputSchema and drop the args parameter — handler becomes async (extra) => {...}.
  • Always call getUserId({ extra }) first — it enforces auth and returns userId.
  • Always call trackMcpToolUsed({ userId, tool, clientId: extra.authInfo?.clientId }) immediately after.
  • Wrap the final response in jsonContent({ data }). Money instances auto-serialize to decimals via toJSON() in JSON.stringify.
  • Use z.enum([...]) for enum args — match the style in search-transactions.ts.
  • Dates: pass ISO strings in and convert with new Date(args.date) if the underlying service expects a Date.
2. Register the tool in server.ts

Add the import (alphabetical) and call it inside createMcpServer():

typescript
import { registerMyNewTool } from './tools/my-new-tool';
// ...
registerMyNewTool(server);
3. Update server-card.json

Path: packages/frontend/public/.well-known/mcp/server-card.json

Append to the tools[] array:

json
{
  "name": "my_new_tool",
  "description": "Short third-person description. Match what clients see."
}

The name MUST match the string in step 1 exactly. The drift test compares sorted arrays by string equality.

4. Update the connect-moneymatter SKILL.md

Path: packages/frontend/public/skills/connect-moneymatter/SKILL.md

Add a row to the "Available tools" table under the correct conceptual group (accounts vs investments vs analytics vs categories/tags). Use the SAME column layout (keep table alignment padded).

If the new tool introduces a new data convention (e.g. investments vs regular transactions), also add a bullet under "Data conventions".

5. Recompute SKILL.md sha256
bash
shasum -a 256 packages/frontend/public/skills/connect-moneymatter/SKILL.md

Take the hex digest and update it in packages/frontend/public/.well-known/agent-skills/index.json:

json
{
  "skills": [
    {
      "name": "connect-moneymatter",
      ...
      "sha256": "<paste digest here>"
    }
  ]
}

Forgetting this step breaks agent-skills-drift.unit.ts.

Show full SKILL.md (280 more words)Show less
6. Verify drift tests pass
bash
cd packages/backend
npm run test:unit -- --testPathPattern='mcp/(server-card-drift|agent-skills-drift)'

Expect 7 passing assertions across 2 suites. If any fail:

  • tools array mismatch → name in source and server-card.json don't match. Check for typos.
  • every tool has a non-empty description → description missing in server-card.json.
  • sha256 matches → re-run shasum -a 256 and paste again.
  • every skill URL resolves → SKILL.md file path is wrong.

Delegate to the test-runner subagent (per CLAUDE.md rules).

7. Lint check (optional but cheap)

Delegate to the linter subagent. Existing MCP tool files may show 4 TS1005-style errors from an ioredis env issue — that's pre-existing noise and not caused by new tools. Real errors look different (unused imports, mistyped service args, wrong Zod shape).

Anti-patterns

  • Do not bypass getUserId or skip trackMcpToolUsed. These are enforced across all existing tools.
  • Do not call services with raw: true or reach past the service layer. Use the @services/* function as-is.
  • Do not add custom auth logic — all auth flows through the OAuth bearer token resolved by extra.authInfo.
  • Do not version-bump serverInfo.version unless the change is breaking (removing/renaming a tool, removing a field). Adding a new tool is additive and needs no version bump. The drift test compares serverInfo.version to the version constant in server.ts — keep them identical either way.
  • Do not add e2e tests for individual tools. Coverage is via drift tests + the shared connected-apps.e2e.ts.

Reference examples

Representative tools to copy from:

  • No args: tools/get-user-profile.ts
  • Single filter + pagination: tools/get-accounts.ts
  • Many optional filters + pagination + enum: tools/search-transactions.ts
  • Conditional branch based on args: tools/get-balance-history.ts

Helpers available from ./helpers:

  • getUserId({ extra }) — throws if unauthenticated
  • jsonContent({ data }) — wraps in MCP content envelope
  • parseScopes({ scopes }) — only useful in auth-adjacent code, not individual tools

Analytics: trackMcpToolUsed lives at @js/utils/posthog. It's a no-op outside production.

© letehaha, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/add-mcp-tool of letehaha/moneymatter.

Open the folder on GitHubat commit 3e49eef

Compare with similar skills

Add MCP Tool next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add MCP Tool compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add MCP Tool this skillletehaha/moneymatter162—~1.9kAutomated safety check: NotesAGPL-3.0
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k4 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 4 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Migrates the compatible subset of settings and global file-based MCP servers from the Warp desktop app into Warp Agent CLI without exposing credentials or state.

    65k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check passed

More from letehaha/moneymatter

All 10 skills in this repo
  • Spec Planner

    letehaha/moneymatter

    Deep-dive specification planner. An agent skill from letehaha/moneymatter.

    162 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • Find Slop

    letehaha/moneymatter

    Hunt "AI slop" in this codebase — duplication, reinvented wheels, over-engineering, defensive cruft, dead code, comment slop, performance antipatterns.

    162 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Frontend Rules

    letehaha/moneymatter

    Frontend conventions and component usage rules. An agent skill from letehaha/moneymatter.

    162 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed
  • I18n Before Release

    letehaha/moneymatter

    Occasional i18n catch-up: strip unused en keys, then fill any uk translations that slipped through via i18n-editor subagents.

    162 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • E2E Test Creator

    letehaha/moneymatter

    Creates backend e2e tests for new or existing endpoints. An agent skill from letehaha/moneymatter.

    162 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check: warnings
  • Prd Creator

    letehaha/moneymatter

    Smart PRD generator. An agent skill from letehaha/moneymatter.

    162 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Add MCP Tool

What does Add MCP Tool do?

Add a new tool to the MoneyMatter MCP server. An agent skill from letehaha/moneymatter. Add MCP Tool is an agent skill from letehaha/moneymatter. Add a new tool to the MoneyMatter MCP server.

When should I use Add MCP Tool?

Add MCP Tool fits situations like: the user asks to add MCP tool; expose X via MCP; exposing any existing backend service to MCP clients.

How do I install Add MCP Tool in Claude Code?

Run `npx skills add letehaha/moneymatter --skill add-mcp-tool -a claude-code`. Or copy the skill folder (.claude/skills/add-mcp-tool in letehaha/moneymatter) into .claude/skills/add-mcp-tool in your project. Claude Code loads it when a task matches its description.

How do I install Add MCP Tool in Codex?

Run `npx skills add letehaha/moneymatter --skill add-mcp-tool -a codex`. Or copy the skill folder (.claude/skills/add-mcp-tool in letehaha/moneymatter) into .agents/skills/add-mcp-tool in your project. Codex loads it when a task matches its description.

Can I use Add MCP Tool in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letehaha/moneymatter --skill add-mcp-tool -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-mcp-tool, .gemini/skills/add-mcp-tool, .github/skills/add-mcp-tool and .opencode/skills/add-mcp-tool in your project.

What does Add MCP Tool need to run?

Going by SKILL.md and its folder, Add MCP Tool needs the command-line tools its instructions call (npm). Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash.

Does Add MCP Tool access the network?

SKILL.md names 1 domain. In commands or code: mcp.moneymatter.app; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Add MCP Tool safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Add MCP Tool use?

Add MCP Tool is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add MCP Tool use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add MCP Tool?

Skills that share tags, products or a category with Add MCP Tool: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Crush Configuration (charmbracelet/crush, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add MCP Tool?

letehaha (a GitHub user) maintains it in letehaha/moneymatter, which has 162 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 9, 2026.

Source: letehaha/moneymatter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.