Skip to content

Commit 966e66c

Browse files
authored
docs: improves getting started and kind cluster docs (#127)
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
1 parent c2e1cda commit 966e66c

File tree

2 files changed

+65
-9
lines changed

2 files changed

+65
-9
lines changed

README.md

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ToolHive radically simplifies MCP deployment by:
1818
- Standardized Packaging: Leveraging OCI container standards, the project provides a repeatable, standardized packaging method for MCP servers, ensuring compatibility and reliability.
1919

2020

21-
## Key Benefits
21+
### Key Benefits
2222
- 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.
2323

2424
- Enterprise-Ready Authorization: Offers robust authorization controls tailored for enterprise environments, securely managing tool access and integrating seamlessly with existing infrastructures (e.g., Kubernetes).
@@ -36,7 +36,52 @@ ToolHive radically simplifies MCP deployment by:
3636
| Continue| ❌ | Continue doesn't yet support SSE
3737
| Claude Desktop | ❌ | Claude Desktop doesn't yet support SSE
3838

39+
## Getting Started
3940

41+
### Installation
42+
TODO: Add simple installation instructions
43+
44+
### TL;DR, I want to Run an MCP Server with ToolHive
45+
46+
To get up and running an MCP server, we can use ToolHive to create and run a fetch MCP server that our Cursor Client can use.
47+
48+
> Note: This example makes use of the auto-discovery feature that will automatically write the MCP server information to your Clients configuration. If you do not want this to happen and prefer to configure the MCP server in your Client configuration yourself, make sure you run `thv config auto-discovery false` to disable auto-discovery, and take the details of the MCP server returned from the `thv list` command and configure Client MCP servers manually.
49+
50+
```shell
51+
# Register our Cursor Client with ToolHive
52+
$ thv config register-client cursor
53+
$ thv config list-registered-clients
54+
Registered clients:
55+
- cursor
56+
57+
# We run the `mcp/fetch` MCP server. You can run `thv registry list` to list all MCP servers that we have currently in the default registry
58+
# `$USER` will be your user
59+
$ thv run fetch
60+
Apr 8 12:10:25.757 INF Using host port: 38697
61+
Apr 8 12:10:25.757 INF Logging to: /Users/$USER/Library/Application Support/toolhive/logs/fetch.log
62+
Apr 8 12:10:25.759 INF MCP server is running in the background (PID: 40373)
63+
Apr 8 12:10:25.759 INF Use 'toolhive stop fetch' to stop the server
64+
65+
# Let's list our running MCP server
66+
$ thv list
67+
CONTAINER ID NAME IMAGE STATE TRANSPORT PORT URL
68+
f336f5d471f1 fetch mcp/fetch:latest running stdio 38697 http://localhost:38697/sse#fetch
69+
70+
# Let's retrieve the Client Config for Cursor
71+
# Remember to change `$USER` your user
72+
$ cat /Users/$USER/.cursor/mcp.json | grep "sse#fetch" -A 3 -B 3
73+
{
74+
"mcpServers": {
75+
"fetch": {
76+
"url": "http://localhost:38697/sse#fetch"
77+
}
78+
}
79+
}
80+
```
81+
82+
Now, in Cursor, you should be able to chat and ask it to fetch you a page, and it will ask you to connect with the running fetch MCP server.
83+
84+
To follow the same examples but for VS Code or Roo Code, just make sure to register the Client and if you have not disabled auto-discovery, it should update your Client configurations.
4085

4186
## Commands
4287

@@ -188,12 +233,9 @@ thv list
188233

189234
This lists all active MCP servers managed by ToolHive, along with their current status.
190235

191-
## Running Against Local Kind Cluster
236+
## Running ToolHive Inside of a Local Kind Cluster
192237

193-
In order to run this against a local Kind Cluster, run:
194-
- `task build-image` to build the image into the local registry, it should spit out the image URL
195-
- `kind load docker-image $IMAGE_URL --name $KIND_CLUSTER_NAME` to load it into the Kind cluster
196-
- Create a `pod.yaml` spec for the pod, using the URL above as the image URL and `args:` field with the args you want to run. kind should create and run the pod.
238+
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.
197239

198240
## License
199241

docs/ingress.md renamed to docs/running-toolhive-in-kind-cluster.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# Setting up Ingress on a Local Kind Cluster
1+
# Running ToolHive Inside a Local Kubernetes Kind Cluster With Ingress
22

33
## Prerequisites:
4-
- Have a local Kind Cluster running
5-
- Have an MCP server with the proxy workload fronting it (this can be achieved by running the `test-k8s-apply` Taskfile task. `task test-k8s-apply`)
4+
- Have a local Kind Cluster running (`kind create cluster`)
5+
- Have [`ko`](https://ko.build/install/) installed (for building the ToolHive image locally)
6+
- Have [Taskfile](https://taskfile.dev/installation/) installed (to run automated steps)
7+
- Git Clone the ToolHive repository
8+
9+
## Deploy an MCP Server into Kind Cluster
10+
11+
To make the deployment of an MCP server easier, we have setup the `test-k8s-apply` task. It will go through and perform the following actions:
12+
- Builds the ToolHive container image
13+
- Outputs the local `kind` cluster config into a local file
14+
- Loads ToolHive image into Kind
15+
- Applies example [Kubernetes manifests](../deploy/k8s/thv.yaml) of a Fetch MCP Server
16+
- Creates a RoleBinding for the ToolHive container to be able to create resources
17+
- Applies and configures the Nginx Controller manifests for Ingress
18+
19+
To run this task, in the root of this repository, run `task test-k8s-apply`. Once it has finished, you should have a local Kind cluster with a deployed MCP server. To access it, you can follow the next section of setting up a simple Ingress for it.
620

721
## Setting Up Ingress
822

0 commit comments

Comments
 (0)