JSON模式MCP服务器
管理JSON模式并从中创建实例的MCP服务器。
特性
- 存储和检索JSON模式
- 创建新的JSON模式 用一个简单的工具
- 生成实例 来自具有自定义值的模式
资源
schema://{schema_id}-按ID获取特定架构schemas://list-获取所有可用模式的列表
工具
create_schema-创建新的JSON模式create_instance-从模式创建JSON实例
用法
- 安装依赖项:
pip install mcp[cli]- 运行服务器:
python server.py- 或者使用Claude Desktop进行安装:
mcp install server.py例子
创建人员架构
// Create a schema for a person
create_schema(
title="Person",
properties={
"name": {"type": "string"},
"age": {"type": "integer"},
"email": {"type": "string", "format": "email"}
},
required=["name", "email"]
)创建实例
// Create a person instance
create_instance(
schema_id="",
values={
"name": "John Doe",
"age": 30,
"email": "john@example.com"
}
)