Almega
@almega-ai
Give your AI agents a wallet they can't abuse. Almega is an MCP server that puts a control layer in front of every payment: per-agent spending limits, allow-listed categories, 1-click human approval on sensitive transactions, and a full audit ledger. Two backends ship in one file
概要
What is Almega?
Almega is a wallet and guardrail for AI agents, exposed as a Model Context Protocol (MCP) server. It lets any MCP-compatible client (Claude Desktop, Claude Agent SDK, etc.) give agents hard spending limits, a human approval step, and a full ledger. It ships with two backends: memory (in-process, zero setup) and stripe (real Stripe Issuing test-mode cardholders and virtual cards).
How to use Almega?
Install via pip install almega-mcp or run with uvx almega-mcp. For the Stripe backend, set environment variables ALMEGA_BACKEND=stripe and STRIPE_SECRET_KEY=sk_test_.... Configure Claude Desktop’s MCP server JSON to point to almega_mcp.py with those variables. Then agents can call tools like open_wallet, pay, approve_pending, reject_pending, get_wallet, list_transactions, and reset. Two resources (almega://wallets, almega://ledger) are also available.
Key features of Almega
- Wallet with monthly limit, allow/block rules, and approval threshold.
- Pay tool returns
APPROVED,BLOCKED, orAWAITING_YOU. - Human can approve or reject pending transactions.
- Full ledger with filtering by agent and status.
- Memory backend needs no accounts or env vars.
- Stripe backend creates real test-mode cards visible in Stripe dashboard.
Use cases of Almega
- Give an AI agent a budget and watch it attempt payments in real time.
- Demo human-in-the-loop approval for sensitive purchases.
- Experiment with Stripe Issuing test-mode without touching live cards.
- Script a multi‑step scenario to exercise spend rules and approvals.
FAQ from Almega
What backends does Almega support?
Two: memory (in‑process, everything lost on restart) and stripe (real Stripe Issuing test‑mode cardholders and cards, no real money).
Does Almega persist wallet data between restarts?
No. Wallets live in memory. With the Stripe backend, cardholders and cards remain in Stripe, but the agent‑to‑card link is forgotten on restart.
Can I use Almega with live money?
No. The Stripe backend only accepts test‑mode secret keys (sk_test_...). Almega refuses to start with a live key.
What are the dependencies and runtime requirements?
Python 3.10+ is recommended. Install mcp[cli], stripe, and requests. No external accounts needed for the memory backend.
Is there any authentication or access control?
No. Anyone with an MCP connection to Almega can call any tool or access all resources.