@director.run/cli 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -2
- package/dist/cli.js +170 -170
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,150 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">Director</h1>
|
|
2
|
+
<p align="center">The easiest way to connect to any MCP server.</p>
|
|
3
|
+
|
|
4
|
+
<p align="center"><code>npx @director.run/cli@latest quickstart</code></p>
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
[Director](https://director.run) is open source MCP middleware that acts as a proxy between models/agents and MCP servers. Supporting all MCP transports natively, it aggregates tools, prompts, and resources server-side while providing a unified client-side integration point. This abstraction eliminates MCP server management overhead, enabling developers to focus on prompt engineering and domain logic rather than infrastructure complexity. If you'd like to learn more about director, please read the [documentation](https://docs.director.run)
|
|
9
|
+
|
|
10
|
+
> **Note:** This project is under active development and is not yet stable & may contain bugs. Please see our [contributing](https://docs.director.run/project/contributing) if you'd like to help.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Tested on MacOS (Sequoia 15.5) and Ubuntu (24.04.2 LTS)
|
|
15
|
+
- [Node.js](https://nodejs.org/en/download) (tested on v23.7.0)
|
|
16
|
+
- [UV](https://docs.astral.sh/uv/getting-started/installation/) for many Stdio servers
|
|
17
|
+
- [Claude](https://claude.ai/download), [Cursor](https://www.cursor.com/downloads) or [VSCode](https://code.visualstudio.com/download) installed. (if you'd like director to configure them automatically).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Quickstart
|
|
21
|
+
|
|
22
|
+
The fastest way to try out director is by running the quickstart directly using npx. This will start the director gateway and open the UI.
|
|
2
23
|
|
|
3
24
|
```bash
|
|
4
|
-
npx @director.run/cli
|
|
25
|
+
npx @director.run/cli quickstart
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### Installing Locally
|
|
29
|
+
|
|
30
|
+
If you'd like to install director locally, you can do so via `npm`.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g @director.run/cli
|
|
34
|
+
director serve # start the gateway
|
|
35
|
+
director studio # open the studio in your browser
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Docker (Experimental)
|
|
39
|
+
|
|
40
|
+
If you'd like to run director (and all the MCP servers) inside a docker container, you can use the following command. Please note that this functionality is experimental
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Start the gateway container, listening on port 8080
|
|
44
|
+
# Mount the data directory to persist the gateway's state (config files, etc)
|
|
45
|
+
docker run \
|
|
46
|
+
-d -p 8080:8080 \
|
|
47
|
+
-v ./data:/root/.director \
|
|
48
|
+
--name director \
|
|
49
|
+
director/gateway:latest
|
|
50
|
+
|
|
51
|
+
# Tail the logs
|
|
52
|
+
docker logs -f director
|
|
53
|
+
|
|
54
|
+
# Interact with the gateway using the CLI, on the host machine
|
|
55
|
+
npm install -g @director.run/cli
|
|
56
|
+
GATEWAY_URL=http://localhost:8080 director create my-proxy
|
|
57
|
+
GATEWAY_URL=http://localhost:8080 director add my-proxy --entry fetch
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## CLI Examples
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## Start the gateway
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
$ director serve
|
|
68
|
+
|
|
69
|
+
_ _ _
|
|
70
|
+
| (_) | |
|
|
71
|
+
__| |_ _ __ ___ ___| |_ ___ _ __
|
|
72
|
+
/ _' | | '__/ _ \/ __| __/ _ \| '__|
|
|
73
|
+
| (_| | | | | __/ (__| || (_) | |
|
|
74
|
+
\__,_|_|_| \___|\___|\__\___/|_|
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
[18:16:21] INFO (Gateway): starting director gateway
|
|
78
|
+
[18:16:21] INFO (Gateway): director gateway running on port 3673
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Create a proxy
|
|
82
|
+
```bash
|
|
83
|
+
$ director create my-first-proxy
|
|
84
|
+
proxy my-first-proxy created
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Add a server to the proxy
|
|
88
|
+
```bash
|
|
89
|
+
$ director add my-first-proxy --entry hackernews
|
|
90
|
+
adding hackernews to my-first-proxy
|
|
91
|
+
✔ Entry fetched.
|
|
92
|
+
✔ Registry entry hackernews added to my-first-proxy
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Connect the proxy to a client
|
|
96
|
+
```bash
|
|
97
|
+
# connect the proxy to Claude automatically
|
|
98
|
+
$ director connect my-first-proxy -t claude
|
|
99
|
+
[18:19:06] INFO (client-configurator/claude): reading config from /Users/barnaby/Library/Application Support/Claude/claude_desktop_config.json
|
|
100
|
+
[18:19:06] INFO (client-configurator/claude): installing my-first-proxy
|
|
101
|
+
[18:19:06] INFO (client-configurator/claude): writing config to /Users/barnaby/Library/Application Support/Claude/claude_desktop_config.json
|
|
102
|
+
[18:19:06] INFO (client-configurator/claude): restarting claude
|
|
103
|
+
[18:19:06] INFO (restartApp): restarting Claude...
|
|
104
|
+
[18:19:08] INFO (restartApp): Claude has been restarted
|
|
105
|
+
undefined
|
|
106
|
+
|
|
107
|
+
# print the manual connection details
|
|
108
|
+
$ director connect my-first-proxy
|
|
109
|
+
|
|
110
|
+
--------------------------------
|
|
111
|
+
Connection Details for 'my-first-proxy'
|
|
112
|
+
--------------------------------
|
|
113
|
+
|
|
114
|
+
Note: if you'd like to connect to a client automatically, run:
|
|
115
|
+
director connect my-first-proxy --target <target>
|
|
116
|
+
|
|
117
|
+
HTTP Streamable: http://localhost:3673/my-first-proxy/mcp
|
|
118
|
+
HTTP SSE: http://localhost:3673/my-first-proxy/sse
|
|
119
|
+
Stdio: {
|
|
120
|
+
"command": "npx",
|
|
121
|
+
"args": [
|
|
122
|
+
"-y",
|
|
123
|
+
"@director.run/cli",
|
|
124
|
+
"http2stdio",
|
|
125
|
+
"http://localhost:3673/my-first-proxy/mcp"
|
|
126
|
+
],
|
|
127
|
+
"env": {
|
|
128
|
+
"LOG_LEVEL": "silent"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Get the details of a proxy
|
|
134
|
+
```bash
|
|
135
|
+
# list all the proxies
|
|
136
|
+
$ director ls
|
|
137
|
+
┌────────────────┬────────────────┬──────────────────────────────────────────┐
|
|
138
|
+
│ id │ name │ path │
|
|
139
|
+
│ my-first-proxy │ my-first-proxy │ http://localhost:3673/my-first-proxy/mcp │
|
|
140
|
+
└────────────────┴────────────────┴──────────────────────────────────────────┘
|
|
141
|
+
|
|
142
|
+
# get the details of a single proxy
|
|
143
|
+
$ director get my-first-proxy
|
|
144
|
+
id=my-first-proxy
|
|
145
|
+
name=my-first-proxy
|
|
146
|
+
┌───────┬───────────┬──────────────────────┐
|
|
147
|
+
│ name │ transport │ url/command │
|
|
148
|
+
│ fetch │ stdio │ uvx mcp-server-fetch │
|
|
149
|
+
└───────┴───────────┴──────────────────────┘
|
|
5
150
|
```
|