@talqing/mcp 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 Talqing
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,147 @@
1
+ # Talqing MCP server
2
+
3
+ Build Talqing AI voice, video and text agents from Claude Code, Codex, or any
4
+ other MCP client.
5
+
6
+ This is the same surface Talqing's own in-product CoPilot works from — the same
7
+ operations and the same platform knowledge, generated from one source. Anything
8
+ the CoPilot can build, your coding agent can build.
9
+
10
+ ## What you get
11
+
12
+ One operation for everything the Talqing dashboard can do. Agents, tools and
13
+ their operation trees, integrations and triggers, knowledge bases from crawl to
14
+ ready, carrier accounts and phone numbers, secrets, provider keys, webhooks and
15
+ tokens; then placing outbound calls, talking to text agents, and reading back
16
+ transcripts, cost and latency. Each one maps to a Talqing API endpoint, and its
17
+ arguments mirror that HTTP call: path and query parameters at the top level,
18
+ request body under `body`.
19
+
20
+ A few request types are large enough that carrying them in every tool that
21
+ accepts one would cost more context than the whole rest of the server — an
22
+ agent's config, its override, a team, a task's config, a tool's operation tree.
23
+ Those arguments name their shape instead of inlining it, and `describe_schema`
24
+ serves the real thing when it is needed.
25
+
26
+ The server also hands the client `SKILL.md`, which explains how agents are put
27
+ together on Talqing — draft and publish, the operation tree, hooks, channels and
28
+ model selection. Your agent gets that automatically as server instructions.
29
+
30
+ ## Setup
31
+
32
+ Open the Talqing dashboard. The **Agents** page has your token and a
33
+ ready-to-paste command for each client — the snippets below are what it shows.
34
+ The token authenticates as you, acts with your current role, and reaches only
35
+ your workspace.
36
+
37
+ **Claude Code**
38
+
39
+ ```bash
40
+ claude mcp add talqing \
41
+ -e TALQING_BASE_URL=https://api.your-talqing-host.com \
42
+ -e TALQING_API_KEY=tq_your_token \
43
+ -- npx -y @talqing/mcp
44
+ ```
45
+
46
+ **Codex**
47
+
48
+ ```bash
49
+ codex mcp add talqing \
50
+ --env TALQING_BASE_URL=https://api.your-talqing-host.com \
51
+ --env TALQING_API_KEY=tq_your_token \
52
+ -- npx -y @talqing/mcp
53
+ ```
54
+
55
+ **Grok** — `grok mcp add` takes no `--env`, so this one goes in
56
+ `~/.grok/config.toml`:
57
+
58
+ ```toml
59
+ [mcp_servers.talqing]
60
+ command = "npx"
61
+ args = ["-y", "@talqing/mcp"]
62
+ env = { TALQING_BASE_URL = "https://api.your-talqing-host.com", TALQING_API_KEY = "tq_your_token" }
63
+ ```
64
+
65
+ **Any other MCP client** — a stdio server, configured the usual way:
66
+
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "talqing": {
71
+ "command": "npx",
72
+ "args": ["-y", "@talqing/mcp"],
73
+ "env": {
74
+ "TALQING_BASE_URL": "https://api.your-talqing-host.com",
75
+ "TALQING_API_KEY": "tq_your_token"
76
+ }
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ Both variables are required — there is no default host, so the server can never
83
+ quietly talk to the wrong workspace.
84
+
85
+ ## Permissions
86
+
87
+ The server adds no permissions of its own. Every call is your API call: your
88
+ workspace, your role. A view-only member gets read operations and a clear 403 on
89
+ the rest, exactly as they would through the dashboard.
90
+
91
+ Operations are annotated so clients can tell reads from writes — `readOnlyHint`
92
+ on every GET, `destructiveHint` on every delete.
93
+
94
+ Two things are deliberately out of reach: streaming endpoints — their polling
95
+ equivalents are here, so nothing is unreachable — and user management, which
96
+ stays in the dashboard where a human is in the loop.
97
+
98
+ Some operations act on the real world. `create_outbound_call` rings a phone and
99
+ costs money, and a message to a connected channel is one somebody receives.
100
+ `SKILL.md` tells the model to do neither without being asked for that specific
101
+ contact, but a client's own approval prompts are still worth leaving on.
102
+
103
+ ## Running from source
104
+
105
+ If you have cloned this repo, point the client at your own build instead of
106
+ `npx`:
107
+
108
+ ```bash
109
+ cd mcp && npm install && npm run build
110
+ ```
111
+
112
+ ```json
113
+ {
114
+ "mcpServers": {
115
+ "talqing": {
116
+ "command": "node",
117
+ "args": ["/absolute/path/to/talqing/mcp/dist/index.js"],
118
+ "env": {
119
+ "TALQING_BASE_URL": "https://api.your-talqing-host.com",
120
+ "TALQING_API_KEY": "tq_your_token"
121
+ }
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ `npm install -g ./mcp` works too, and puts a `talqing-mcp` command on your PATH.
128
+
129
+ ## Development
130
+
131
+ `tools.json` and `SKILL.md` are generated from the backend, so the MCP surface
132
+ cannot drift from the product:
133
+
134
+ ```bash
135
+ PYTHONPATH=backend python openapi/export.py
136
+ ```
137
+
138
+ `tools.json` comes from `backend/api/operations.py`, the same registry the
139
+ CoPilot binds its tools from; `SKILL.md` comes from
140
+ `backend/services/copilot/skill.md`, the same text the CoPilot is prompted with.
141
+ Edit those, re-run the export, and both surfaces move together.
142
+
143
+ ```bash
144
+ npm install
145
+ npm run build
146
+ npm run typecheck
147
+ ```