@neural-trader/agentic-accounting-mcp
v0.1.1
Published
Model Context Protocol (MCP) server for Claude Desktop integration, exposing intelligent accounting tools, tax calculators, and autonomous agents for AI-powered cryptocurrency financial analysis
Maintainers
Readme
🤖 Agentic Accounting MCP Server
Autonomous Accounting System via Model Context Protocol Expose powerful accounting tools to Claude and other AI assistants through MCP
Integrate advanced tax calculations, compliance checking, fraud detection, and financial reporting directly into Claude Desktop or any MCP-compatible client. Built on the Model Context Protocol, this server provides 10+ specialized accounting tools for autonomous financial operations.
✨ Features
- 🧮 Tax Calculations - Multiple methods (FIFO, LIFO, HIFO, Specific ID, Average Cost)
- 📋 Compliance Checking - Multi-jurisdiction regulatory validation
- 🔍 Fraud Detection - Vector-based anomaly detection with confidence scoring
- 💰 Tax-Loss Harvesting - Automated opportunity scanning for portfolio optimization
- 📊 Report Generation - P&L, Schedule-D, Form 8949, audit trails
- 📥 Transaction Ingestion - Support for Coinbase, Binance, Kraken, Etherscan, CSV
- 📈 Position Tracking - Real-time asset position management
- 🛡️ Merkle Proofs - Cryptographic verification for audit trails
- 🧠 Learning System - Agent performance optimization with feedback loops
- 📉 Performance Metrics - Comprehensive agent analytics and monitoring
🚀 Installation
Method 1: Install from npm
npm install -g @neural-trader/agentic-accounting-mcpMethod 2: Install in your project
npm install @neural-trader/agentic-accounting-mcpMethod 3: Use with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"agentic-accounting": {
"command": "npx",
"args": [
"-y",
"@neural-trader/agentic-accounting-mcp"
]
}
}
}💡 Tip: Restart Claude Desktop after updating the configuration to activate the MCP server.
⚡ Quick Start
Using with Claude Desktop
- Install the server (see Installation above)
- Restart Claude Desktop
- Use accounting tools in conversation:
Claude, can you calculate the tax liability for this Bitcoin sale using FIFO method?Claude will automatically use the accounting_calculate_tax tool to process your request.
Using Programmatically
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
// Server starts automatically when imported
// Tools are available via MCP protocol📖 Detailed Tutorial
1. Tax Calculation Workflow
Calculate capital gains and tax liability using various accounting methods:
In Claude:
I sold 0.5 BTC at $60,000. I originally bought:
- 0.3 BTC at $30,000 on Jan 1
- 0.4 BTC at $40,000 on Feb 1
Calculate my tax using FIFO method.Behind the scenes, Claude uses:
{
"tool": "accounting_calculate_tax",
"arguments": {
"transaction": {
"asset": "BTC",
"quantity": 0.5,
"price": 60000,
"date": "2024-03-01"
},
"method": "FIFO"
}
}Response:
{
"method": "FIFO",
"gainLoss": 12000,
"costBasis": 18000,
"proceeds": 30000,
"taxLiability": 2880
}2. Compliance Checking
Validate transactions against regulatory requirements:
In Claude:
Check if this $15,000 crypto-to-crypto swap complies with US regulations.Tool call:
{
"tool": "accounting_check_compliance",
"arguments": {
"transaction": {
"type": "swap",
"amount": 15000,
"fromAsset": "ETH",
"toAsset": "BTC"
},
"jurisdiction": "US"
}
}⚠️ Warning: Always consult with a licensed tax professional for production tax reporting. This tool provides automated analysis but is not a substitute for professional advice.
3. Fraud Detection
Analyze transactions for suspicious patterns:
In Claude:
Analyze this transaction for fraud:
- $50,000 transfer to new wallet
- Sent at 3 AM
- First transaction from this addressTool call:
{
"tool": "accounting_detect_fraud",
"arguments": {
"transaction": {
"amount": 50000,
"timestamp": "2024-03-01T03:00:00Z",
"toAddress": "0xnew...",
"isFirstTransaction": true
}
}
}Response:
{
"fraudScore": 0.72,
"confidence": 0.85,
"anomalies": [
"Unusual transaction time",
"First-time recipient",
"Large amount"
],
"riskLevel": "MEDIUM"
}4. Tax-Loss Harvesting
Identify opportunities to reduce tax liability:
In Claude:
Scan my portfolio for tax-loss harvesting opportunities:
- 10 ETH bought at $3000 (now $2500)
- 1 BTC bought at $50000 (now $60000)
- 100 SOL bought at $150 (now $100)Tool call:
{
"tool": "accounting_harvest_losses",
"arguments": {
"positions": [...],
"currentPrices": {
"ETH": 2500,
"BTC": 60000,
"SOL": 100
}
}
}5. Report Generation
Generate professional financial reports:
In Claude:
Generate a Schedule-D report for tax year 2024 with all my crypto transactions.Tool call:
{
"tool": "accounting_generate_report",
"arguments": {
"reportType": "schedule-d",
"transactions": [...],
"year": 2024
}
}📝 Note: Reports are generated in JSON format by default. Use the CLI tool for PDF/CSV export.
🔧 Available MCP Tools
1. accounting_calculate_tax
Calculate tax liability using specified accounting method.
Parameters:
transaction(object) - Transaction detailsmethod(string) - FIFO | LIFO | HIFO | SPECIFIC_ID | AVERAGE_COST
2. accounting_check_compliance
Validate transaction compliance with regulatory rules.
Parameters:
transaction(object) - Transaction to validatejurisdiction(string, optional) - US | EU | UK | etc.
3. accounting_detect_fraud
Analyze transaction for fraud using vector-based detection.
Parameters:
transaction(object) - Transaction to analyze
4. accounting_harvest_losses
Scan portfolio for tax-loss harvesting opportunities.
Parameters:
positions(array) - Array of open positionscurrentPrices(object) - Current market prices
5. accounting_generate_report
Generate financial or tax report.
Parameters:
reportType(string) - pnl | schedule-d | form-8949 | audittransactions(array) - Transactions to includeyear(number, optional) - Tax year
6. accounting_ingest_transactions
Ingest transactions from external sources.
Parameters:
source(string) - coinbase | binance | kraken | etherscan | csvdata(array) - Raw transaction data
7. accounting_get_position
Get current position for an asset.
Parameters:
asset(string) - Asset symbol (e.g., "BTC", "ETH")wallet(string, optional) - Wallet identifier
8. accounting_verify_merkle_proof
Verify Merkle proof for transaction audit trail.
Parameters:
transaction(object) - Transaction to verifyproof(object) - Merkle proofrootHash(string) - Expected root hash
9. accounting_learn_from_feedback
Process feedback to improve agent performance.
Parameters:
agentId(string) - Agent identifierrating(number) - Rating from 0 to 1comments(string, optional) - Feedback text
10. accounting_get_metrics
Get performance metrics for an agent.
Parameters:
agentId(string) - Agent identifierstartDate(string, optional) - ISO format dateendDate(string, optional) - ISO format date
⚙️ Configuration
Claude Desktop Configuration
Edit claude_desktop_config.json:
{
"mcpServers": {
"agentic-accounting": {
"command": "npx",
"args": [
"-y",
"@neural-trader/agentic-accounting-mcp"
],
"env": {
"NODE_ENV": "production"
}
}
}
}Environment Variables
# Optional: Set log level
export LOG_LEVEL=debug
# Optional: Database connection
export DB_PATH=/path/to/accounting.dbCustom Configuration
For advanced users, you can run the server directly:
node node_modules/@neural-trader/agentic-accounting-mcp/dist/server.js💡 Integration Examples
Example 1: Complete Tax Workflow
Claude, I need to calculate my 2024 crypto taxes:
1. Import transactions from my Coinbase account
2. Calculate gains using HIFO method
3. Check compliance with US regulations
4. Generate Form 8949
5. Identify any tax-loss harvesting opportunities
Please walk me through each step.Claude will orchestrate multiple tools to complete this workflow automatically.
Example 2: Real-time Fraud Monitoring
Claude, monitor this transaction in real-time:
- Amount: $100,000
- Destination: 0xabc123...
- Time: 2024-11-16T14:30:00Z
Check for fraud indicators and verify the transaction proof.Example 3: Portfolio Analysis
Claude, analyze my portfolio:
- Show current positions for all assets
- Calculate unrealized P&L
- Find tax-loss harvesting opportunities
- Generate a comprehensive report🔗 Related Packages
Part of the Neural Trader Agentic Accounting ecosystem:
- @neural-trader/agentic-accounting-cli - Command-line interface
- @neural-trader/agentic-accounting-core - Core business logic
- @neural-trader/agentic-accounting-agents - Autonomous agents
- @neural-trader/agentic-accounting-types - TypeScript definitions
- @neural-trader/agentic-accounting-engine - Orchestration engine
🐛 Troubleshooting
Server Not Starting
# Check if server is accessible
npx @neural-trader/agentic-accounting-mcp
# Expected output: "Agentic Accounting MCP Server running on stdio"Tools Not Appearing in Claude
- Verify configuration file location
- Restart Claude Desktop completely
- Check for syntax errors in
claude_desktop_config.json - View logs:
~/Library/Logs/Claude/mcp*.log
Permission Issues
# Ensure executable permissions
chmod +x node_modules/.bin/agentic-accounting-mcp💡 Tip: Enable debug logging with
export LOG_LEVEL=debugfor detailed troubleshooting information.
📚 Additional Resources
- Model Context Protocol Documentation
- Claude Desktop Setup Guide
- Neural Trader Documentation
- API Reference
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
📄 License
Licensed under MIT OR Apache-2.0. See LICENSE for details.
🌟 Credits
Created by ruv.io Website: neural-trader.ruv.io
Part of the Neural Trader autonomous trading and accounting platform.
Keywords: model-context-protocol, claude-desktop, ai-tools, mcp-server, accounting-automation, tax-calculation, compliance-checking, fraud-detection, cryptocurrency-accounting, autonomous-agents
