mcp-core-sdk

MCP Core SDKは、チェーンや計算環境を超えて検証可能なAIエージェントやサービスを構築するためのツールを提供します。TypeScriptで書かれており、簡単なAPIを通じてツールやリソース、プロンプトの登録が可能です。プラグイン可能なトランスポートをサポートし、ローカル開発用のテストCLIも用意されています。

GitHubスター

3

ユーザー評価

未評価

お気に入り

0

閲覧数

30

フォーク

0

イシュー

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