Skip to content

feat: add Autumn payment platform MCP connector#68

Open
mattzcarey wants to merge 1 commit intomainfrom
claude/issue-62-20250821-2007
Open

feat: add Autumn payment platform MCP connector#68
mattzcarey wants to merge 1 commit intomainfrom
claude/issue-62-20250821-2007

Conversation

@mattzcarey
Copy link
Contributor

@mattzcarey mattzcarey commented Aug 21, 2025

Add comprehensive Autumn connector for payment and billing platform

Summary

Implemented a production-ready MCP connector for Autumn, an open-source payment and billing platform for SaaS startups.

Features

  • 7 tools for customer management, product attachment, usage tracking
  • 1 resource for customer information access
  • Full TypeScript support with Zod validation
  • Comprehensive test coverage (10 tests)
  • Production-ready error handling and authentication

Fixes

Closes #62

🤖 Generated with Claude Code


Summary by cubic

Adds a production-ready MCP connector for Autumn, enabling customer, product, feature access, usage tracking, and billing flows. Registers the connector, adds comprehensive tests, and improves the test mock context.

  • New Features
    • 7 tools: get/create customer, attach product, check access, track usage, list products, get billing portal
    • 1 resource: customer_info (autumn://customer/{customer_id})
    • Type-safe schemas with Zod and robust error handling
    • Config: apiKey credential and optional baseUrl
    • Connector registered in index; mock context now accepts credentials/setup options

- Add comprehensive Autumn connector with 7 tools and 1 resource
- Tools: get/create customer, attach product, check access, track usage, list products, billing portal
- Include TypeScript interfaces for all API responses
- Full test coverage with MSW mocking
- Production-ready with proper error handling and authentication

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Matt <mattzcarey@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 21, 2025 20:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive MCP connector for Autumn, an open-source payment and billing platform for SaaS startups. The connector provides tools for customer management, product attachment, usage tracking, and billing portal access.

  • Implements 7 tools and 1 resource for Autumn platform integration
  • Adds complete TypeScript support with Zod validation and proper error handling
  • Includes comprehensive test coverage with 10 test cases using MSW for API mocking

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/mcp-connectors/src/index.ts Registers the new Autumn connector in the main connector index
packages/mcp-connectors/src/connectors/autumn.ts Core Autumn connector implementation with 7 tools and 1 resource
packages/mcp-connectors/src/connectors/autumn.spec.ts Comprehensive test suite with MSW mocking for all tools
packages/mcp-connectors/src/mocks/context.ts Enhanced mock context helper to support credentials and setup options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Access: ${result.access ? 'Granted' : 'Denied'}
- Unlimited: ${result.unlimited || false}
- Balance: ${result.balance || 0}
- Usage: ${result.usage || 0}`;
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback value || 0 may mask undefined values that should be displayed as 'N/A' for consistency with other tools. Consider using the same pattern as lines 253-254 where undefined values are displayed as 'N/A'.

Suggested change
- Usage: ${result.usage || 0}`;
- Usage: ${result.usage || 'N/A'}`;

Copilot uses AI. Check for mistakes.
- Access: ${result.access ? 'Granted' : 'Denied'}
- Unlimited: ${result.unlimited || false}
- Balance: ${result.balance || 0}
- Usage: ${result.usage || 0}`;
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback value || 0 may mask undefined values that should be displayed as 'N/A' for consistency with other tools. Consider using the same pattern as lines 253-254 where undefined values are displayed as 'N/A'.

Suggested change
- Usage: ${result.usage || 0}`;
- Balance: ${result.balance ?? 'N/A'}
- Usage: ${result.usage ?? 'N/A'}`;

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

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.

Autumn connector

2 participants