@omnidim-ai/mcp-server 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OmniDimension
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # @omnidim-ai/mcp-server
2
+
3
+ Model Context Protocol server for [OmniDimension](https://omnidim.io). Drive voice agents, dispatch calls, manage knowledge bases, and run simulations from Claude, Cursor, Windsurf, or any MCP-compatible client.
4
+
5
+ ## Quick start
6
+
7
+ ### Claude Code
8
+
9
+ ```bash
10
+ claude mcp add omnidim -- npx -y @omnidim-ai/mcp-server
11
+ ```
12
+
13
+ Set your API key when prompted, or export `OMNIDIM_API_KEY` in your shell.
14
+
15
+ ### Claude Desktop, Cursor, Windsurf
16
+
17
+ Add this block to your MCP client config:
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "omnidim": {
23
+ "command": "npx",
24
+ "args": ["-y", "@omnidim-ai/mcp-server"],
25
+ "env": {
26
+ "OMNIDIM_API_KEY": "your_api_key_here"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ Get your API key from [omnidim.io/api-management](https://omnidim.io/api-management).
34
+
35
+ **Config file locations:**
36
+
37
+ | Client | Path |
38
+ |---|---|
39
+ | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
40
+ | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
41
+ | Cursor | `~/.cursor/mcp.json` |
42
+ | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
43
+
44
+ ## Tools
45
+
46
+ | Surface | Tools |
47
+ |---|---|
48
+ | Agents | create, update, list, get, delete |
49
+ | Calls | dispatch, list logs, get log |
50
+ | Bulk calls | create, fetch, get, actions, cancel, live status |
51
+ | Knowledge base | list, upload, attach, detach, delete |
52
+ | Phone numbers | list, attach, detach, import (Twilio, Exotel, SIP) |
53
+ | Providers | list LLMs, list voices, list STT, list TTS |
54
+ | Simulations | create, list, get, update, delete, start, stop, enhance prompt |
55
+ | Reseller | child orgs, users, credits (reseller accounts only) |
56
+
57
+ Full API reference: [docs.omnidim.io](https://docs.omnidim.io).
58
+
59
+ ## Local development
60
+
61
+ ```bash
62
+ git clone https://github.com/Omnidim/omnidim-mcp-server
63
+ cd omnidim-mcp-server
64
+ npm install
65
+ npm run build
66
+ OMNIDIM_API_KEY=sk_... npm start
67
+ ```
68
+
69
+ Inspect tools and call them interactively:
70
+
71
+ ```bash
72
+ OMNIDIM_API_KEY=sk_... npx @modelcontextprotocol/inspector node build/index.js
73
+ ```
74
+
75
+ ## License
76
+
77
+ [MIT](./LICENSE)
@@ -0,0 +1,11 @@
1
+ export declare const MAX_LIST_CHARS = 25000;
2
+ export declare const LIST_KEYS: string[];
3
+ export declare function redactSensitive(value: unknown): unknown;
4
+ export declare function findList(data: unknown): {
5
+ arr: unknown[];
6
+ key: string | null;
7
+ } | null;
8
+ export declare function trimLargeResponse(data: unknown): {
9
+ text: string;
10
+ note?: string;
11
+ };
@@ -0,0 +1,74 @@
1
+ export const MAX_LIST_CHARS = 25000;
2
+ export const LIST_KEYS = [
3
+ "bots",
4
+ "call_log_data",
5
+ "records",
6
+ "files",
7
+ "phone_numbers",
8
+ "llms",
9
+ "voices",
10
+ "stt",
11
+ "tts",
12
+ "services",
13
+ "organizations",
14
+ "data",
15
+ "results",
16
+ "items",
17
+ ];
18
+ // Reseller list endpoints return child orgs' plaintext api_key values.
19
+ // Strip them before they reach the model.
20
+ export function redactSensitive(value) {
21
+ if (Array.isArray(value))
22
+ return value.map(redactSensitive);
23
+ if (value && typeof value === "object") {
24
+ const out = {};
25
+ for (const [k, v] of Object.entries(value)) {
26
+ out[k] = k === "api_key" ? "[redacted]" : redactSensitive(v);
27
+ }
28
+ return out;
29
+ }
30
+ return value;
31
+ }
32
+ export function findList(data) {
33
+ if (Array.isArray(data))
34
+ return { arr: data, key: null };
35
+ if (!data || typeof data !== "object")
36
+ return null;
37
+ const obj = data;
38
+ for (const k of LIST_KEYS) {
39
+ const candidate = obj[k];
40
+ if (Array.isArray(candidate))
41
+ return { arr: candidate, key: k };
42
+ }
43
+ return null;
44
+ }
45
+ // Trim list responses to fit a model context budget. Single-resource
46
+ // responses are never trimmed; an oversized payload from getAgent etc.
47
+ // is handled by the MCP client (spill-to-file + chunked read).
48
+ export function trimLargeResponse(data) {
49
+ const redacted = redactSensitive(data);
50
+ const full = JSON.stringify(redacted, null, 2);
51
+ const list = findList(redacted);
52
+ if (!list || full.length <= MAX_LIST_CHARS)
53
+ return { text: full };
54
+ const { arr, key } = list;
55
+ let kept = arr.length;
56
+ while (kept > 1) {
57
+ const trimmed = arr.slice(0, kept);
58
+ const candidate = key
59
+ ? JSON.stringify({ ...redacted, [key]: trimmed }, null, 2)
60
+ : JSON.stringify(trimmed, null, 2);
61
+ if (candidate.length <= MAX_LIST_CHARS) {
62
+ return {
63
+ text: candidate,
64
+ note: `[Showing ${kept} of ${arr.length} items. Lower pagesize, filter by name, or fetch a specific item by ID for full detail.]`,
65
+ };
66
+ }
67
+ kept = Math.max(1, Math.floor(kept * 0.6));
68
+ }
69
+ return {
70
+ text: full.slice(0, MAX_LIST_CHARS),
71
+ note: `[Response truncated. Full size: ${full.length} chars.]`,
72
+ };
73
+ }
74
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,MAAM;IACN,eAAe;IACf,SAAS;IACT,OAAO;IACP,eAAe;IACf,MAAM;IACN,QAAQ;IACR,KAAK;IACL,KAAK;IACL,UAAU;IACV,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;CACV,CAAC;AAEF,uEAAuE;AACvE,0CAA0C;AAC1C,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC5D,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MA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C,EAAE,GAAI,QAAoC,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;YACvF,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,IAAI,SAAS,CAAC,MAAM,IAAI,cAAc,EAAE,CAAC;YACrC,OAAO;gBACH,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,YAAY,IAAI,OAAO,GAAG,CAAC,MAAM,0FAA0F;aACpI,CAAC;QACN,CAAC;QACD,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC;QACnC,IAAI,EAAE,mCAAmC,IAAI,CAAC,MAAM,UAAU;KACjE,CAAC;AACN,CAAC"}
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Server configuration
4
+ */
5
+ export declare const SERVER_NAME = "OmniDimension";
6
+ export declare const SERVER_VERSION = "0.1.0";
7
+ export declare const API_BASE_URL: string;
8
+ /**
9
+ * Type definition for cached OAuth tokens
10
+ */
11
+ interface TokenCacheEntry {
12
+ token: string;
13
+ expiresAt: number;
14
+ }
15
+ /**
16
+ * Declare global __oauthTokenCache property for TypeScript
17
+ */
18
+ declare global {
19
+ var __oauthTokenCache: Record<string, TokenCacheEntry> | undefined;
20
+ }
21
+ export {};