mcp-core-sdk
The MCP Core SDK provides tools for building verifiable AI agents and services across chains and compute environments. Written in TypeScript, it allows for easy registration of tools, resources, and prompts via simple APIs. It supports pluggable transports and includes a test CLI for local development.
GitHub Stars
3
User Rating
Not Rated
Favorites
0
Views
37
Forks
0
Issues
0
README
๐งฌ MCP Core SDK v0.1
Model Context Protocol (MCP) SDK for building verifiable AI agents and services across chains and compute environments.
This SDK provides tools to define, expose, and consume MCP-compatible Tools, Resources, and Prompts โ enabling secure onchain interactions and agent memory.
โจ Features
- ๐ Chain-agnostic client for interacting with MCP servers
- ๐ง Tool, Resource, and Prompt registration via simple APIs
- ๐ Pluggable transports (STDIO, HTTP/SSE, gRPC planned)
- ๐งช Test CLI for local development and protocol validation
- ๐ ๏ธ Written in TypeScript โ Rust and Python ports planned
๐ฆ Repository Structure
mcp-core/
โ
โโโ sdk/
โ โโโ js/ # TypeScript SDK core
โ โ โโโ client/ # MCPClient for session management
โ โ โโโ server/ # MCPServer for tools/prompts/resources
โ โ โโโ transport/ # stdio/http transports
โ โ โโโ types/ # Shared types (ToolSpec, PromptSpec)
โ โ โโโ cli/ # CLI tool to run client/server
โ โ โโโ examples/ # Sample implementations
โ โโโ rust/ # (stub)
โ
โโโ contracts/ # MCP Solidity smart contracts
๐งฉ Sample Server (TypeScript)
import { McpServer } from '@z1labs/mcp-sdk';
const server = new McpServer({ name: 'math-agent' });
server.tool('add', { a: 'number', b: 'number' }, async ({ a, b }) => {
return [{ type: 'text', text: `${a + b}` }];
});
await server.listenStdIo();