Skip to main content
Glama

🌾 SelfPaidPal MCP Server

Glama MCP Server npm version MCP Base License: MIT

Model Context Protocol (MCP) server for SelfPaidPal — Autonomous, zero-net-cost payments on Base Mainnet (Chain ID 8453) powered by automated yield farming on Aave V3 and Morpho.

This server provides AI agents (Claude, Cursor, Windsurf, OpenClaw) with tools to analyze yield rates, calculate capital recovery timelines, and construct ready-to-sign EVM transactions and atomic EIP-5792 batch calls.


⚡ Features

  • Zero External Dependencies: Built with native Node.js HTTP/HTTPS modules. Works out-of-the-box on Node 16, 18, 20, and 22+.

  • Non-Custodial: Generates unsigned EVM transaction calldata. Never handles or asks for private keys.

  • 100% Capital Recovery: Computes the exact collateral required to reimburse 100% of the payment and fees over time via DeFi yield.

  • Multi-Protocol Optimization: Automatically selects the most profitable lending protocol between Aave V3 and Morpho on Base.


Related MCP server: Grip MCP

🛠️ Exposed MCP Tools

Tool

Description

Key Parameters

get_rates

Live supply APYs for Aave V3 and Morpho on Base Mainnet.

refresh (boolean, optional)

get_quote

Calculates required collateral, developer fee, yield deposit, and recovery days.

amount (number, required), protocol (auto/aave/morpho)

build_payment

Builds 4 EVM transactions & EIP-5792 batch calls ready for signing.

amount, recipient, sender, protocol


🚀 Installation & Usage

1. Claude Desktop

Add this to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "selfpaid": {
      "command": "npx",
      "args": ["-y", "selfpaid-mcp"]
    }
  }
}

Or run from a local clone:

{
  "mcpServers": {
    "selfpaid": {
      "command": "node",
      "args": ["/path/to/selfpaid-mcp/bin/mcp-server.js"]
    }
  }
}

2. Cursor / Windsurf

Add a new MCP server in settings:

  • Name: selfpaid

  • Type: command

  • Command: npx -y selfpaid-mcp

3. Smithery.ai

Install via Smithery CLI:

npx -y @smithery/cli install @al-toninelli/selfpaid-payments --client claude

🌐 Hosted Infrastructure

This client connects to the official SelfPaid Base Mainnet engine:

  • API Endpoint: https://selfpaid.cryptofolio.it

  • Network: Base Mainnet (Chain ID 8453)

  • Tokens Supported: Native USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)


⚠️ Risk Disclosure

DeFi deposits carry smart contract, market, and liquidity risks. Transactions on Base Mainnet are irreversible. Principal recovery estimates are dynamic and fluctuate based on market lending yields.

📄 License

MIT License — Copyright (c) 2026 Alessandro Toninelli.

Available Tools

3 tools
build_paymentA
Idempotent

Generate ready-to-sign EVM transactions and EIP-5792 atomic batch calls for a zero-net-cost payment on Base (Chain ID 8453). Automatically supplies collateral into Aave V3 or Morpho to recover 100% of the principal + developer fee.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesAmount of USDC to pay to the recipient (e.g. 25).
bufferNoSafety buffer percentage (defaults to 8).
senderYesEthereum address of the payer executing the transactions (0x...).
protocolNoYield protocol to use ('auto', 'aave', or 'morpho'). Defaults to 'auto'.
recipientYesEthereum address of the recipient receiving the payment (0x...).
collateralNoCollateral multiplier (defaults to 20).

Output Schema

ParametersJSON Schema
NameRequiredDescription
chainIdYesTarget EVM Chain ID (8453 for Base)
successYesTrue if transaction generation succeeded
summaryYesDetailed financial summary of the zero-cost payment plan
batchCallsYesEIP-5792 atomic batch calls array for Smart Accounts and Agentic Wallets
transactionsYesOrdered array of 4 sequential EVM transactions for standard wallets

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish this is a non-read-only, non-destructive, idempotent, closed-world write operation. The description adds substantial behavioral context beyond that: it produces unsigned transactions and atomic EIP-5792 batch calls, operates on Base, and automatically supplies collateral into Aave V3 or Morpho to recover principal plus developer fee.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both front-loaded with the most important information: what is generated and the zero-net-cost mechanism. There is no filler or repeated content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity, complete schema descriptions, and an output schema, the description is nearly complete: it covers chain, output type, and collateral recovery mechanics. It could be slightly stronger by stating preconditions or when to call it relative to quote/rate tools, but no critical invocation detail is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaning by explaining that collateral is automatically supplied via Aave V3 or Morpho, which clarifies the protocol and collateral parameters, though it does not add detail for buffer or amount beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: generate ready-to-sign EVM transactions and EIP-5792 atomic batch calls for a zero-net-cost payment. It also pins the domain to Base (Chain ID 8453), clearly separating this construction tool from read-only siblings like get_rates and get_quote.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the phrase 'for a zero-net-cost payment on Base,' but there is no explicit when-to-use guidance or routing relative to get_rates/get_quote. It does not state prerequisites such as needing a quote first, nor does it name exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_quoteB
Read-onlyIdempotent

