Skip to main content

Transaction MCP Server

PyPI MCP Registry

An MCP (Model Context Protocol) server providing comprehensive Ethereum transaction capabilities including building, signing, decoding, and analysis for both legacy and EIP-1559 transactions.

Features

Tools (15 total)

Transaction Building & Signing

  • build_transaction - Build an unsigned transaction
  • sign_transaction - Sign a transaction with a private key
  • build_and_sign_transaction - Build and sign in one step

Transaction Decoding

  • decode_raw_transaction - Decode a signed raw transaction
  • decode_unsigned_transaction - Decode an unsigned transaction
  • recover_transaction_signer - Recover signer from signed transaction

Transaction Analysis

  • estimate_transaction_cost - Estimate gas cost in ETH
  • validate_transaction - Validate transaction fields
  • compare_transactions - Compare two transactions

Gas Utilities

  • convert_gas_units - Convert between wei, gwei, ether
  • calculate_max_cost - Calculate maximum transaction cost

Data Encoding

  • encode_transfer - Encode ERC-20 transfer calldata
  • encode_function_call - Encode arbitrary function call
  • decode_calldata - Decode transaction input data

Serialization

  • serialize_transaction - RLP encode a transaction

Resources (4 total)

  • transaction-types - Documentation on transaction types (Legacy, EIP-2930, EIP-1559)
  • gas-estimation - Guide to gas estimation and optimization
  • chain-ids - Chain ID reference for all networks
  • eip-1559 - EIP-1559 fee mechanism explained

Prompts (4 total)

  • build_transfer_workflow - Guide through building an ETH transfer
  • token_transfer_workflow - Guide through ERC-20 token transfers
  • decode_transaction_workflow - Help decode and analyze transactions
  • gas_optimization_workflow - Optimize transaction gas costs

Installation

pip install transaction-mcp-server

Or install from source:

cd transaction-mcp-server
pip install -e .

Usage

Run the server

transaction-mcp-server

Configure in Claude Desktop

{
  "mcpServers": {
    "transaction": {
      "command": "transaction-mcp-server"
    }
  }
}

Tool Examples

Sign a Simple Transfer

# Input
{
    "to": "0x742d35Cc6634C0532925a3b844Bc9e7595f5b4E2",
    "value": "1000000000000000000",  # 1 ETH in wei
    "nonce": 0,
    "chain_id": 1,
    "max_fee_per_gas": "30000000000",
    "max_priority_fee_per_gas": "2000000000",
    "private_key": "0x..."
}

# Output
{
    "raw_transaction": "0x02f8...",
    "transaction_hash": "0x...",
    "from": "0xABC...",
    "to": "0x742...",
    "value_eth": "1.0",
    "type": "EIP-1559"
}

Decode a Transaction

# Input
{
    "raw_transaction": "0x02f8..."
}

# Output
{
    "type": "EIP-1559 (Type 2)",
    "chain_id": 1,
    "nonce": 0,
    "to": "0x742...",
    "value_wei": "1000000000000000000",
    "value_eth": "1.0",
    "max_fee_per_gas_gwei": "30.0",
    "max_priority_fee_per_gas_gwei": "2.0"
}

Transaction Types

Type EIP Description
Legacy (0) - Original Ethereum transactions
Access List (1) EIP-2930 With access list for gas savings
Dynamic Fee (2) EIP-1559 Base fee + priority fee model

Security Notes

  1. Private keys are NEVER logged or persisted
  2. Transactions are signed OFFLINE - no network connection
  3. Raw transactions must be broadcast separately
  4. For educational and development purposes only

Chain IDs

Chain ID
Ethereum Mainnet 1
Goerli 5
Sepolia 11155111
Polygon 137
Arbitrum One 42161
Optimism 10
Base 8453

License

MIT

Metadata

Release files for transaction-mcp-server 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transaction-mcp-server 1.0.0
File Size Uploaded
transaction_mcp_server-1.0.0.tar.gz 32.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transaction-mcp-server 1.0.0
File Interpreter ABI Platform
transaction_mcp_server-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 69.6 kB

Release files / transaction_mcp_server-1.0.0.tar.gz

Download URL transaction_mcp_server-1.0.0.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8bfbd8eb10aed473862e7e6ee347f51e586d8ec29786575b7efee3f07ae9ae9f
BLAKE2b-256 checksum
How to use checksums
29b5638d5b15dc6026b24c12508435238dc1307e2f8c0d35f8230e1c9cac98ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / transaction_mcp_server-1.0.0-py3-none-any.whl

Download URL transaction_mcp_server-1.0.0-py3-none-any.whl
Size 37.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54b2c81c65c6c608e40b99cd2fc0c066221045b779773deea3075be1ac42a2c0
BLAKE2b-256 checksum
How to use checksums
ce356f9fe672e459c23f9274e0ac57c0518c429ff9958739b38464fc45bb66a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page