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