@withone/mcp 2.5.1 → 2.5.2
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 +202 -125
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,80 +1,74 @@
|
|
|
1
|
-
<
|
|
1
|
+
<p>
|
|
2
|
+
<a href="https://withone.ai/products/mcp">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/withoneai/mcp/main/assets/banner.svg" alt="One MCP. Three tools. Every agent. Every app." width="100%">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
7
|
<h3 align="center">One MCP Server</h3>
|
|
4
8
|
|
|
5
9
|
<p align="center">
|
|
10
|
+
<a href="https://withone.ai/docs/install"><strong>Setup guides</strong></a>
|
|
11
|
+
·
|
|
12
|
+
<a href="https://withone.ai/docs/mcp"><strong>Docs</strong></a>
|
|
13
|
+
·
|
|
14
|
+
<a href="https://withone.ai/knowledge"><strong>API directory</strong></a>
|
|
15
|
+
·
|
|
6
16
|
<a href="https://withone.ai"><strong>Website</strong></a>
|
|
7
|
-
 
|
|
8
|
-
<a href="https://withone.ai/docs"><strong>Docs</strong></a>
|
|
9
|
-
·
|
|
17
|
+
·
|
|
10
18
|
<a href="https://app.withone.ai"><strong>Dashboard</strong></a>
|
|
11
|
-
 
