mcp-core-sdk
SDK for building Model Context Protocol (MCP) clients & servers — includes transport, discovery, and Tool/Prompt APIs in TypeScript, with Rust & Python coming soon.
GitHub Stars
3
User Rating
Not Rated
Forks
0
Issues
0
Views
3
Favorites
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();