OpenAI Integration
INFO
kova uses MCP (Model Context Protocol) as its sole agent interface. Any OpenAI agent or tool-calling workflow that supports MCP can connect to the kova wallet server.
Setup
Connect an OpenAI-based agent to kova via the MCP server:
typescript
import {
AgentWallet, Policy, LocalSigner, MemoryStore, SolanaAdapter,
createMcpServer,
} from "@kova-sdk/wallet";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
// 1. Configure the wallet
const wallet = new AgentWallet({ signer, chain, policy, store });
// 2. Create and start the MCP server
const server = createMcpServer(wallet);
await server.connect(new StdioServerTransport());The MCP server exposes all wallet tools (transfers, balance checks, swaps, etc.) and any MCP-compatible OpenAI client can discover and call them. Policy enforcement is automatic and transparent.
How It Works
- Your OpenAI agent connects to the kova MCP server
- The agent discovers available tools via the MCP
listToolsmethod - When the agent calls a tool, the MCP server validates inputs, enforces policies, and executes the operation
- Results are returned through the MCP protocol with sanitized error messages
Further Reading
- AI Integration Overview -- Full MCP server configuration, options, and all available tools
- Server Setup -- Run the MCP server as a service