jambonz-mcp 1.0.3

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 ADDED
@@ -0,0 +1,120 @@
1
+ # jambonz-mcp
2
+
3
+ Production-focused TypeScript MCP server for Jambonz.
4
+
5
+ It exposes two surfaces:
6
+
7
+ - Documentation intelligence from locally synced Jambonz docs.
8
+ - One MCP tool per REST API endpoint in the Jambonz API Reference.
9
+
10
+ ## What It Exposes
11
+
12
+ ### Documentation tools
13
+
14
+ - `jambonz_docs_search`
15
+ - `jambonz_docs_read`
16
+ - `jambonz_docs_schema`
17
+
18
+ ### REST tools
19
+
20
+ - One tool per REST endpoint under Jambonz REST API Reference.
21
+ - Deterministic naming: `jambonz_<domain>_<endpoint_slug>`.
22
+ - Examples:
23
+ - `jambonz_alerts_list_alerts_by_account`
24
+ - `jambonz_recent_calls_list_recent_calls`
25
+ - `jambonz_users_create_user`
26
+
27
+ ### MCP resources and prompts
28
+
29
+ - `jambonz://docs/index`
30
+ - `jambonz://rest/catalog`
31
+ - `jambonz://rest/usage`
32
+ - `jambonz://runtime/defaults`
33
+ - `jambonz://doc/{path}`
34
+ - `jambonz://schema/{operationId}`
35
+ - Prompt: `jambonz_usage_guide`
36
+
37
+ ## Setup
38
+
39
+ 1. Install dependencies:
40
+ - `npm install`
41
+ 2. Sync local Jambonz docs:
42
+ - `npm run jambonz:sync`
43
+ 3. Regenerate the REST catalog from the synced docs:
44
+ - `npm run rest:catalog:generate`
45
+ 4. Validate the build:
46
+ - `npm run typecheck`
47
+ - `npm test`
48
+
49
+ ## Runtime Configuration
50
+
51
+ - `JAMBONZ_DOCS_DIR` (default: `docs/jambonz`)
52
+ - `JAMBONZ_API_BASE_URL` (default: `https://jambonz.cloud/api`)
53
+ - `JAMBONZ_API_TOKEN`
54
+ - `JAMBONZ_ACCOUNT_SID`
55
+ - `JAMBONZ_API_PERMISSION_LEVEL` (`READ_ONLY`, `READ_WRITE`, `ADMIN`)
56
+ - `JAMBONZ_HTTP_TIMEOUT_MS` (default: `15000`)
57
+ - `JAMBONZ_ALLOW_TOKEN_OVERRIDE` (`true` or `false`)
58
+ - `JAMBONZ_ALLOW_BASE_URL_OVERRIDE` (`true` or `false`)
59
+
60
+ Operational behavior:
61
+
62
+ - If `JAMBONZ_ACCOUNT_SID` is set, AccountSid-scoped tools apply it automatically when `pathParams.AccountSid` is omitted.
63
+ - `jambonz://runtime/defaults` exposes the active permission level and whether a default `AccountSid` is configured.
64
+ - Permission failures return before endpoint-level argument validation for methods blocked by `JAMBONZ_API_PERMISSION_LEVEL`.
65
+
66
+ ## Permission Model
67
+
68
+ - `READ_ONLY`: `GET`
69
+ - `READ_WRITE`: `GET`, `POST`, `PUT`, `PATCH`
70
+ - `ADMIN`: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
71
+
72
+ All tools remain listed. Execution is gated at runtime.
73
+
74
+ ## Codex MCP Registration
75
+
76
+ This server is designed to run as a local `stdio` MCP server.
77
+
78
+ Example `~/.codex/config.toml` entry:
79
+
80
+ ```toml
81
+ [mcp_servers.jambonz]
82
+ command = "npx"
83
+ args = ["-y", "tsx", "src/index.ts"]
84
+ cwd = "/path/to/jambonz-mcp"
85
+ startup_timeout_sec = 20
86
+ tool_timeout_sec = 120
87
+ enabled = true
88
+
89
+ [mcp_servers.jambonz.env]
90
+ JAMBONZ_API_TOKEN = "your-token"
91
+ JAMBONZ_ACCOUNT_SID = "your-account-sid"
92
+ JAMBONZ_API_PERMISSION_LEVEL = "READ_ONLY"
93
+ ```
94
+
95
+ `cwd` is required because the server resolves `src/index.ts` and local docs relative to the repository root.
96
+
97
+ ## Commands
98
+
99
+ - `npm run dev`: Start the MCP server with stdio transport.
100
+ - `npm run build`: Build the ESM bundle with declarations.
101
+ - `npm run typecheck`: Run TypeScript validation.
102
+ - `npm test`: Run deterministic unit tests.
103
+ - `npm run protocol:sync`: Refresh local MCP protocol docs in `docs/protocol`.
104
+ - `npm run jambonz:sync`: Refresh local Jambonz docs in `docs/jambonz`.
105
+ - `npm run rest:catalog:generate`: Regenerate `src/rest/catalog.generated.ts`.
106
+ - `npm run rest:catalog:check`: Verify the generated REST catalog is current.
107
+ - `npm run inspect`: Launch MCP Inspector against this server.
108
+ - `npm run inspect:help`: Show MCP Inspector CLI options.
109
+
110
+ ## Release
111
+
112
+ This repository publishes the package to npm on Git tags that match `v*` using GitHub Actions.
113
+
114
+ Release flow:
115
+
116
+ 1. Ensure `package.json` version matches the intended release.
117
+ 2. Push a tag such as `v1.0.0`.
118
+ 3. Configure the repository secret `NPM_TOKEN`.
119
+
120
+ The workflow installs dependencies with `npm ci`, runs `typecheck`, runs `test`, builds `dist/`, and publishes with provenance enabled.
@@ -0,0 +1,12 @@
1
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
2
+
3
+ interface ConnectableServer {
4
+ connect(transport: StdioServerTransport): Promise<void>;
5
+ }
6
+ interface StartServerDependencies {
7
+ readonly createServer?: () => ConnectableServer | Promise<ConnectableServer>;
8
+ readonly createTransport?: () => StdioServerTransport;
9
+ }
10
+ declare function startServer(dependencies?: StartServerDependencies): Promise<void>;
11
+
12
+ export { type ConnectableServer, type StartServerDependencies, startServer };