crypto-transactions-mcp
Uses a Notion database as a backend for persisting crypto transactions, trades, and transfers, with configurable properties and support for querying history.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@crypto-transactions-mcpLog a trade: bought 0.1 BTC at 65000 USDT on Binance."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
crypto-transactions-mcp
MCP server per tracciare transazioni e ordini eseguiti nel mercato crypto.
Espone tool MCP che permettono a un agent LLM (Claude, agy, ecc.) di
registrare trade, swap e trasferimenti con precisione Decimal esatta, e di
interrogare lo storico — con persistenza intercambiabile su un file JSON
locale o su un database Notion.
Quick Start
uv syncper installare le dipendenze.Scegli un backend:
JSON (default, zero config) — salta al punto 3.
Notion — segui prima la sezione "Setup Notion da zero" qui sotto.
Aggiungi il server alla configurazione del tuo host MCP: vedi "Configurazione Claude Desktop" o "Configurazione agy".
Riavvia l'host e prova, ad esempio: "Ho comprato 0.1 BTC su Binance a 65000 USDT, fee 0.0001 BTC, registralo con log_transaction."
Architettura onion:
domain/— entitàCryptoTransaction(Pydantic v2, campi monetari inDecimal).sideèBUY/SELL(trade, incluso uno swap crypto/crypto) oppureTRANSFER(spostamento dello stesso asset tra due custodie); i due casi hanno requisiti diversi validati nel modello stesso (BUY/SELL richiedonoprice/value, TRANSFER richiedeto_exchange)interfaces/— portTransactionRepositoryeTransactionFiltersusecases/—LogTransactionUseCase(trade, upsert con merge parziale),LogTransferUseCase(transfer, stessa semantica di upsert),GetTransactionHistoryUseCaseinfrastructure/— adapter concreti del portTransactionRepository:JsonTransactionRepository, file JSON locale, path fissodata/crypto_transactions.jsonNotionTransactionRepository, database Notion (vedi sotto)
delivery/— serverFastMCP, tool MCP (log_transaction,log_transfer,get_transaction_history), wiring delle dipendenze infactories.py
Related MCP server: Expense Tracker MCP Server
Tool MCP
log_transaction— trade BUY/SELL, incluso uno swap tra due crypto (es. ETH/BTC): stessa forma di un trade normale, non serve un tool a parte. Supportafiat_value/fiat_currencyopzionali per fissare il controvalore fiat al momento dello scambio — fortemente consigliato per gli swap crypto/crypto, dove il soloprice(cambio relativo tra le due crypto) non permette di calcolare a posteriori il P&L realizzato né il cost-basis fiat del nuovo asset ricevuto.log_transfer— spostamento dello stesso asset tra due custodie (exchange→to_exchange), non un trade: nienteside/price, ma richiedeto_exchange.get_transaction_history— storico di entrambi, con filtri opzionali (symbol,exchange,sideincluso"TRANSFER",date_from/date_to).
Setup
uv syncCopia .env.example in .env e valorizzalo: viene caricato automaticamente
all'avvio (main.py chiama load_dotenv()). Questo funziona anche quando il
server è lanciato da un host esterno (Claude Desktop, agy, ...) con
uv run --directory <path> main.py, perché --directory imposta la working
directory del processo sulla root del progetto, dove load_dotenv() cerca
.env di default — non serve duplicare i secret nel JSON di config
dell'host, che spesso è meno protetto di un .env locale gitignored.
Backend di persistenza
Selezionabile con la variabile d'ambiente TRANSACTION_REPOSITORY_BACKEND:
json(default) — nessuna configurazione aggiuntiva richiesta.notion— richiedeNOTION_TOKEN(token dell'integration Notion) eNOTION_DATABASE_ID.
Setup Notion da zero
Se non hai già un'integration Notion collegata a questo progetto, segui questi passi in ordine (richiede un account Notion con permessi di creare integration nel workspace):
Crea l'integration — vai su notion.so/my-integrations → "+ New integration" → dai un nome (es. "Crypto Transactions MCP") → scegli il workspace → tipo "Internal".
Abilita le capabilities — nella pagina di configurazione dell'integration, sotto "Capabilities", abilita: Read content, Update content, Insert content.
Copia il token — tab "Secrets" → copia il valore di "Internal Integration Secret" (inizia con
secret_ontn_). Questo è il tuoNOTION_TOKEN.Crea il database — in Notion, crea un nuovo database (full-page o inline) e configuralo con esattamente le property elencate nella tabella sotto. La colonna "title" che Notion crea di default (di solito "Name") va rinominata in
Transaction ID: ogni database Notion ne ha obbligatoriamente una, non è il nome del database ma la colonna che identifica ogni riga.Condividi il database con l'integration — apri la pagina del database → menu "..." in alto a destra → "Connections" → cerca e collega l'integration creata al punto 1. Senza questo passaggio l'API risponde 404 anche con un token valido, perché i permessi Notion sono per-pagina, non workspace-wide.
Trova il database ID — è nell'URL della pagina del database:
https://www.notion.so/<ID-senza-trattini>?v=.... Ad esempio, dahttps://www.notion.so/abcdef0123456789abcdef0123456789?v=...l'ID èabcdef0123456789abcdef0123456789. Questo è il tuoNOTION_DATABASE_ID.Configura le variabili — nel tuo
.env(vedi sopra), o nel bloccoenvdell'host MCP:TRANSACTION_REPOSITORY_BACKEND=notion NOTION_TOKEN=<il secret del punto 3> NOTION_DATABASE_ID=<l'id del punto 6>
Il database Notion deve avere queste property (nome esatto e tipo):
Property | Tipo |
| title |
| rich_text |
| select |
| select |
| select |
| select ( |
| date (con orario, UTC) |
| number |
| number |
| number |
| number |
| select |
| number |
| select |
| rich_text |
To Exchange, Price, Value, Fiat Value, Fiat Currency possono essere
vuoti (non si applicano a un TRANSFER, o sono opzionali su un trade).
Nota: i campi numerici su Notion sono number nativi (float64), non Decimal
esatti come nel backend JSON — sufficiente per gli importi reali di trading,
ma soggetto ai limiti di precisione di un float a doppia precisione.
Test
uv run pytestEsecuzione manuale
uv run main.pyConfigurazione Claude Desktop
Aggiungi al file claude_desktop_config.json (su macOS:
~/Library/Application Support/Claude/claude_desktop_config.json). Con un
.env già configurato alla root del progetto (vedi sopra) basta questo,
nessun secret nel JSON:
{
"mcpServers": {
"crypto-transactions": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/crypto-transactions-mcp",
"main.py"
]
}
}
}In alternativa, se preferisci non usare un file .env, puoi passare le
variabili direttamente nel blocco env (sovrascrivono quelle di .env se
presenti entrambe):
{
"mcpServers": {
"crypto-transactions": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/crypto-transactions-mcp",
"main.py"
],
"env": {
"TRANSACTION_REPOSITORY_BACKEND": "notion",
"NOTION_TOKEN": "secret_...",
"NOTION_DATABASE_ID": "abcdef0123456789abcdef0123456789"
}
}
}
}Configurazione agy
Stesso schema mcpServers, ma nel file .agents/mcp_config.json alla root del
progetto in cui usi agy (aggiungi la voce crypto-transactions accanto agli
altri server già presenti, senza rimuoverli). Vale la stessa cosa: con .env
configurato non serve il blocco env:
{
"mcpServers": {
"crypto-transactions": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/crypto-transactions-mcp",
"main.py"
]
}
}
}Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceAgent-native, self-hosted MCP server for crypto trading and DeFi management. Enables agents to query balances, execute trades, and manage positions with a policy engine and secure key storage.Last updated7Apache 2.0
- Flicense-qualityDmaintenanceA powerful SQLite-backed expense tracking server built with the Model Context Protocol (MCP). This server allows AI agents (like Claude) to manage your personal finances by adding, deleting, and listing expenses directly from your chat interface.Last updated
- Alicense-qualityDmaintenanceMCP server for cryptocurrency trading across multiple exchanges (Bybit, Binance, KuCoin, etc.) with real-time price data, comparison, and natural language query support. Integrates with AI assistants via the Model Context Protocol.Last updatedMIT
- Flicense-qualityBmaintenanceA lightweight MCP server that lets LLM clients track, query, and summarize personal expenses using a local SQLite database.Last updated
Related MCP Connectors
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bolesk/crypto-transactions-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server