main
md 99 lines 2.5 KB
Rendered Raw
1 # smbCloud extension for Zed
2
3 Adds the [smbCloud CLI](https://github.com/smbcloudXYZ/smbcloud-cli) as an MCP
4 server in Zed, so the agent can work with your mail domains, inbox routes, auth
5 apps, projects, tenants, and deploys.
6
7 ## Install
8
9 From Zed: `zed: extensions` → search for **smbCloud** → Install.
10
11 Then sign in once from a terminal — the server reuses the session the CLI writes
12 to disk:
13
14 ```sh
15 npx -y @smbcloud/cli login
16 ```
17
18 ## Settings
19
20 Configure it in Zed's settings under `context_servers.smbcloud`:
21
22 ```json
23 {
24 "context_servers": {
25 "smbcloud": {
26 "source": "extension",
27 "settings": {
28 "scope": "cloud",
29 "environment": "production",
30 "mail_api_key": "smb_mail_..."
31 }
32 }
33 }
34 }
35 ```
36
37 | Setting | Values | Notes |
38 | --- | --- | --- |
39 | `scope` | `cloud` (default), `automation` | `cloud` serves smbCloud resources; `automation` serves the mobile and TV device tools |
40 | `environment` | `production` (default), `dev` | Which API to talk to |
41 | `mail_api_key` | `smb_mail_...` | Only `mail_send` needs it; passed through as `SMB_MAIL_API_KEY` |
42
43 By default the extension installs `@smbcloud/cli` from npm and runs it with
44 Zed's bundled Node. If you already have `smb` on your machine, point at it
45 instead and skip the download:
46
47 ```json
48 {
49 "context_servers": {
50 "smbcloud": {
51 "source": "extension",
52 "command": { "path": "/opt/homebrew/bin/smb" }
53 }
54 }
55 }
56 ```
57
58 ## Without the extension
59
60 The CLI is published to the [MCP registry](https://github.com/modelcontextprotocol/registry)
61 as `io.github.smbcloudXYZ/smbcloud-cli`, so you can also add it as a custom
62 local server and skip this extension entirely:
63
64 ```json
65 {
66 "context_servers": {
67 "smbcloud": {
68 "command": "npx",
69 "args": ["-y", "@smbcloud/cli", "--mcp"],
70 "env": { "SMB_MAIL_API_KEY": "smb_mail_..." }
71 }
72 }
73 }
74 ```
75
76 ## Development
77
78 ```sh
79 rustup target add wasm32-wasip2
80 cargo build --release --target wasm32-wasip2
81 ```
82
83 Then run `zed: install dev extension` and pick this directory. Logs go to
84 `~/Library/Logs/Zed/Zed.log`, or run `zed --foreground` for verbose output.
85
86 ## Publishing
87
88 Zed's registry works by submodule. Open a PR against
89 [`zed-industries/extensions`](https://github.com/zed-industries/extensions) that:
90
91 1. adds this repo as a submodule at `extensions/smbcloud`
92 2. adds an entry to the top-level `extensions.toml` with the submodule path and version
93 3. runs `pnpm sort-extensions`
94
95 Keep `version` in `extension.toml` in step with that entry.
96
97 ## License
98
99 Apache-2.0, matching the CLI.