|
|
19
|
+
·
|
|
12
20
|
<a href="https://withone.ai/changelog"><strong>Changelog</strong></a>
|
|
13
|
-
·
|
|
14
|
-
<a href="https://x.com/withoneai"><strong>X</strong></a>
|
|
15
|
-
·
|
|
16
|
-
<a href="https://linkedin.com/company/withoneai"><strong>LinkedIn</strong></a>
|
|
17
21
|
</p>
|
|
18
22
|
|
|
19
23
|
<p align="center">
|
|
20
|
-
<a href="https://npmjs.com/package/@withone/mcp"><img src="https://img.shields.io/npm/v/%40withone%2Fmcp" alt="npm version"></a>
|
|
24
|
+
<a href="https://npmjs.com/package/@withone/mcp"><img src="https://img.shields.io/npm/v/%40withone%2Fmcp?color=447D5D&labelColor=132A21&style=flat-square" alt="npm version"></a>
|
|
25
|
+
|
|
26
|
+
<a href="https://withone.ai/knowledge"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fapi.withone.ai%2Fopen%2Fcount%2Fplatforms&color=447D5D&labelColor=132A21&style=flat-square" alt="platforms"></a>
|
|
27
|
+
|
|
28
|
+
<a href="https://withone.ai/knowledge"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fapi.withone.ai%2Fopen%2Fcount%2Ftools&label=verified%20tools&color=447D5D&labelColor=132A21&style=flat-square" alt="verified tools"></a>
|
|
29
|
+
|
|
30
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-447D5D?labelColor=132A21&style=flat-square" alt="License MIT"></a>
|
|
21
31
|
</p>
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install -g @withone/cli
|
|
27
|
-
one init
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
That's it. The [One CLI](https://www.npmjs.com/package/@withone/cli) will prompt you for your API key (get one from the [One dashboard](https://app.withone.ai/settings/api-keys)) and configure the MCP server for your environment: Claude Desktop, Cursor, Claude Code, Windsurf, or any MCP-compatible agent.
|
|
33
|
+
One's [MCP](https://modelcontextprotocol.io) server gives your agent the apps you have connected on One. It has three tools, however many platforms and actions sit behind them, and the agent never sees an OAuth token or an API key.
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
There are two ways to run it.
|
|
33
36
|
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **Code generation.** "build a form to send emails using Gmail", "create a dashboard that lists my Linear projects"
|
|
37
|
-
- **No tool bloat.** Only 3 tools exposed regardless of how many platforms or actions you connect. One call finds every action a task needs, across platforms, with its documentation, so your agent's context window stays clean.
|
|
38
|
-
- **Fine-grained access control.** Restrict which actions, connections, and permission levels (read, write, admin) your agent has access to.
|
|
39
|
-
- **Secure by default.** All requests proxied through One, secrets automatically redacted, no platform API keys to manage.
|
|
37
|
+
- **The remote server, which we recommend.** One hosts it at `https://mcp.withone.ai/mcp`. Point your client at that URL, sign in to One in the browser and choose what the agent can reach. There is nothing to install and no API key.
|
|
38
|
+
- **This package.** `@withone/mcp` runs the same three tools on your machine over stdio, with an API key. Use it for clients without remote support, headless machines and Docker.
|
|
40
39
|
|
|
41
|
-
##
|
|
40
|
+
## Quick start
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
> "Get my last 5 emails from Gmail"
|
|
42
|
+
Add the remote server to your client. On first connect the client opens a browser, where you sign in to One and pick what the agent can reach.
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
**Claude Code**
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
> "Create a React form component that sends emails using Gmail"
|
|
52
|
-
|
|
53
|
-
> "Build a dashboard that displays Linear users and their assigned projects with filtering"
|
|
54
|
-
|
|
55
|
-
> "Create a paginatable table that fetches and displays QuickBooks invoices with search and sort"
|
|
46
|
+
```bash
|
|
47
|
+
claude mcp add --transport http one https://mcp.withone.ai/mcp
|
|
48
|
+
```
|
|
56
49
|
|
|
57
|
-
|
|
50
|
+
Then run `/mcp` inside Claude Code, pick `one` and choose Authenticate.
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
**Codex**
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
|------|-------------|
|
|
63
|
-
| `list_one_integrations` | List available platforms and active connections, each with the `access` it confers (full, access levels, or specific actions) |
|
|
64
|
-
| `find_one_actions` | Find the action for every operation a task needs, across platforms, with its documentation, in one call; `load` fetches more of a document or an alternative's |
|
|
65
|
-
| `execute_one_action` | Execute an API action on a connected platform |
|
|
54
|
+
Add One to `~/.codex/config.toml`, then sign in with `codex mcp login one`.
|
|
66
55
|
|
|
67
|
-
|
|
56
|
+
```toml
|
|
57
|
+
[mcp_servers.one]
|
|
58
|
+
url = "https://mcp.withone.ai/mcp"
|
|
59
|
+
```
|
|
68
60
|
|
|
69
|
-
|
|
61
|
+
**Cursor and VS Code**
|
|
70
62
|
|
|
71
|
-
|
|
63
|
+
[](https://cursor.com/en/install-mcp?name=one&config=eyJ1cmwiOiAiaHR0cHM6Ly9tY3Aud2l0aG9uZS5haS9tY3AifQ==)
|
|
64
|
+
[](https://vscode.dev/redirect/mcp/install?name=one&config=%7B%22type%22%3A%20%22http%22%2C%20%22url%22%3A%20%22https%3A%2F%2Fmcp.withone.ai%2Fmcp%22%7D)
|
|
65
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=one&config=%7B%22type%22%3A%20%22http%22%2C%20%22url%22%3A%20%22https%3A%2F%2Fmcp.withone.ai%2Fmcp%22%7D)
|
|
72
66
|
|
|
73
|
-
|
|
67
|
+
In Windsurf, One is in the MCP marketplace, which reads the MCP Registry entry `ai.withone/mcp`.
|
|
74
68
|
|
|
75
|
-
|
|
69
|
+
**Any other client**
|
|
76
70
|
|
|
77
|
-
|
|
71
|
+
The server speaks the Streamable HTTP transport. A client with a config file takes the entry below, and a client with a settings screen needs only the URL.
|
|
78
72
|
|
|
79
73
|
```json
|
|
80
74
|
{
|
|
@@ -87,135 +81,218 @@ Add it to your client's MCP configuration. The endpoint speaks the Streamable HT
|
|
|
87
81
|
}
|
|
88
82
|
```
|
|
89
83
|
|
|
90
|
-
Some clients
|
|
91
|
-
|
|
92
|
-
One-click install:
|
|
84
|
+
Some clients name the keys differently. There is a step-by-step guide for [Claude Code](https://withone.ai/docs/install/claude-code), [Codex](https://withone.ai/docs/install/codex), [Claude Cowork](https://withone.ai/docs/install/claude-cowork), [ChatGPT](https://withone.ai/docs/install/chatgpt), [Cursor](https://withone.ai/docs/install/cursor), [Devin](https://withone.ai/docs/install/devin), [Kiro](https://withone.ai/docs/install/kiro), [OpenClaw](https://withone.ai/docs/install/openclaw) and [Hermes](https://withone.ai/docs/install/hermes), and the [setup guides](https://withone.ai/docs/install) cover Gemini CLI and the rest.
|
|
93
85
|
|
|
94
|
-
|
|
95
|
-
[](https://insiders.vscode.dev/redirect/mcp/install?name=one&config=%7B%22type%22%3A%20%22http%22%2C%20%22url%22%3A%20%22https%3A%2F%2Fmcp.withone.ai%2Fmcp%22%7D)
|
|
96
|
-
[](https://cursor.com/en/install-mcp?name=one&config=eyJ1cmwiOiAiaHR0cHM6Ly9tY3Aud2l0aG9uZS5haS9tY3AifQ==)
|
|
97
|
-
[](windsurf://windsurf-mcp-registry?serverName=ai.withone/mcp)
|
|
86
|
+
**Then ask your agent**
|
|
98
87
|
|
|
99
|
-
|
|
88
|
+
> Get my last 5 emails from Gmail
|
|
100
89
|
|
|
101
|
-
|
|
90
|
+
> Post the release notes to #general in Slack
|
|
102
91
|
|
|
103
|
-
|
|
92
|
+
> Build a form that creates a HubSpot contact
|
|
104
93
|
|
|
105
|
-
|
|
106
|
-
npm install @withone/mcp
|
|
107
|
-
```
|
|
94
|
+
## Remote or local
|
|
108
95
|
|
|
109
|
-
|
|
96
|
+
Use the remote server wherever your client supports one.
|
|
110
97
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
| | Remote server | Local `@withone/mcp` |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| **Setup** | A URL | Node.js 22.23.4+, 24.22.1+ or 26.12.1+, run with `npx` |
|
|
101
|
+
| **Sign-in** | OAuth in the browser | An API key in `ONE_SECRET` |
|
|
102
|
+
| **Scoping** | The consent screen, editable from the dashboard | Environment variables, or limits set on the key |
|
|
103
|
+
| **Approval before writes** | Your client's own confirmation, prompted by the tool annotations | `ONE_APPROVAL`, through MCP elicitation |
|
|
104
|
+
| **Transport** | Streamable HTTP | stdio |
|
|
105
|
+
| **Good for** | Every client that supports remote servers | Clients without remote support, headless machines with no browser, Docker and per-user identity scoping |
|
|
114
106
|
|
|
115
|
-
|
|
107
|
+
The [MCP Registry](https://registry.modelcontextprotocol.io) lists both under `ai.withone/mcp`, the remote URL and the npm package.
|
|
116
108
|
|
|
117
|
-
|
|
109
|
+
## The three tools
|
|
118
110
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
| Tool | What it does | Annotations |
|
|
112
|
+
|------|--------------|-------------|
|
|
113
|
+
| `list_one_integrations` | Lists your connected apps, each with its connection key and the access it allows | Read-only |
|
|
114
|
+
| `find_one_actions` | Finds the action for every operation a task needs, across platforms, in one call, with its documentation | Read-only |
|
|
115
|
+
| `execute_one_action` | Runs an action on a connected app | Destructive, open-world |
|
|
123
116
|
|
|
124
|
-
|
|
125
|
-
|----------|-------------|--------|
|
|
126
|
-
| `ONE_IDENTITY` | The identifier for the entity (e.g., user ID, team ID) | Any string |
|
|
127
|
-
| `ONE_IDENTITY_TYPE` | The type of identity | `user`, `team`, `organization`, `project` |
|
|
117
|
+
The agent calls `list_one_integrations` first, then `find_one_actions` with every operation the task needs, then `execute_one_action` for each one. The remote server sends these instructions when the client connects. The local server does not, and you can add the workflow to your agent's prompt if it does not follow it.
|
|
128
118
|
|
|
129
|
-
|
|
119
|
+
`execute_one_action` is the only tool that can change anything. Its annotations mark it destructive, which lets your client ask before it runs.
|
|
130
120
|
|
|
131
|
-
###
|
|
121
|
+
### Find actions
|
|
132
122
|
|
|
133
|
-
|
|
123
|
+
Send one entry in `requests` for each operation, as a kebab-case `platform` and a short `intent` that names the operation alone, without IDs, names or message text.
|
|
134
124
|
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"requests": [
|
|
128
|
+
{ "platform": "gmail", "intent": "send an email" },
|
|
129
|
+
{ "platform": "hubspot", "intent": "find a contact by email" }
|
|
130
|
+
],
|
|
131
|
+
"task": "email a report to a CRM contact",
|
|
132
|
+
"ai_model": "claude-sonnet-5"
|
|
133
|
+
}
|
|
141
134
|
```
|
|
142
135
|
|
|
143
|
-
|
|
144
|
-
|---|---|---|---|
|
|
145
|
-
| `ONE_PERMISSIONS` | `read` \| `write` \| `admin` | `admin` | Filter actions by One's `access` classification of what each one does, whatever its HTTP method. `read` = `read` actions only, `write` = `read` and `write` actions, `admin` = all actions including `delete`. Below `admin`, an action with no classification is refused |
|
|
146
|
-
| `ONE_APPROVAL` | `off` \| `delete` \| `write` | `off` | Ask the user before an action runs. `delete` asks for `delete` actions, `write` asks for `write` and `delete` actions, and `read` actions never ask. An action with no classification is asked about at both levels. See [Approval](#approval) |
|
|
147
|
-
| `ONE_CONNECTION_KEYS` | `*` or comma-separated keys | `*` | Restrict visible connections and platforms to specific connection keys |
|
|
148
|
-
| `ONE_ACTION_IDS` | `*` or comma-separated IDs | `*` | Restrict visible and executable actions to specific action IDs |
|
|
149
|
-
| `ONE_KNOWLEDGE_AGENT` | `true` \| `false` | `false` | Remove the `execute_one_action` tool entirely, forcing knowledge-only mode. `find_one_actions` then returns each chosen action's whole document with how to call it from code, and an Integration Code Guide (passthrough URL, `x-one-*` headers, `ONE_SECRET` / `ONE_{PLATFORM}_CONNECTION_KEY` env vars, backend-only placement) for writing application code |
|
|
136
|
+
`requests` takes 1 to 10 operations. `task` is the whole job in one general line, which helps choose between similar actions, and `ai_model` names the model that is asking.
|
|
150
137
|
|
|
151
|
-
|
|
138
|
+
Each answer names the chosen action with its documentation, plus a few alternatives. When One is unsure, it sets a substitute apart. Large documents come back as a digest that lists the sections it left out. Call again with `load: [{ action_id, section }]` in place of `requests` to read a section, the table of contents, the whole document or an alternative. Results only include actions the agent is allowed to run.
|
|
152
139
|
|
|
153
|
-
|
|
140
|
+
A platform name One does not have, such as `clickup` for `click-up`, is not searched. The answer names the platforms it may have meant, and the agent can ask again.
|
|
154
141
|
|
|
155
|
-
|
|
156
|
-
|---|---|
|
|
157
|
-
| `{ "policy": "full" }` | No action allowlist and `ONE_PERMISSIONS=admin` — every action is runnable. |
|
|
158
|
-
| `{ "policy": "levels", "levels": ["read", ...] }` | No action allowlist, but `ONE_PERMISSIONS` is `read`/`write` — only actions classified at these access levels are runnable. |
|
|
159
|
-
| `{ "policy": "actions", "actions": [{ "actionId", "title", "method" }] }` | `ONE_ACTION_IDS` is set — exactly these actions (the ones on that connection's platform) are runnable, so no search is needed. |
|
|
142
|
+
### Execute an action
|
|
160
143
|
|
|
161
|
-
|
|
144
|
+
The two servers take the same arguments under different names. The remote server uses snake_case and the local package uses camelCase.
|
|
162
145
|
|
|
163
|
-
|
|
146
|
+
| Remote server | Local package | What it is |
|
|
147
|
+
|---------------|---------------|------------|
|
|
148
|
+
| `action_id` | `actionId` | The action to run, from `find_one_actions` or from a connection's `access` list. Required |
|
|
149
|
+
| `connection_key` | `connectionKey` | The connection to run it on, from `list_one_integrations`. Required |
|
|
150
|
+
| | `platform` | The connection's platform. Required on the local package only |
|
|
151
|
+
| `data` | `data` | The request body, JSON by default |
|
|
152
|
+
| `path_variables` | `pathVariables` | Values for the `{var}` placeholders in the action's path |
|
|
153
|
+
| `query_params` | `queryParams` | Query-string parameters |
|
|
154
|
+
| `headers` | `headers` | Extra headers to send to the platform |
|
|
155
|
+
| `is_form_url_encoded` | `isFormUrlEncoded` | Send `data` as `application/x-www-form-urlencoded` |
|
|
156
|
+
| | `isFormData` | Send `data` as multipart. The remote server does not support it yet |
|
|
157
|
+
| `ai_model` | | The model the agent runs as, recorded with the call |
|
|
164
158
|
|
|
165
|
-
|
|
159
|
+
One resolves the connection and its credentials on its side, makes the call and returns `responseData`, `status` and `requestConfig`, a copy of the request with credentials redacted. A platform error comes back as a normal result that carries its `status`. Only a refusal from One is a tool error.
|
|
166
160
|
|
|
167
|
-
|
|
161
|
+
Upgrading from 1.x? `search_one_platform_actions` and `get_one_action_knowledge` are removed, and `find_one_actions` replaces both.
|
|
168
162
|
|
|
169
|
-
##
|
|
163
|
+
## Choose what the agent can reach
|
|
170
164
|
|
|
171
|
-
|
|
165
|
+
On the remote server, the consent screen decides what the agent gets. Pick the account and environment, then give access to all connections or tick specific ones and set a level for each.
|
|
172
166
|
|
|
173
|
-
|
|
167
|
+
| Level | What the agent can run |
|
|
168
|
+
|-------|------------------------|
|
|
169
|
+
| **Full access** | Every action on the connection, including deletes |
|
|
170
|
+
| **Read & write** | Actions that read or change data, but no deletes |
|
|
171
|
+
| **Read only** | Actions that only read data |
|
|
172
|
+
| **Custom** | Only the actions you tick |
|
|
174
173
|
|
|
175
|
-
|
|
176
|
-
npx @withone/mcp
|
|
177
|
-
```
|
|
174
|
+
A level is judged by what each action does, not by its HTTP method. One classifies every action as read, write or delete, which means a search sent as a POST runs under Read only.
|
|
178
175
|
|
|
179
|
-
|
|
176
|
+
One enforces the grant on every call. An action outside it is never offered to the agent, and a call that names one anyway is refused. Each connection in `list_one_integrations` carries an `access` field, which tells the agent what it can run before it looks for actions.
|
|
180
177
|
|
|
181
|
-
|
|
178
|
+
**Knowledge only mode** lets the agent read API documentation and nothing else. It is built for code generation. The agent gets `find_one_actions` alone, and each document comes back whole with how to call the action from your own code. Turn it on from the consent screen.
|
|
182
179
|
|
|
183
|
-
|
|
180
|
+
**To change or revoke access**, open Agents and access in the [One dashboard](https://app.withone.ai). Change a connection's level or remove it, and the change applies on the agent's next call, with no reconnect. An edit can narrow or restore what you first granted. To grant more, reconnect and approve again.
|
|
181
|
+
|
|
182
|
+
<p>
|
|
183
|
+
<img src="https://raw.githubusercontent.com/withoneai/mcp/main/assets/access-levels.jpg" alt="Manage access in the One dashboard, with the level menu open for Gmail. Full access, Read and write, Read only, Custom actions and No access." width="100%">
|
|
184
|
+
</p>
|
|
184
185
|
|
|
185
|
-
-
|
|
186
|
-
|
|
186
|
+
The docs cover the [consent screen](https://withone.ai/docs/mcp#authorize-and-scope-access), the [errors and refusals](https://withone.ai/docs/mcp#errors-and-refusals) and the [OAuth details](https://withone.ai/docs/mcp#connection-details) for anyone building a client.
|
|
187
|
+
|
|
188
|
+
## Run the package locally
|
|
189
|
+
|
|
190
|
+
The package needs Node.js 22.23.4+, 24.22.1+ or 26.12.1+ and an API key from the [One dashboard](https://app.withone.ai/settings/api-keys). Add it to your client's MCP config.
|
|
187
191
|
|
|
188
192
|
```json
|
|
189
193
|
{
|
|
190
194
|
"mcpServers": {
|
|
191
195
|
"one": {
|
|
192
196
|
"command": "npx",
|
|
193
|
-
"args": ["@withone/mcp"],
|
|
197
|
+
"args": ["-y", "@withone/mcp"],
|
|
194
198
|
"env": {
|
|
195
|
-
"ONE_SECRET": "your-one-
|
|
199
|
+
"ONE_SECRET": "your-one-api-key"
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
204
|
```
|
|
201
205
|
|
|
206
|
+
Or run it by hand.
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
ONE_SECRET=your-one-api-key npx -y @withone/mcp
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Older Node releases trust the compromised eMudhra CA certificates (October 2026), and a network attacker could read `ONE_SECRET`. On one of them the server still starts, but every tool returns an error with the command that updates Node.
|
|
213
|
+
|
|
214
|
+
### Configuration
|
|
215
|
+
|
|
216
|
+
Scope the local server with environment variables in place of a consent screen.
|
|
217
|
+
|
|
218
|
+
| Variable | Default | Description |
|
|
219
|
+
|----------|---------|-------------|
|
|
220
|
+
| `ONE_SECRET` | | Your API key. Required |
|
|
221
|
+
| `ONE_PERMISSIONS` | `admin` | `read` allows read actions only, `write` allows read and write actions, and `admin` allows everything, including deletes. Judged by what each action does, not its HTTP method. Below `admin`, an action with no classification is refused |
|
|
222
|
+
| `ONE_APPROVAL` | `off` | Ask you before an action runs. `write` asks before writes and deletes, and `delete` asks before deletes only. See [Approval](#approval) |
|
|
223
|
+
| `ONE_CONNECTION_KEYS` | `*` | Comma-separated connection keys the agent may use. `find_one_actions` only searches their platforms |
|
|
224
|
+
| `ONE_ACTION_IDS` | `*` | Comma-separated action IDs the agent may find and run |
|
|
225
|
+
| `ONE_KNOWLEDGE_AGENT` | `false` | `true` removes `execute_one_action`. `find_one_actions` then returns each document whole, with how to call the action from code |
|
|
226
|
+
| `ONE_IDENTITY`, `ONE_IDENTITY_TYPE` | | Only list and run connections that belong to one identity. The type is `user`, `team`, `organization` or `project` |
|
|
227
|
+
| `ONE_BASE_URL` | `https://api.withone.ai` | The One API the server calls |
|
|
228
|
+
| `ONE_ALLOW_UNPATCHED_NODE` | | `1` lets the server call One from an older Node.js. You stay exposed while it is set |
|
|
229
|
+
|
|
230
|
+
An invalid `ONE_PERMISSIONS` or `ONE_APPROVAL` stops the server at startup. With no variables set beyond the key, the server has full access and all three tools.
|
|
231
|
+
|
|
232
|
+
Whatever you set is reported back to the agent. `list_one_integrations` stamps each connection with an `access` field.
|
|
233
|
+
|
|
234
|
+
| `access` | When |
|
|
235
|
+
|----------|------|
|
|
236
|
+
| `{ "policy": "full" }` | No action allowlist and `ONE_PERMISSIONS=admin`. Every action is runnable |
|
|
237
|
+
| `{ "policy": "levels", "levels": ["read"] }` | `ONE_PERMISSIONS` is `read` or `write`. Only actions at these levels are runnable |
|
|
238
|
+
| `{ "policy": "actions", "actions": [...] }` | `ONE_ACTION_IDS` is set. Exactly these actions are runnable, and no search is needed |
|
|
239
|
+
|
|
240
|
+
### Approval
|
|
241
|
+
|
|
242
|
+
An agent that has just read an email, a web page or another third-party document can be steered by what it read. With `ONE_APPROVAL` set, the person at the MCP client decides whether a change goes ahead, not the agent.
|
|
243
|
+
|
|
244
|
+
Before `execute_one_action` runs an action that needs approval, the server shows a prompt through [MCP elicitation](https://modelcontextprotocol.io/specification/latest/client/elicitation). It names the action, the platform, the connection and what will be sent, and you tick a box to run it. Declining, dismissing or not answering within 10 minutes stops the action, and nothing is sent.
|
|
245
|
+
|
|
246
|
+
Your MCP client has to support elicitation. If it does not, every action that needs approval is refused. Check your client before you turn this on.
|
|
247
|
+
|
|
202
248
|
### Docker
|
|
203
249
|
|
|
204
250
|
```bash
|
|
205
|
-
docker build -t one-mcp
|
|
206
|
-
docker run -e ONE_SECRET=
|
|
251
|
+
docker build -t one-mcp .
|
|
252
|
+
docker run -i --rm -e ONE_SECRET=your-one-api-key one-mcp
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
`-i` keeps stdin open, which a stdio server needs. Pass any variable above with another `-e`.
|
|
256
|
+
|
|
257
|
+
### Limits on the key
|
|
258
|
+
|
|
259
|
+
The variables are enforced by the local server. To enforce limits on One's side for anything that uses the key, set them on the key itself in the dashboard. If the [One CLI](https://github.com/withoneai/cli) is installed, `one config` keeps the variables of an existing `one` server entry in step with the CLI's own settings.
|
|
260
|
+
|
|
261
|
+
## Build it into your product
|
|
262
|
+
|
|
263
|
+
Does your product run its own AI agent for its users? It can skip the browser sign-in. [Connect](https://github.com/withoneai/connect) is One's embeddable authentication, which you add to your product for your users to connect their own apps. Your server then gets a 15-minute token for a connected user, and your agent uses the remote server with that token, within what the user granted.
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
const { accessToken, url } = await oneConnect.getMcpToken(userId);
|
|
267
|
+
// url is https://mcp.withone.ai/mcp
|
|
207
268
|
```
|
|
208
269
|
|
|
209
|
-
|
|
270
|
+
See [Give your agent the MCP server](https://withone.ai/docs/connect/mcp).
|
|
210
271
|
|
|
211
272
|
## Security
|
|
212
273
|
|
|
213
|
-
|
|
274
|
+
Your agent never handles a platform credential. One stores the OAuth tokens and API keys for your connections and adds them on its side on each call. The remote server authenticates your agent with a short-lived OAuth token tied to the grant you approved, and the local package's only credential is `ONE_SECRET`. Credentials are redacted from every response, and sensitive headers are stripped from the request echo.
|
|
275
|
+
|
|
276
|
+
Every call is recorded against the agent or the key that made it. Open either one in Agents and access to see each action it ran, whether that action reads or writes, and how many calls One blocked.
|
|
277
|
+
|
|
278
|
+
<p>
|
|
279
|
+
<img src="https://raw.githubusercontent.com/withoneai/mcp/main/assets/agent-actions.jpg" alt="The Actions tab for Claude Code in the One dashboard. Each action with its app, method, access, calls, errors and blocked calls." width="100%">
|
|
280
|
+
</p>
|
|
281
|
+
|
|
282
|
+
To report a vulnerability, see [SECURITY.md](./SECURITY.md).
|
|
283
|
+
|
|
284
|
+
## Development
|
|
214
285
|
|
|
215
|
-
|
|
286
|
+
```bash
|
|
287
|
+
git clone https://github.com/withoneai/mcp.git
|
|
288
|
+
cd mcp
|
|
289
|
+
npm install # also builds
|
|
290
|
+
npm test
|
|
291
|
+
ONE_SECRET=your-one-api-key npm run inspector
|
|
292
|
+
```
|
|
216
293
|
|
|
217
|
-
|
|
294
|
+
`npm run inspector` opens the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) against your local build.
|
|
218
295
|
|
|
219
|
-
## Support
|
|
296
|
+
## Support and license
|
|
220
297
|
|
|
221
|
-
|
|
298
|
+
Email support@withone.ai or [open an issue](../../issues). The package is released under the [MIT license](./LICENSE).
|