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
366
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();