{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_jvrucdrrzhw9","handle":"usmart-mcp","url":"https://wellknown.network/agents/usmart-mcp","links":{"self":"https://wellknown.network/agents/usmart-mcp/record.json","html":"https://wellknown.network/agents/usmart-mcp","markdown":"https://wellknown.network/agents/usmart-mcp/record.md","api":"https://wellknown.network/api/v1/agents/usmart-mcp","status":"https://wellknown.network/api/v1/agents/usmart-mcp/status","claim":"https://wellknown.network/agents/usmart-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/usmart-mcp/claim.json","badge":"https://wellknown.network/agents/usmart-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json"},"ard":{"identifier":"urn:air::server:usmart-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"usmart-mcp","summary":"Local MCP server for uSmart SG trading with user-owned credentials and a read-only safety mode","description":"# usmart-mcp\n\n`usmart-mcp` 是面向 uSmart SG OpenAPI 用户的本地交易 MCP Server。它通过标准 MCP Tools\n向 Kiro、Codex、Claude Desktop 等客户端提供订单预检、订单查询、下单和改单能力。\n\n本项目采用本地运行模式：每位用户使用自己的 uSmart 账户、渠道号和签名密钥；凭证仅保存在\n用户电脑中，不随 PyPI 包分发，也不通过 MCP 工具参数传递。\n\n> 当前仅支持 SG。服务可连接生产交易账户；启用写工具后可能产生真实资金交易。\n> 本工具不提供投资建议，所有委托均由账户所有者负责。\n\n## 主要特性\n\n- 基于官方 MCP Python SDK v2，使用 stdio 传输；\n- 自动执行 SG 渠道密码登录，并在进程内短期缓存 Authorization；\n- 凭证默认存放于 `~/.usmart`，支持 `USMART_HOME` 覆盖；\n- 提供服务端只读模式，写工具在协议层完全不注册；\n- 写操作要求显式确认，且绝不自动重试；\n- 下单前可查询每手股数、最大可买卖数量和购买力；\n- 支持单笔金额、单日金额和单日笔数限额；\n- 写操作在本地生成脱敏审计流水；\n- 不提供行情服务，也不解析股票名称。\n\n## 使用前提\n\n使用者必须拥有独立的 uSmart SG OpenAPI 权限，并准备：\n\n- uSmart 账户区号、手机号和登录密码；\n- 可选的 6 位交易密码；\n- 与个人渠道配对的渠道号和签名私钥；\n- uSmart 提供的隐私数据加密公钥；\n- Python 3.10 或更高版本；\n- [uv](https://docs.astral.sh/uv/getting-started/installation/)。\n\nPyPI 包不包含任何账户、Token、渠道号或密钥。\n\n## 快速开始\n\n### 1. 初始化当前用户的本地凭证\n\n每个用户都有自己的主目录。默认路径会按运行 MCP 的系统用户动态解析：macOS/Linux\n通常为 `~/.usmart`，Windows 通常为 `%USERPROFILE%\\.usmart`，并不是所有人共用\n`/Users/A/.usmart`。\n\n运行一条命令即可创建目录、JSON 模板、审计目录并设置安全权限：\n\n```bash\nuvx --from \"usmart-mcp==1.0.3\" usmart-mcp init\n```\n\n生成结构：\n\n```text\n当前用户的 .usmart/\n├── config.json              # 自动生成模板，填写个人渠道号和限额\n├── credentials.json         # 自动生成模板，填写个人账号，POSIX 权限 600\n├── sign_private.pem         # 用户自己的渠道签名私钥\n├── privacy_public.pem       # uSmart 提供的隐私加密公钥\n└── audit/                   # 自动创建\n```\n\n初始化模板默认将 `maxDailyOrderCount` 设为 `0`，即使误开写工具也不能提交订单。\n需要交易时，用户必须先根据自身风控要求配置单笔、单日金额和笔数上限。\n\n密钥可以手工放入，也可以在本机终端安全复制：\n\n```bash\nuvx --from \"usmart-mcp==1.0.3\" usmart-mcp init \\\n  --sign-private \"/path/to/sign_private.pem\" \\\n  --privacy-public \"/path/to/privacy_public.pem\"\n```\n\n`init` 绝不覆盖已有文件。账号密码只填写到本机生成的 `credentials.json`，不要通过\n聊天、邮件或 MCP 参数传递。完成后执行本地脱敏检查（不会登录或联网）：\n\n```bash\nuvx --from \"usmart-mcp==1.0.3\" usmart-mcp doctor\n```\n\n如需使用其他目录，可在初始化时传 `--home /path/to/usmart-home`，并在 MCP 配置的\n`env` 中设置相同的 `USMART_HOME`。Windows 用户还应使用 `icacls` 限制目录仅当前账户可访问。\n\n### 2. 接入 Kiro（推荐先只读）\n\n在 Kiro 的 `mcp.json` 中加入：\n\n```json\n{\n  \"mcpServers\": {\n    \"usmart\": {\n      \"command\": \"uvx\",\n      …","publisher":null,"homepage":null,"repository":null,"version":"1.0.3","license":"Proprietary","protocols":["mcp"],"tags":["mcp","openapi","singapore","trading","usmart"],"pricing":null,"endpoints":[{"url":"pypi:usmart-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","summary":"pypi","version":"pypi","description":"pypi"}},"derived":{"capabilities":[{"slug":"data.apis","name":"API Access","confidence":1,"provenance":"declared"},{"slug":"finance.markets","name":"Markets & Trading","confidence":1,"provenance":"declared"}],"categories":["data","finance"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"usmart-mcp","registry":"pypi","observedAt":"2026-09-10T15:25:02.004Z","publishedAt":"2026-08-14T09:19:41.512911Z","latestVersion":"1.0.3"}},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"usmart-mcp","url":"https://pypi.org/project/usmart-mcp/","firstSeenAt":"2026-09-10T15:23:00.312Z","fetchedAt":"2026-09-10T15:23:00.312Z","normalizedAt":"2026-09-10T15:23:00.312Z"}]},"firstSeenAt":"2026-09-10T15:23:00.312Z","updatedAt":"2026-09-10T15:25:02.004Z"}