+
Skip to content

QSchlegel/blockfrost-mcp

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

MCP: Cardano Tools via Blockfrost API

This project exposes Cardano blockchain tools to AI agents and apps using the Model Context Protocol (MCP) and wraps the Blockfrost API for seamless Cardano blockchain data access.

Live demo: The MCP server is also deployed at https://mesh-mcp.vercel.app — you can use this URL directly in your MCP client (like Cursor) to try it out without running locally.

What does it do?

  • Provides an MCP server endpoint at /mcp
  • Wraps the Blockfrost API to provide Cardano blockchain data
  • Lets AI clients (like Cursor) call Cardano tools such as:

Available MCP Tools

Address Tools

  • getAddressBalance: Get the balance of an address
  • getAddressUtxos: Get the UTXOs for an address
  • getAddressTransactions: Get the transactions for an address
  • getAddressExtended: Get extended information for an address
  • getAddressTotal: Get total information for an address
  • getAddressUtxosByAsset: Get the UTXOs for an address and asset

Account Tools

  • getAccount: Get the account info for a stake address
  • getAccountRewards: Get the rewards for a stake address
  • getAccountHistory: Get the history for a stake address
  • getAccountDelegations: Get the delegations for a stake address
  • getAccountRegistrations: Get the registrations for a stake address
  • getAccountWithdrawals: Get the withdrawals for a stake address
  • getAccountMirs: Get the MIRs (Move Instantaneous Rewards) for a stake address
  • getAccountAddresses: Get the addresses associated with a stake address
  • getAccountAddressesAssets: Get the assets for addresses associated with a stake address
  • getAccountAddressesTotal: Get the total balance for addresses associated with a stake address
  • getAccountUtxos: Get the UTXOs for a stake address

Asset Tools

  • getAssets: Get a list of assets
  • getAsset: Get information about a specific asset
  • getAssetHistory: Get the mint/burn history for a specific asset
  • getAssetTransactions: Get the transaction history for a specific asset
  • getAssetAddresses: Get the list of addresses holding a specific asset
  • getAssetsByPolicy: Get the list of assets under a specific policy

Block Tools

  • getLatestBlock: Get the latest block
  • getLatestBlockTxs: Get the transactions in the latest block
  • getLatestBlockTxsCbor: Get the CBOR of transactions in the latest block
  • getBlock: Get a block by hash or number
  • getBlockNext: Get the next block(s) after a given block hash or number
  • getBlockPrevious: Get the previous block(s) before a given block hash or number
  • getBlockBySlot: Get a block by slot number
  • getBlockByEpochSlot: Get a block by epoch number and slot number
  • getBlockTxs: Get the transactions in a block by hash or number
  • getBlockTxsCbor: Get the CBOR of transactions in a block by hash or number
  • getBlockAddresses: Get the addresses in a block by hash or number

Epoch Tools

  • getLatestEpoch: Get the latest epoch
  • getLatestEpochParameters: Get the latest epoch parameters
  • getEpoch: Get an epoch by number
  • getEpochNext: Get the next epoch(s) after a given epoch number
  • getEpochPrevious: Get the previous epoch(s) before a given epoch number
  • getEpochStakes: Get the stakes for a given epoch number
  • getEpochStakesByPool: Get the stakes for a given epoch number and pool ID
  • getEpochBlocks: Get the blocks for a given epoch number
  • getEpochBlocksByPool: Get the blocks for a given epoch number and pool ID
  • getEpochParameters: Get the parameters for a given epoch number

Governance Tools

  • getGovernanceDreps: Get all DReps
  • getGovernanceDrep: Get a DRep by ID
  • getGovernanceDrepDelegators: Get delegators for a DRep by ID
  • getGovernanceDrepMetadata: Get metadata for a DRep by ID
  • getGovernanceDrepUpdates: Get updates for a DRep by ID
  • getGovernanceDrepVotes: Get votes for a DRep by ID
  • getGovernanceProposals: Get all governance proposals
  • getGovernanceProposal: Get a governance proposal by tx_hash and cert_index
  • getGovernanceProposalParameters: Get parameters for a governance proposal by tx_hash and cert_index
  • getGovernanceProposalWithdrawals: Get withdrawals for a governance proposal by tx_hash and cert_index
  • getGovernanceProposalVotes: Get votes for a governance proposal by tx_hash and cert_index
  • getGovernanceProposalMetadata: Get metadata for a governance proposal by tx_hash and cert_index

