MCP ExplorerExplorer

Fewsats MCP Server

@Fewsatson 10 days ago
15 MIT
FreeOfficial
Finance
#payments#wallet#offers
This MCP server integrates with [Fewsats](https://fewsats.com) and allows AI Agents to purchase anything in a secure way.

Overview

What is Fewsats MCP Server

fewsats-mcp is an MCP server that integrates with Fewsats, enabling AI Agents to securely purchase items. It provides a set of tools for managing payments and retrieving information regarding balances, payment methods, and payment details.

Use cases

fewsats-mcp can be utilized in various scenarios where automated purchasing is needed, such as for e-commerce platforms, smart agents requiring secure transaction capabilities, and AI-driven applications that need to handle financial transactions without human intervention.

How to use

To use fewsats-mcp, you can run it with uvx for optimal performance by executing uvx fewsats-mcp or install it using pip with the command pip install fewsats-mcp and then run it as a script by executing fewsats-mcp. Configuration may require integration into applications like Claude Desktop by setting API keys.

Key features

Key features of fewsats-mcp include retrieving wallet balances, listing available payment methods, processing payments for offers through an API, and accessing detailed payment information. It is designed for ease of integration and secure transaction handling.

Where to use

fewsats-mcp can be implemented in AI applications, e-commerce systems, financial services, and any platform needing secure payment processing capabilities. It is specifically geared towards situations that require automated purchasing functionalities.

Content

fewsats-mcp: A Fewsats MCP Server

Overview

This MCP server integrates with Fewsats and allows AI Agents to purchase anything in a secure way.

MCP is

Tools

  1. balance

    • Retrieve the balance of the user’s wallet
    • Input: None
    • Returns: Current wallet balance information
  2. payment_methods

    • Retrieve the user’s payment methods
    • Input: None
    • Returns: List of available payment methods
  3. pay_offer

    • Pays an offer with the specified ID from the l402_offers
    • Input:
      • offer_id (string): String identifier for the offer
      • l402_offer (object): Offer details containing:
        • offers: Array of offer objects with ID, amount, currency, description, title
        • payment_context_token: Payment context token string
        • payment_request_url: URL for payment request
        • version: API version string
    • Returns: Payment status response
  4. payment_info

    • Retrieve the details of a payment
    • Input:
      • pid (string): Payment ID to retrieve information for
    • Returns: Detailed payment information

Installation

Using uv (recommended)

When using uv no specific installation is needed. We will
use uvx to directly run fewsats-mcp.

uvx fewsats-mcp

Using PIP

Alternatively you can install fewsats-mcp via pip:

pip install fewsats-mcp

After installation, you can run it as a script using:

fewsats-mcp

Configuration

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Important: Replace YOUR_FEWSATS_API_KEY with the API key you obtained from Fewsats.com.

Using uvx

Tools

balance
Retrieve the balance of the user's wallet. You will rarely need to call this unless instructed by the user, or to troubleshoot payment issues. Fewsats will automatically add balance when needed.
payment_methods
Retrieve the user's payment methods. You will rarely need to call this unless instructed by the user, or to troubleshoot payment issues. Fewsats will automatically select the best payment method.
pay_offer
Pays an offer_id from the l402_offers. The l402_offer parameter must be a dict with this structure: { 'offers': [ { 'offer_id': 'test_offer_2', # String identifier for the offer 'amount': 1, # Numeric cost value 'currency': 'usd', # Currency code 'description': 'Test offer', # Text description 'title': 'Test Package' # Title of the package } ], 'payment_context_token': '60a8e027-8b8b-4ccf-b2b9-380ed0930283', # Payment context token 'payment_request_url': 'https://api.fewsats.com/v0/l402/payment-request', # Payment URL 'version': '0.2.2' # API version } Returns payment status response. If payment status is `needs_review` inform the user he will have to approve it at app.fewsats.com
payment_info
Retrieve the details of a payment. If payment status is `needs_review` inform the user he will have to approve it at app.fewsats.com

Comments