Model Context Contracts - MCP-Enabled Framework to Integrate LLMs With Blockchain Smart Contracts

📅 2025-10-21
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
The absence of standardized methodologies for seamless integration of large language models (LLMs) with blockchain systems hinders the development of natural language–driven on-chain interactions. To address this, we propose MCC, the first framework to adapt the Model Context Protocol (MCP) paradigm to LLM–blockchain collaboration, enabling end-to-end natural language–driven smart contract invocation. MCC employs an MCP server to establish function mapping between LLMs and the Rahasak blockchain platform, allowing users to initiate transactions via natural language queries. Furthermore, we fine-tune the Llama-4 model on a custom dataset to enhance intent understanding accuracy. Experimental evaluation demonstrates that our prototype significantly improves the accuracy of natural language–to–contract-call translation. Results validate the feasibility and effectiveness of deep integration between AI agents and decentralized systems, advancing interoperability between foundation models and permissionless infrastructure.

Technology Category

Application Category

📝 Abstract
In recent years, blockchain has experienced widespread adoption across various industries, becoming integral to numerous enterprise applications. Concurrently, the rise of generative AI and LLMs has transformed human-computer interactions, offering advanced capabilities in understanding and generating human-like text. The introduction of the MCP has further enhanced AI integration by standardizing communication between AI systems and external data sources. Despite these advancements, there is still no standardized method for seamlessly integrating LLM applications and blockchain. To address this concern, we propose "MCC: Model Context Contracts" a novel framework that enables LLMs to interact directly with blockchain smart contracts through MCP-like protocol. This integration allows AI agents to invoke blockchain smart contracts, facilitating more dynamic and context-aware interactions between users and blockchain networks. Essentially, it empowers users to interact with blockchain systems and perform transactions using queries in natural language. Within this proposed architecture, blockchain smart contracts can function as intelligent agents capable of recognizing user input in natural language and executing the corresponding transactions. To ensure that the LLM accurately interprets natural language inputs and maps them to the appropriate MCP functions, the LLM was fine-tuned using a custom dataset comprising user inputs paired with their corresponding MCP server functions. This fine-tuning process significantly improved the platform's performance and accuracy. To validate the effectiveness of MCC, we have developed an end-to-end prototype implemented on the Rahasak blockchain with the fine-tuned Llama-4 LLM. To the best of our knowledge, this research represents the first approach to using the concept of Model Context Protocol to integrate LLMs with blockchain.
Problem

Research questions and friction points this paper is trying to address.

Integrating LLMs with blockchain smart contracts via MCP protocol
Enabling natural language interactions for blockchain transactions
Developing standardized framework for AI-blockchain communication
Innovation

Methods, ideas, or system contributions that make the work stand out.

Integrates LLMs with blockchain via MCP protocol
Fine-tunes LLM with custom dataset for accuracy
Enables natural language smart contract interactions
🔎 Similar Papers
No similar papers found.