Calculate collateral requirements, developer fee, yield deposit, and estimated recovery days for a zero-net-cost USDC payment on Base.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesAmount of USDC to pay to the recipient (e.g. 10 or 25.5).
bufferNoSafety buffer percentage (default 8 = 8%).
protocolNoYield protocol to use. 'auto' (recommended) automatically picks the higher yielding protocol.
collateralNoCollateral multiplier (default 20 = 20x the payment amount).

Output Schema

ParametersJSON Schema
NameRequiredDescription
ratesNoLive APY comparison across protocols
feeAmountYes0.5% developer fee in USDC (min 0.1, max 50)
amountToPayYesUSDC amount delivered to recipient
estimatedAPYYesActive APY rate for the chosen protocol
collateralTotalYesBase collateral plus safety buffer in USDC
bufferPercentageNoSafety buffer percentage applied (e.g. 8)
selectedProtocolYesYield protocol selected for capital recovery
yieldDepositAmountYesUSDC deposited into yield protocol to generate returns
totalRequiredAmountYesTotal USDC needed upfront (payment + fee + yield deposit)
collateralMultiplierNoCollateral multiplier used (e.g. 20)
estimatedRecoveryDaysYesEstimated days until earned yield equals payment + fee

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds that this is a pure computation (a quote for a payment), which is useful but does not disclose anything about rate limits, freshness of the quote, or whether results expire.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. It is somewhat list-heavy, but every clause maps to an actual computed output, so nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema exists, so return values need not be re-explained, and annotations cover the safety profile; the description still enumerates the quote components, which helps an agent understand the response shape. The main gap is the missing relationship to build_payment/get_rates, but the core of what an agent needs to call it correctly is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: amount, buffer, protocol (with enum semantics), and collateral are all documented with examples and defaults in the schema. The description adds no parameter-level detail, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (calculate) and precisely enumerates what is computed: collateral requirements, developer fee, yield deposit, and recovery days, scoped to a zero-net-cost USDC payment on Base. That output list makes it distinguishable from get_rates/build_payment in substance, but no sibling is named explicitly, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance is given: the description never states that this is a pre-payment quote to run before build_payment, nor does it contrast with get_rates. Usage is only inferable from the phrase 'for a zero-net-cost USDC payment,' which is context, not instruction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_ratesA
Read-onlyIdempotent

Get real-time supply APYs across Aave V3 and Morpho on Base Mainnet. Automatically indicates the most profitable protocol for capital recovery.

ParametersJSON Schema
NameRequiredDescriptionDefault
refreshNoForce a live on-chain refresh rather than using cached rates (defaults to false).

Output Schema

ParametersJSON Schema
NameRequiredDescription
aaveYesAave V3 supply yield on Base Mainnet
bestYesProtocol with the highest yield
morphoYesMorpho Vault supply yield on Base Mainnet
bestApyYesHighest supply APY currently available
isCachedNoWhether rates were served from in-memory cache
lastUpdatedNoISO 8601 timestamp of last oracle update

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is fully covered. The description adds only that data is real-time and aggregated across two protocols; freshness/caching behavior is left to the schema's refresh parameter rather than the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, zero filler, with the resource, protocols, and chain front-loaded before the profitability note. Every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and annotations cover safety; the description supplies protocol and chain scope plus the profitability signal. It could still note aggregation or update cadence, but nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With a single parameter at 100% schema description coverage, the schema fully documents 'refresh' and its default. The description contributes only the generic notion of 'real-time' data, which loosely maps to the refresh semantics but adds no format or syntax detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Get real-time supply APYs'), scopes it to concrete protocols and chain (Aave V3, Morpho, Base Mainnet), and is clearly distinct from the siblings get_quote and build_payment. An agent can identify the tool's domain without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'the most profitable protocol for capital recovery' suggests when the tool is useful, but there is no explicit when-to-use/when-not guidance and no routing against get_quote or build_payment, which an agent may need to disambiguate rate-checking from quoting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv2.1.3
    • First observedbuild_payment
    • First observedget_quote
    • First observedget_rates

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation4/5

Each tool has a distinct output: market rates, payment calculations, and ready-to-sign transactions. However, get_quote and build_payment both relate to the same payment flow, which could cause confusion about whether quoting is a prerequisite or whether build_payment also returns estimates.

Naming Consistency5/5

All tools follow a clean snake_case verb_noun pattern: get_rates, get_quote, build_payment. The verbs are appropriate to their actions and the convention is applied consistently.

Tool Count5/5

Three tools is well-scoped for a focused DeFi payment-recovery server. Each tool maps to a distinct step (fetch rates, calculate quote, build transaction) and none feels redundant or missing.

Completeness4/5

The surface covers the core workflow: check rates, get a quote, and build the payment transaction. Minor gaps exist around inspecting existing positions or managing repayments/withdrawals, but the stated zero-net-cost payment purpose is largely served.

Related MCP Connectors

Related MCP Servers