- Explore MCP Servers
- Model-Smart-Contract-Protocol
Model Smart Contract Protocol
What is Model Smart Contract Protocol
Model-Smart-Contract-Protocol (MSCP) is a standard protocol that allows Large Language Model (LLM) applications to interact seamlessly with EVM-compatible networks.
Use cases
Use cases for MSCP include automating transactions in DeFi protocols, enabling AI-driven decision-making in gaming environments, and providing real-time data verification in supply chain applications.
How to use
To use MSCP, developers can integrate it into their AI applications by installing the necessary components and utilizing the provided APIs to interact with EVM-compatible contracts.
Key features
Key features of MSCP include component as a service, fast integration through a component-based design, unified interaction with standardized protocols, dynamic expansion for custom on-chain components, EVM compatibility for multi-network interaction, and decentralization for permissionless access to component capabilities.
Where to use
MSCP can be used in various fields such as decentralized finance (DeFi), gaming, supply chain management, and any application requiring interaction with smart contracts on EVM-compatible networks.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Model Smart Contract Protocol
Model-Smart-Contract-Protocol (MSCP) is a standard protocol that allows Large Language Model (LLM) applications to interact seamlessly with EVM-compatible networks.
Use cases
Use cases for MSCP include automating transactions in DeFi protocols, enabling AI-driven decision-making in gaming environments, and providing real-time data verification in supply chain applications.
How to use
To use MSCP, developers can integrate it into their AI applications by installing the necessary components and utilizing the provided APIs to interact with EVM-compatible contracts.
Key features
Key features of MSCP include component as a service, fast integration through a component-based design, unified interaction with standardized protocols, dynamic expansion for custom on-chain components, EVM compatibility for multi-network interaction, and decentralization for permissionless access to component capabilities.
Where to use
MSCP can be used in various fields such as decentralized finance (DeFi), gaming, supply chain management, and any application requiring interaction with smart contracts on EVM-compatible networks.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Model Smart Contract Protocol (MSCP)
A standard protocol that enables LLM applications to interact with EVM-compatible networks.
[!Warning]
MSCP does not issue any tokens!
Features
Component as a service
AI Agent interacts with the network by operating different components.
Fast integration
Component-based design makes it easier to build workflows and accelerates the development of AI applications.
Unified interaction
Use consistent rules and protocols to standardize the calls to contracts with different functions and ensure the consistency of AI interactions.
Dynamic expansion
AI Agent can add custom onchain components with greater flexibility.
EVM compatibility
It can interact with multiple EVM-compatible network contracts at the same time, and has greater adaptability in handling tasks in complex scenarios.
Decentralization
Access component capabilities without permission, share onchain data, and provide persistent services and information verification.
Architecture

MSCP consists of three parts:
Component: This is an on-chain component that complies with EIP-7654. It is used to implement the specific functions of the contract and provide custom services.
Connector: This is a method and specification for parsing Components and processing contract component requests.
Chat2Web3: This is an interoperator, which is used to automatically convert the interaction methods of contract components into tool functions that LLM can call.
Quick Start
Install
pip3 install mscp
Set up environment variables
Please refer to .env.example file, and create a .env file with your own settings. You can use two methods to import environment variables.
Deploy Component Smart Contract
Here is a simple component example.sol that you can deploy on any network.
More about components:
- EIP-7654
- Component example deployed on multiple networks
- Component Scan is a tool for interaction
- Some component contract codes
- How to build a component
- Component Javascript SDK
Integrate MSCP into your AI application
from openai import OpenAI
from eth_account import Account
from mscp import Connector, Chat2Web3
from dotenv import load_dotenv
import os
load_dotenv()
# Create a connector to connect to the component
component = Connector(
"https://sepolia.base.org", # RPC of the component network
"0xd08dC2590B43bbDA7bc1614bDf80877EffE72CF0", # component address
)
# Get the methods of the component
methods = component.get_methods()
#Import the private key from the environment variable
account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
# Create a Chat2Web3 instance
chat2web3 = Chat2Web3(account)
# Add a method to the Chat2Web3
chat2web3.add(
name="getUserInfoByAddress",
prompt="When a user wants to get a user's name and age, it will return 2 values: one is the name, and the other is the age.",
method=methods["getUser"], # Use the getUser method from the contract
)
# Create a client for OpenAI
client = OpenAI(api_key=os.getenv("OPENAI_KEY"), base_url=os.getenv("OPENAI_API_BASE"))
# Set up the conversation
messages = [
{
"role": "user",
"content": "What is the user's name and age? 0xbdbf9715aedc12712daac033d4952280d1d29ac3",
}
]
# Add the chat2web3 to the tools
params = {
"model": "gpt-3.5-turbo",
"messages": messages,
"tools": chat2web3.functions,
}
# Start the conversation
response = client.chat.completions.create(**params)
# Get the function message
func_msg = response.choices[0].message
# fliter out chat2web3 function
if func_msg.tool_calls and chat2web3.has(func_msg.tool_calls[0].function.name):
# execute the function from llm
function_result = chat2web3.call(func_msg.tool_calls[0].function)
messages.extend(
[
func_msg,
{
"role": "tool",
"tool_call_id": func_msg.tool_calls[0].id,
"content": function_result,
},
]
)
# Model responds with final answer
response = client.chat.completions.create(model="gpt-3.5-turbo", messages=messages)
print(response.choices[0].message.content)
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










