Skip to content

Complete API overhaul with modular architecture#2

Open
BeneStem wants to merge 2 commits into
sourcegate:mainfrom
hackersandwizards:feature/complete-overhaul
Open

Complete API overhaul with modular architecture#2
BeneStem wants to merge 2 commits into
sourcegate:mainfrom
hackersandwizards:feature/complete-overhaul

Conversation

@BeneStem
Copy link
Copy Markdown

Summary

Complete rewrite of the MCP Fathom server with modular architecture, new tools, enhanced features, and bug fixes.

Architecture Refactor

  • Split monolithic index.ts into clean modular structure
  • tools/: meetings, recording, teams, webhooks handlers
  • utils/: date helpers, formatting, retry logic
  • schemas.ts: all Zod schemas in one place
  • constants.ts: configuration values

Type System Fixes

  • calendar_invitees: string[] → rich objects (name/email/is_external)
  • recorded_by: string → object (name/email/team)
  • transcript: string → speaker-tagged entries with timestamps
  • action_items: string[] → objects with assignee/completion status
  • Add duration_minutes calculated from recording timestamps

New Tools

Tool Description
list_teams Discover available team names
list_team_members Discover team membership
create_webhook Create webhook for real-time notifications
delete_webhook Remove webhook by ID

Enhanced Features

  • Pagination: Auto-cursor via listMeetingsWithLimit()
  • Renamed: limitresponse_limit for clarity
  • Date shortcuts: today, yesterday, last_week, last_month, last_quarter
  • Configurable: transcript_search_limit (was hardcoded to 5)
  • Brief mode: ~80% token reduction for large result sets
  • Truncation: max_summary_length, max_transcript_entries

Bug Fixes

  • URL encoding for teams filter (special chars like &)

Error Handling

  • Rate limit retry with exponential backoff
  • Improved error responses

Safeguards

  • Transcript access requires response_limit=1
  • Webhook creation requires at least one include_* option

Test plan

  • npm run build passes
  • list_meetings with response_limit=1 returns 1 meeting
  • list_meetings with date_range=last_week filters correctly
  • list_teams returns available teams
  • list_team_members returns team membership
  • create_webhook with valid URL and include option succeeds
  • brief_mode=true returns minimal fields

🤖 Generated with Claude Code

Architecture Refactor:
- Split monolithic index.ts into modular structure
- Add tools/ directory (meetings, recording, teams, webhooks)
- Add utils/ for date, formatting, and retry helpers
- Extract Zod schemas to tools/schemas.ts
- Add constants.ts for configuration values

Type System:
- Fix calendar_invitees, recorded_by, transcript, action_items types
- Add Team, TeamMember, Webhook type definitions
- Add duration_minutes calculated from recording timestamps

New Tools:
- list_teams: discover available team names
- list_team_members: discover team membership
- create_webhook/delete_webhook: webhook management

Enhanced Features:
- Rename limit → response_limit for clarity
- Auto-cursor pagination via listMeetingsWithLimit()
- Date range shortcuts (today, yesterday, last_week, last_month, last_quarter)
- Configurable transcript_search_limit (was hardcoded to 5)
- Brief mode for ~80% token reduction
- Response truncation (max_summary_length, max_transcript_entries)

Bug Fixes:
- URL encoding for teams filter (special chars like &)

Error Handling:
- Rate limit retry with exponential backoff
- Improved error responses

Safeguards:
- Transcript access requires response_limit=1
- Webhook creation requires at least one include_* option

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@BeneStem BeneStem force-pushed the feature/complete-overhaul branch from 6ea4ea6 to 47f0e2b Compare January 18, 2026 13:11
…erver instructions

Differences vs official Fathom MCP (https://api.fathom.ai/mcp) drove this pass.
Closed two gaps and stole two ideas while preserving this server's wins
(share URLs, webhooks, list_team_members, inline batch fetching, date_range).

Tools:
- search_meetings: rename search_term -> query; AND-logic across whitespace
  words; default search_summary=true; add max_pages (default 10 ~= 250
  meetings); report scanned_meetings in response
- list_meetings: surface next_cursor when results were truncated; accept
  max_pages as alias for response_limit for parity with official MCP
- get_meeting_transcript: accept url param to emit [MM:SS](url?timestamp=N)
  markdown deep-links per speaker entry
- find_person (new): aggregates team_members + calendar invitees from
  recent meetings; description honestly states it does NOT search the
  transcript-speaker index like the official MCP

Server:
- Pass instructions field on init covering grounding, scope (user-scoped
  API key, no "anyone"), tool composition, find_person caveat, and webhook
  confirmation policy

Tests:
- tests/format.test.ts pins share_url preference at format.ts:79 using
  built-in node:test runner; npm run test:unit

README:
- Rewritten around six concrete differentiators vs the official MCP plus
  one honest limitation (find_person scope)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant