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