flow-blockchain-interface-service
A gateway service facilitating programmatic interaction with the Flow ledger, enabling capabilities such as asset balance queries, domain name resolution (e.g., .find, .fn), smart contract script execution, and authenticated transaction submission.
Author

lmcmz
Quick Info
Actions
Tags
Flow Blockchain Interface Service (MCP)
This Model Context Protocol (MCP) server furnishes a unified conduit for artificial intelligence agents to interface with the Flow distributed ledger technology (DLT) environment. It standardizes access to data retrieval and operational execution.
Core Capabilities
- Querying native Flow coin holdings and various fungible token asset quantities.
- Translating human-readable Flow domain names (.find, .fn) into corresponding account addresses.
- Executing arbitrary Cadence programs for read-only operations on the chain state.
- Dispatching, tracking, and confirming on-chain transactions.
- Retrieving metadata associated with Flow accounts.
- Configuration of underlying Flow network settings via environment parameters.
Deployment Instructions
Via npx (Recommended Initial Setup)
Execute the following command for standard input/output operation:
bash npx -y @outblock/flow-mcp-server --stdio
Alternatively, initiate an HTTP listener on a specified TCP port:
bash npx -y @outblock/flow-mcp-server --port 3000
Local Source Code Compilation (For Contribution/Development)
bash git clone https://github.com/lmcmz/flow-mcp-server.git cd flow-mcp-server npm install npm run build npm start
Operational Execution
Invoking via npx
bash
Standard I/O for integration with reasoning engines
npx -y @outblock/flow-mcp-server --stdio
Establish an HTTP listener service on port 3000
npx -y @outblock/flow-mcp-server --port 3000
Specify the target network (e.g., testnet)
npx -y @outblock/flow-mcp-server --port 3000 --network testnet
Local Development Server Startup
bash
Standard build and run
npm run build npm start
Run via specific port setting
npm run build PORT=3000 npm start
Enable development mode with hot-reloading features
npm run dev
Configuration Environment Variables
The service behavior is tunable using the following environment settings:
PORT- TCP port number for the HTTP listener (defaults to I/O mode if unset).FLOW_NETWORK- Selection of the target Flow environment (mainnet,testnet, oremulator).FLOW_ACCESS_NODE- A user-supplied URL for a dedicated Flow Access API endpoint.LOG_LEVEL- Verbosity setting for internal logging output (options:debug,info,warn,error).
Integration with AI Reasoning Frameworks
To connect this component with systems like Claude, launch the server in pipe mode (--stdio) and map the execution command within the assistant's tool manifest.
Example Manifest Snippet:
{ "tools": [ { "name": "flow-blockchain-interface-service", "command": "npx -y @outblock/flow-mcp-server --stdio" } ] }
HTTP API Interface Details
When configured for network operation, the service exposes the following RESTful endpoints:
/sse- Endpoint supporting Server-Sent Events for real-time data streaming./messages- Primary POST endpoint for submitting structured tool invocations./health- Status check endpoint to verify service operability./- Endpoint detailing server metadata and available functions.
Illustrative HTTP Request Payload (using curl):
bash curl -X POST http://localhost:3000/messages \ -H "Content-Type: application/json" \ -d '{ "tool_request": { "name": "get_balance", "parameters": { "address": "0x2d4c3caffbeab845", "network": "mainnet" } } }'
Function Signatures (Exposed Tools)
get_balance- Retrieves the native Flow coin balance for a specified account.get_token_balance- Retrieves the balance for a specific fungible token asset.get_account- Fetches comprehensive metadata for a Flow account structure.resolve_domain- Maps registered Flow domain names to wallet addresses.execute_script- Runs arbitrary, read-only Cadence code against the ledger.send_transaction- Submits a signed transaction payload for processing on the network.get_transaction- Looks up the final state and details of a transaction via its identifier.
Chronology of Releases
- v0.1.1 - Corrected an import error impacting argument formatting within the transaction processing module.
- v0.1.0 - Initial functional deployment encompassing fundamental Flow connectivity.
Governance
Licensed under the MIT terms.
