Documentation
Technical references and API integration guides for the Ver Protocol Semantic Compiler and MCP Server.
Introduction
Ver is a deterministic, AI-readable semantic layer built specifically for X Layer. It exposes smart contract ABIs, unflattened bytecode, and verified contract structure to AI agents, stripping away heuristics and replacing them with cryptographically attestable schemas.
By anchoring a Protocol Graph on X Layer, we guarantee that the contract state an AI agent reads is identical to what is actually deployed, eliminating hallucination in decentralized finance and complex smart contract integrations.
The Protocol Graph
The primary output of the Ver Protocol Compiler is the Protocol Graph. This is a JSON payload representing a comprehensive, deterministic compilation of a smart contract's semantic layout.
The schema includes:
metadata: Compiler versions, address, and verification state.structural: Roles, events, state variables, and dependencies.security: Privilege modifiers, ownership functions, and safety guardrails.
You can generate a Protocol Graph by passing an X Layer address to our public compilation endpoint:
curl -s "https://verprotocol.vercel.app/api/compile?address=0x1E4a5963aBFD975d8c9021ce480b42188849D41d"
Agentic Intent Compiler (AIC)
The Agentic Intent Compiler (AIC) is a middleware service that maps natural language intents directly to deterministic EVM calldata.
Unlike standard AI models which hallucinate parameters, the AIC statically simulates the generated calldata against the live X Layer mainnet using an eth_call dry-run. If a structural mapping failure occurs, it securely forwards the context to an LLM fallback path to resolve complex state changes.
Usage Endpoint
POST https://verprotocol.vercel.app/api/compile-intent
{
"contractAddress": "0x1E4a5963aBFD975d8c9021ce480b42188849D41d",
"intent": "Transfer 10 USDT to 0x1111111111111111111111111111111111111111"
}
The endpoint returns the EVM calldata alongside the simulation status:
{
"success": true,
"functionName": "transfer",
"args": ["0x1111...", "10000000"],
"encodedCalldata": "0xa905...",
"simulationStatus": "reverted"
}
Model Context Protocol (MCP)
Ver includes a native Model Context Protocol server, allowing you to inject deterministic X Layer protocol graphs directly into AI environments like Claude Desktop, Cursor IDE, or custom agent runtimes.
Installation
Run the MCP server locally without prior installation using npx:
npx -y aic-mcp
Claude Desktop Configuration
To integrate Ver with Claude Desktop, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"ver": {
"command": "npx",
"args": ["-y", "aic-mcp"],
"env": {
"XLAYER_RPC_URL": "https://rpc.xlayer.tech"
}
}
}
}
Once configured, Claude will have access to the get_protocol_graph and compile_agent_intent tools natively in chat, allowing it to read and interact with X Layer contracts autonomously.