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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Bandara, Eranga, Shetty, Sachin, Mukkamala, Ravi, Gore, Ross, Foytik, Peter, Bouk, Safdar H., Rahman, Abdul, Liang, Xueping, Keong, Ng Wee, De Zoysa, Kasun, Withanage, Aruna, Loganathan, Nilaan
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866908606693113856
author Bandara, Eranga
Shetty, Sachin
Mukkamala, Ravi
Gore, Ross
Foytik, Peter
Bouk, Safdar H.
Rahman, Abdul
Liang, Xueping
Keong, Ng Wee
De Zoysa, Kasun
Withanage, Aruna
Loganathan, Nilaan
author_facet Bandara, Eranga
Shetty, Sachin
Mukkamala, Ravi
Gore, Ross
Foytik, Peter
Bouk, Safdar H.
Rahman, Abdul
Liang, Xueping
Keong, Ng Wee
De Zoysa, Kasun
Withanage, Aruna
Loganathan, Nilaan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2510_19856
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Model Context Contracts - MCP-Enabled Framework to Integrate LLMs With Blockchain Smart Contracts
Bandara, Eranga
Shetty, Sachin
Mukkamala, Ravi
Gore, Ross
Foytik, Peter
Bouk, Safdar H.
Rahman, Abdul
Liang, Xueping
Keong, Ng Wee
De Zoysa, Kasun
Withanage, Aruna
Loganathan, Nilaan
Cryptography and Security
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.
title Model Context Contracts - MCP-Enabled Framework to Integrate LLMs With Blockchain Smart Contracts
topic Cryptography and Security
url https://arxiv.org/abs/2510.19856