Skip to main content

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

ks_app_sdk-0.1.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ks_app_sdk-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file ks_app_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ks_app_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ks_app_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f83981b1c20a518cd319b0102b0184ce0889fc2b68e30734b4270599a6d8824a
MD5 cd0b826e910d0fcdf5215620451b8b20
BLAKE2b-256 f828892ee94bca4ce00735571d46bd8a20d61f1724ff1661446ca12bc6959168

See more details on using hashes here.

File details

Details for the file ks_app_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ks_app_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for ks_app_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4216f4f85df034063922502736b9750b6086fc26ed46b68d5a02be7af054538f
MD5 612fdc9d2f7da7b37d7c9433df8748fd
BLAKE2b-256 4eb3c273393cba3a24f717e6a78dba81d3dd12e8801d846f2bd235a99c272145

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page