H
holon-sh/cli
Type-safe MCP servers
在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
安装与配置
取自该仓库的安装命令
go install github.com/holon-sh/cli/cmd/holon@latest
解析自我们于 2026-11-04 抓取的该仓库 README;我们未执行过。
这条是仓库自己写的安装方式,不是 MCP 客户端配置,所以不生成 JSON。
配置项的键名以你的客户端为准:客户端与 CLI
- ★ 数取值
- 1 ★ · holon-sh/cli · 取自 GitHub 搜索 API · (2026-11-13 20:00:50 核对)
- 来源明细
- 从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
- 收录与活跃
- 收录于 2026-11-05 · 最近见到 2026-11-14 · 共见到 10 次 · 被 3 个来源列出
- 评分构成
- 综合分 303 · 1 ★ · 3 个来源 · repo
- 安装
go install github.com/holon-sh/cli/cmd/holon@latest
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是
go install github.com/holon-sh/cli/cmd/holon@latest。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库
holon-sh/cli;我们收录于 2026-11-05;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。# holon
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
holon provides type-safety for MCP servers, e.g. invoking an MCP server as a function call your type checker understands.
This is currently supported via the Python SDK and TypeScript SDK.
## Install
sh
curl -fsSL https://holon-labs.dev/install.sh | sh
Or with Go 1.27+:
sh
go install github.com/holon-sh/cli/cmd/holon@latest
## Example
Declare dependencies under sh.holon.requires in your project's server.json (publisher-provided metadata). This example uses the public Context7 server.
json
"name": "com.example/foo",
"version": "0.1.0",
"description": "Example Foo",
"meta": {
"io.modelcontextprotocol.registry/publisher-provided": {
"sh.holon": {
"requires": {
"context7": { "name": "io.github.upstash/context7", "version": "4.4.4" }
Generate the typed clients and type-check the calls to them.
sh
holon types check
Or name the servers yourself. Any -s replaces the whole requires list, so server.json is not needed.
sh
holon types check -s https://mcp.context7.com/mcp
Call the server. A wrong tool name or argument is a type error.
Python
python
from holon.apps import apps
await apps.context7.calltool("resolve-library-id", libraryName="Next.js", query="app router")
await apps.context7.calltool("resolve-library-id", libraryName=1, query="app router")
# error: No overload variant of "calltool" of "Context7App" matches argument types "str", "int", "str" [call-overload]
await apps.context7.calltool("resolve-library", libraryName="Next.js", query="app router")
# error: No overload variant of "calltool" of "Context7App" matches argument types "str", "str", "str" [call-overload]
TypeScript
ts
import { apps } from "holon-sh";
const libraries = await apps.context7.tools"resolve-library-id";
libraries.content; // Context7 declares no output schema, so the complete result is returned
await apps.context7.tools"resolve-library-id";
// error TS2322: Type 'number' is not assignable to type 'string'.
await apps.context7.tools"resolve-library-id";
// error TS2345: Argument of type '{ libraryName: string; }' is not assignable to parameter of type '{ [key: string]: unknown; libraryName: string; query: string; }'.
// Property '"query"' is missing in type '{ libraryName: string; }' but required in type '{ [key: string]: unknown; libraryName: string; query: string; }'.
await apps.context7.tools"resolve-library";
// error TS2551: Property 'resolve-library' does not exist on type '{ readonly "query-docs": (input: { [key: string]: unknown; language?: string | undefined; libraryId: string; query: string; }, options?: CallOptions | undefined) => Promise >; readonly "resolve-library-id": (input: { ...; }, options?: CallOptions | undefined) => Promise ; }'. Did you mean 'resolve-library-id'?
### Development Servers
Let's say you have a server that you're still developing, and it's not in any MCP Registry yet.
python
# bar/server.py
from mcp.server import MCPServer
server = MCPServer("com.example/bar", version="0.1.0", description="Example Bar")
@server.tool()
def greet(name: str) -> str:
return f"hello {name}"
Pass its entry file with -s.
sh
holon types check foo -s bar/server.py
Python
python
from holon.apps import apps
greeting = await apps.bar.tools.greet(name="world")
This is currently supported via the Python SDK and TypeScript SDK.
## Install
sh
curl -fsSL https://holon-labs.dev/install.sh | sh
Or with Go 1.27+:
sh
go install github.com/holon-sh/cli/cmd/holon@latest
## Example
Declare dependencies under sh.holon.requires in your project's server.json (publisher-provided metadata). This example uses the public Context7 server.
json
"name": "com.example/foo",
"version": "0.1.0",
"description": "Example Foo",
"meta": {
"io.modelcontextprotocol.registry/publisher-provided": {
"sh.holon": {
"requires": {
"context7": { "name": "io.github.upstash/context7", "version": "4.4.4" }
Generate the typed clients and type-check the calls to them.
sh
holon types check
Or name the servers yourself. Any -s replaces the whole requires list, so server.json is not needed.
sh
holon types check -s https://mcp.context7.com/mcp
Call the server. A wrong tool name or argument is a type error.
Python
python
from holon.apps import apps
await apps.context7.calltool("resolve-library-id", libraryName="Next.js", query="app router")
await apps.context7.calltool("resolve-library-id", libraryName=1, query="app router")
# error: No overload variant of "calltool" of "Context7App" matches argument types "str", "int", "str" [call-overload]
await apps.context7.calltool("resolve-library", libraryName="Next.js", query="app router")
# error: No overload variant of "calltool" of "Context7App" matches argument types "str", "str", "str" [call-overload]
TypeScript
ts
import { apps } from "holon-sh";
const libraries = await apps.context7.tools"resolve-library-id";
libraries.content; // Context7 declares no output schema, so the complete result is returned
await apps.context7.tools"resolve-library-id";
// error TS2322: Type 'number' is not assignable to type 'string'.
await apps.context7.tools"resolve-library-id";
// error TS2345: Argument of type '{ libraryName: string; }' is not assignable to parameter of type '{ [key: string]: unknown; libraryName: string; query: string; }'.
// Property '"query"' is missing in type '{ libraryName: string; }' but required in type '{ [key: string]: unknown; libraryName: string; query: string; }'.
await apps.context7.tools"resolve-library";
// error TS2551: Property 'resolve-library' does not exist on type '{ readonly "query-docs": (input: { [key: string]: unknown; language?: string | undefined; libraryId: string; query: string; }, options?: CallOptions | undefined) => Promise >; readonly "resolve-library-id": (input: { ...; }, options?: CallOptions | undefined) => Promise ; }'. Did you mean 'resolve-library-id'?
### Development Servers
Let's say you have a server that you're still developing, and it's not in any MCP Registry yet.
python
# bar/server.py
from mcp.server import MCPServer
server = MCPServer("com.example/bar", version="0.1.0", description="Example Bar")
@server.tool()
def greet(name: str) -> str:
return f"hello {name}"
Pass its entry file with -s.
sh
holon types check foo -s bar/server.py
Python
python
from holon.apps import apps
greeting = await apps.bar.tools.greet(name="world")
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/holon-sh-cli/)
- 来源
- github · https://github.com/holon-sh/cli
- 按领域浏览
- MCP 服务
- Traction
- 1 ★
- 收录来源
- 3 个独立来源
- 收录于
- 今天
同类推荐
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。