Keystone 平台 MCP Service SDK(Python)
Project description
ks-app-sdk
Keystone MCP Service SDK for Python.
安装
pip install ks-app-sdk
使用
from ks_app import App
app = App("my-app")
@app.tool("greet", "打招呼") async def greet(name: str = "world"): return {"message": f"Hello, {name}!"}
app.run() # 监听 0.0.0.0:8080
API
App(app_id: str)
创建应用实例。
@app.tool(name: str, description: str)
注册工具(装饰器)。handler 必须是 async 函数。
app.run()
启动 uvicorn 服务器。
端点
| 路径 | 方法 | 说明 |
|---|---|---|
| /healthz | GET | 存活探针 |
| /readyz | GET | 就绪探针 |
| /meta | GET | 应用元信息 + 工具列表 |
| /mcp/tools/list | GET | 已注册工具列表 |
| /mcp/tools/call | POST | 调用工具 |
配置
| 环境变量 | 默认值 | 说明 |
|---|---|---|
| KS_APP_PORT | 8080 | 监听端口 |
| KS_APP_HOST | 0.0.0.0 | 监听地址 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ks_app_sdk-0.2.0.tar.gz.
File metadata
- Download URL: ks_app_sdk-0.2.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7bddd19ae06323f39922ea9e4a669b80cede1b5afeb8bddbfb28c71dfb78ac0
|
|
| MD5 |
d96bdc44ba5fa2d890ef15af5288105d
|
|
| BLAKE2b-256 |
b4ae41c7ee10cfec56209306ff2d7b7ed36c3bb3b812d859ab0f005b2f254fc6
|
File details
Details for the file ks_app_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ks_app_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
097c34dbe20db839cbad4debd1c8b7613d9b0813d7edbb963ba77d56e09f4e43
|
|
| MD5 |
f323eacf6f9336c695d010b136a31b5d
|
|
| BLAKE2b-256 |
c26095d58c8c577809785354b82c18f3dc554efda6e55227614f1d9be6ee467b
|