Mempool Tools

  • getMempool: Get the list of mempool transactions
  • getMempoolByHash: Get a mempool transaction by hash
  • getMempoolByAddress: Get mempool transactions for an address

Metadata Tools

  • getMetadataTxsLabels: Get all transaction metadata labels
  • getMetadataTxsLabelsByLabel: Get transaction metadata for a specific label
  • getMetadataTxsLabelsByLabelCbor: Get CBOR metadata for a specific label

Network Tools

  • getNetwork: Get network information
  • getNetworkEras: Get network eras information

Pool Tools

  • getPools: Get a list of pools
  • getPoolsExtended: Get a list of extended pools
  • getPoolsRetired: Get a list of retired pools
  • getPoolsRetiring: Get a list of retiring pools
  • getPool: Get information about a specific pool by pool_id
  • getPoolHistory: Get the history for a specific pool by pool_id
  • getPoolMetadata: Get the metadata for a specific pool by pool_id
  • getPoolRelays: Get the relays for a specific pool by pool_id
  • getPoolDelegators: Get the delegators for a specific pool by pool_id
  • getPoolBlocks: Get the blocks for a specific pool by pool_id
  • getPoolUpdates: Get the updates for a specific pool by pool_id
  • getPoolVotes: Get the votes for a specific pool by pool_id

Script Tools

  • getScripts: Get a list of scripts
  • getScript: Get information about a specific script by script_hash
  • getScriptJson: Get the JSON for a specific script by script_hash
  • getScriptCbor: Get the CBOR for a specific script by script_hash
  • getScriptRedeemers: Get the redeemers for a specific script by script_hash
  • getScriptDatum: Get the datum for a specific datum_hash
  • getScriptDatumCbor: Get the CBOR for a specific datum_hash

Transaction Tools

  • getTx: Get information about a transaction by hash
  • getTxUtxos: Get UTXOs for a transaction by hash
  • getTxStakes: Get stakes for a transaction by hash
  • getTxDelegations: Get delegations for a transaction by hash
  • getTxWithdrawals: Get withdrawals for a transaction by hash
  • getTxMirs: Get MIRs for a transaction by hash
  • getTxPoolUpdates: Get pool updates for a transaction by hash
  • getTxPoolRetires: Get pool retires for a transaction by hash
  • getTxMetadata: Get metadata for a transaction by hash
  • getTxMetadataCbor: Get CBOR metadata for a transaction by hash
  • getTxRedeemers: Get redeemers for a transaction by hash
  • getTxRequiredSigners: Get required signers for a transaction by hash
  • getTxCbor: Get CBOR for a transaction by hash

How does this help Cardano developers?

  • Rapid prototyping: Instantly expose Blockfrost API functions to AI tools and chat agents for quick testing and iteration
  • AI-powered automation: Use AI assistants (like Cursor) to automate Cardano queries, wallet checks, and data extraction in your dev workflow
  • Tool integration: Connect your Cardano backend to any MCP-compatible client, making it easy to build, test, or demo blockchain features interactively
  • Blockfrost integration: Leverage the comprehensive Blockfrost API through a simple MCP interface without managing API keys directly in your AI tools

Example: Use with Cursor

Add this to your Cursor MCP config:

{
  "mcpServers": {
    "cardano-blockfrost": {
      "url": "https://mesh-mcp.vercel.app/mcp"
    }
  }
}

Now you can ask Cursor to get Cardano balances, UTXOs, transactions, and staking data via the Blockfrost API!

Local development

  • Start the server: npm run dev
  • MCP endpoint: http://localhost:3000/mcp
  • Configure your Blockfrost API keys in the environment variables:
    • NEXT_PUBLIC_BLOCKFROST_API_KEY_MAINNET for mainnet
    • NEXT_PUBLIC_BLOCKFROST_API_KEY_PREPROD for preprod testnet

For more information, see:

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载