Skip to content

Commit 3cda8e9

Browse files
authored
Format docs, polish kind guide (#143)
1 parent ecaa7c1 commit 3cda8e9

File tree

3 files changed

+266
-160
lines changed

3 files changed

+266
-160
lines changed

README.md

Lines changed: 115 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,178 +2,216 @@
22

33
<img src="docs/images/toolhive.png" alt="ToolHive Logo" width="300" />
44

5-
ToolHive (thv) is a lightweight, secure, and fast manager for MCP (Model Context Protocol) servers. It is written in Golang and has extensive test coverage—including input validation—to ensure reliability and security.
5+
ToolHive (thv) is a lightweight, secure, and fast manager for MCP (Model Context
6+
Protocol) servers. It is written in Golang and has extensive test
7+
coverage—including input validation—to ensure reliability and security.
68

7-
Under the hood, ToolHive acts as a very thin client for the Docker/Podman Unix socket API. This design choice allows it to remain both efficient and lightweight while still providing powerful, container-based isolation for running MCP servers.
9+
Under the hood, ToolHive acts as a very thin client for the Docker/Podman Unix
10+
socket API. This design choice allows it to remain both efficient and
11+
lightweight while still providing powerful, container-based isolation for
12+
running MCP servers.
813

914
<img src="./docs/images/thv-readme-demo.svg" alt="Terminal Recording">
1015

1116
## Why ToolHive?
1217

13-
Deploying MCP servers requires complex multi-step processes with a lot of friction: involving running random potentially harmful commands (e.g. using `uv` or `npx`), manually managing security credentials (e.g. putting an api token into a text file), and wrestling with inconsistent packaging methods. ToolHive aims to solve this by starting containers in a locked-down environment, granting only the minimal permissions required to run. This significantly reduces the attack surface, imporves usability, and enforces best practices for container security.
18+
Deploying MCP servers requires complex multi-step processes with a lot of
19+
friction: involving running random potentially harmful commands (e.g. using `uv`
20+
or `npx`), manually managing security credentials (e.g. putting an api token
21+
into a text file), and wrestling with inconsistent packaging methods. ToolHive
22+
aims to solve this by starting containers in a locked-down environment, granting
23+
only the minimal permissions required to run. This significantly reduces the
24+
attack surface, improves usability, and enforces best practices for container
25+
security.
1426

1527
ToolHive radically simplifies MCP deployment by:
16-
- Ease of Use: Instantly deploy MCP servers through Docker containers. Users can start their MCP servers with a single, straightforward command. No need to install and fight with different versions of python / node / etc.
1728

18-
- Enhanced Security: Secure by default: the tool securely manages secrets and configurations, greatly reducing leaks & risks. No more plaintext secrets in configuration files
29+
- Ease of use: Instantly deploy MCP servers through Docker containers. Users can
30+
start their MCP servers with a single, straightforward command. No need to
31+
install and fight with different versions of python / node / etc.
1932

20-
- Standardized Packaging: Leveraging OCI container standards, the project provides a repeatable, standardized packaging method for MCP servers, ensuring compatibility and reliability.
33+
- Enhanced security: Secure by default: the tool securely manages secrets and
34+
configurations, greatly reducing leaks & risks. No more plaintext secrets in
35+
configuration files
2136

37+
- Standardized packaging: Leveraging OCI container standards, the project
38+
provides a repeatable, standardized packaging method for MCP servers, ensuring
39+
compatibility and reliability.
2240

23-
### Key Benefits
24-
- Curated MCP Registry: Includes a registry of curated MCPs with verified configurations — users can effortlessly discover and deploy MCP servers without any manual setup. Just select one from the list and safely run it with just one command.
41+
### Key benefits
2542

26-
- Enterprise-Ready Authorization: Offers robust authorization controls tailored for enterprise environments, securely managing tool access and integrating seamlessly with existing infrastructures (e.g., Kubernetes).
43+
- Curated MCP registry: Includes a registry of curated MCPs with verified
44+
configurations — users can effortlessly discover and deploy MCP servers
45+
without any manual setup. Just select one from the list and safely run it with
46+
just one command.
2747

28-
- Seamless Integration: Compatible with popular development tools such as Copilot, Continue, Claude Desktop, Stitch, and more, streamlining your workflow.
48+
- Enterprise-ready authorization: Offers robust authorization controls tailored
49+
for enterprise environments, securely managing tool access and integrating
50+
seamlessly with existing infrastructures (e.g., Kubernetes).
2951

30-
## Getting Started
52+
- Seamless integration: Compatible with popular development tools such as GitHub
53+
Copilot, Cursor, Roo Code, and more, streamlining your workflow.
54+
55+
## Getting started
3156

3257
TODO: Add simple installation instructions
3358

3459
## Usage
3560

36-
### Running an MCP Server
61+
### Running an MCP server
3762

38-
First, find the MCP server you want to run. You can search for available MCP servers in the registry using:
63+
First, find the MCP server you want to run. You can search for available MCP
64+
servers in the registry using:
3965

4066
```bash
4167
thv search <search-term>
4268
```
4369

44-
This command will return a list of available MCP servers that match the search term.
70+
This command will return a list of available MCP servers that match the search
71+
term.
4572

46-
Once you find the MCP server you want to run, you can start it using the `thv run` command. For example, to run a specific MCP server:
73+
Once you find the MCP server you want to run, you can start it using the
74+
`thv run` command. For example, to run a specific MCP server:
4775

4876
```bash
4977
thv run <name-of-mcp-server>
5078
```
5179

52-
The registry already contains all the parameters needed to run the server, so you don't need to specify any additional arguments.
53-
ToolHive will automatically pull the image and start the server.
80+
The registry already contains all the parameters needed to run the server, so
81+
you don't need to specify any additional arguments. ToolHive will automatically
82+
pull the image and start the server.
5483

55-
### Listing Running MCP Servers
84+
### Listing running MCP servers
5685

5786
Use:
5887

5988
```bash
6089
thv list
6190
```
6291

63-
This lists all active MCP servers managed by ToolHive, along with their current status.
92+
This lists all active MCP servers managed by ToolHive, along with their current
93+
status.
6494

65-
### Browsing the Registry
95+
### Browsing the registry
6696

67-
You can also browse the registry to see all available MCP servers. Use the following command:
97+
You can also browse the registry to see all available MCP servers. Use the
98+
following command:
6899

69100
```bash
70101
thv registry list
71102
```
72103

73-
This will display a list of all available MCP servers in the registry, along with their descriptions and other relevant information.
104+
This will display a list of all available MCP servers in the registry, along
105+
with their descriptions and other relevant information.
74106

75107
To view detailed information about a specific MCP server, use:
76108

77109
```bash
78110
thv registry info <name-of-mcp-server>
79111
```
80112

81-
This command will provide you with detailed information about the MCP server, including its configuration, available options, and any other relevant details.
113+
This command will provide you with detailed information about the MCP server,
114+
including its configuration, available options, and any other relevant details.
82115

83-
We're open to adding more MCP servers to the registry. If you have a specific server in mind, please submit a pull request or open an issue on our GitHub repository.
84-
We're tracking the the list in [registry.json](pkg/registry/data/registry.json).
116+
We're open to adding more MCP servers to the registry. If you have a specific
117+
server in mind, please submit a pull request or open an issue on our GitHub
118+
repository. We're tracking the the list in
119+
[registry.json](pkg/registry/data/registry.json).
85120

86-
### Running a Custom MCP Server
121+
### Running a custom MCP server
87122

88-
If you want to run a custom MCP server that is not in the registry, you can do so by specifying the image name and any additional arguments. For example:
123+
If you want to run a custom MCP server that is not in the registry, you can do
124+
so by specifying the image name and any additional arguments. For example:
89125

90126
```bash
91127
thv run --transport sse --name my-mcp-server --port 8080 my-mcp-server-image:latest -- my-mcp-server-args
92128
```
93129

94-
This command closely resembles `docker run` but focuses on security and simplicity. When invoked:
130+
This command closely resembles `docker run` but focuses on security and
131+
simplicity. When invoked:
95132

96-
* ToolHive creates a container from the specified image (`my-mcp-server-image:latest`).
133+
- ToolHive creates a container from the specified image
134+
(`my-mcp-server-image:latest`).
97135

98-
* It configures the container to listen on the chosen port (8080).
136+
- It configures the container to listen on the chosen port (8080).
99137

100-
* Labels the container so it can be tracked by ToolHive:
138+
- Labels the container so it can be tracked by ToolHive:
101139

102-
```yaml
103-
toolhive: true
104-
toolhive-name: my-mcp-server
105-
```
140+
```yaml
141+
toolhive: true
142+
toolhive-name: my-mcp-server
143+
```
106144
107-
* Sets up the specified transport (e.g., SSE, stdio), potentially using a reverse proxy, depending on user choice.
145+
- Sets up the specified transport (e.g., SSE, stdio), potentially using a
146+
reverse proxy, depending on user choice.
108147
109-
### Transport Modes
148+
### Transport modes
110149
111-
* **SSE**:
150+
- **SSE**:
112151
113-
If the transport is `sse`, ToolHive creates a reverse proxy on a random port that forwards requests to the container. This means the container itself does not directly expose any ports.
152+
If the transport is `sse`, ToolHive creates a reverse proxy on a random port
153+
that forwards requests to the container. This means the container itself does
154+
not directly expose any ports.
114155

115-
* **STDIO**:
156+
- **STDIO**:
116157

117-
If the transport is `stdio`, ToolHive redirects SSE traffic to the container's standard input and output.
118-
This acts as a secure proxy, ensuring that the container does not have direct access to the network nor
119-
the host machine.
158+
If the transport is `stdio`, ToolHive redirects SSE traffic to the container's
159+
standard input and output. This acts as a secure proxy, ensuring that the
160+
container does not have direct access to the network nor the host machine.
120161

121162
## Permissions
122163

123-
Containers launched by ToolHive come with a minimal set of permissions, strictly limited to what is required. Permissions can be further customized via a JSON-based permission profile provided with the `--permission-profile` flag.
164+
Containers launched by ToolHive come with a minimal set of permissions, strictly
165+
limited to what is required. Permissions can be further customized via a
166+
JSON-based permission profile provided with the `--permission-profile` flag.
124167

125168
An example permission profile file could be:
126169

127170
```json
128171
{
129-
"read": [
130-
"/var/run/mcp.sock"
131-
],
132-
"write": [
133-
"/var/run/mcp.sock"
134-
],
172+
"read": ["/var/run/mcp.sock"],
173+
"write": ["/var/run/mcp.sock"],
135174
"network": {
136175
"outbound": {
137176
"insecure_allow_all": false,
138-
"allow_transport": [
139-
"tcp",
140-
"udp"
141-
],
142-
"allow_host": [
143-
"localhost",
144-
"google.com"
145-
],
146-
"allow_port": [
147-
80,
148-
443
149-
]
177+
"allow_transport": ["tcp", "udp"],
178+
"allow_host": ["localhost", "google.com"],
179+
"allow_port": [80, 443]
150180
}
151181
}
152182
}
153183
```
154184

155-
This profile lets the container read and write to the `/var/run/mcp.sock` Unix socket and also make outbound network requests to `localhost` and `google.com` on ports `80` and `443`.
185+
This profile lets the container read and write to the `/var/run/mcp.sock` Unix
186+
socket and also make outbound network requests to `localhost` and `google.com`
187+
on ports `80` and `443`.
156188

157189
Two built-in profiles are included for convenience:
158190

159-
* `stdio`: Grants minimal permissions with no network access.
160-
* `network`: Permits outbound network connections to any host on any port (not recommended for production use).
191+
- `stdio`: Grants minimal permissions with no network access.
192+
- `network`: Permits outbound network connections to any host on any port (not
193+
recommended for production use).
161194

162-
## Client Compability
195+
## Client compatibility
163196

164-
| Client | Supported | Notes |
165-
|--------|-----------|-------|
166-
| Copilot (VS Code) | ✅ |
167-
| Cursor | ✅ |
168-
| Roo Code | ✅ |
169-
| PydanticAI | ✅ |
170-
| Continue| ❌ | Continue doesn't yet support SSE
171-
| Claude Desktop | ❌ | Claude Desktop doesn't yet support SSE
197+
| Client | Supported | Notes |
198+
| ----------------- | --------- | -------------------------------------- |
199+
| Copilot (VS Code) | ✅ | v1.99.0+ or Insiders version |
200+
| Cursor | ✅ | |
201+
| Roo Code | ✅ | |
202+
| PydanticAI | ✅ | |
203+
| Continue | ❌ | Continue doesn't yet support SSE |
204+
| Claude Desktop | ❌ | Claude Desktop doesn't yet support SSE |
172205

173-
## Running ToolHive Inside of a Local Kind Cluster
206+
## Running ToolHive in a local kind cluster
174207

175-
In order to run this against a local Kind Cluster, follow the [# Running ToolHive Inside a Local Kubernetes Kind Cluster With Ingress](./docs/running-toolhive-in-kind-cluster.md) doc.
208+
To run ToolHive in a local lind cluster, follow the
209+
[# Running ToolHive Inside a Local Kubernetes Kind Cluster With Ingress](./docs/running-toolhive-in-kind-cluster.md)
210+
doc.
176211

177212
## License
178213

179-
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
214+
This project is licensed under the Apache 2.0 License. See the
215+
[LICENSE](./LICENSE) file for details.
216+
217+
<!-- markdownlint-disable-file MD033 -->

0 commit comments

Comments
 (0)