Skip to content

Commit 601ec28

Browse files
committed
adde get_payment_details to MCP example
1 parent 36915db commit 601ec28

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/fastmcp/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,15 @@ async def _pay_lightning(invoice: str, amount: int, currency: str = "USD", descr
3131
description: Optional payment description"""
3232
return handle_response(Fewsats().pay_lightning(invoice, amount, currency, description))
3333

34+
@mcp.tool()
35+
async def _get_payment_details(payment_request_url: str, offer_id: str, payment_method: str, payment_context_token: str) -> str:
36+
"""Get payment details for a payment request.
37+
38+
payment_request_url: URL for the payment request
39+
offer_id: ID of the offer
40+
payment_method: Payment method to use
41+
payment_context_token: Payment context token"""
42+
return handle_response(Fewsats().get_payment_details(payment_request_url, offer_id, payment_method, payment_context_token))
43+
3444
if __name__ == "__main__":
3545
mcp.run()

0 commit comments

Comments
 (0)