@awesomate/hosting-mcp 0.73.0 → 0.74.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/dist/index.js CHANGED
@@ -41415,7 +41415,7 @@ function restartGuidance() {
41415
41415
  var SERVER_INSTRUCTIONS = [
41416
41416
  "Awesomate connects this account's WordPress hosting, n8n automations, apps and Knowledge Base to Claude.",
41417
41417
  "Entry point: call awesomate_get_context once per session FIRST \u2014 it returns the account, plan, limits, an `attention` digest (unread notifications, erroring workflows, token expiry) and skill freshness. The domain contexts (awesomate_n8n_context, awesomate_app_context, awesomate_knowledge_status) come after it, only for their domain.",
41418
- "The awesomate-* skills are installed on this machine \u2014 load the one matching the task (awesomate-hosting, awesomate-n8n, awesomate-app-builder, awesomate-knowledge, awesomate-seo, awesomate-credentials, awesomate-github, awesomate-database, awesomate-support, awesomate-email) before working in that area.",
41418
+ "The awesomate-* skills are installed on this machine \u2014 load the one matching the task (awesomate-hosting, awesomate-n8n, awesomate-app-builder, awesomate-knowledge, awesomate-seo, awesomate-credentials, awesomate-github, awesomate-database, awesomate-support, awesomate-email, awesomate-onebrain for 1Brain) before working in that area.",
41419
41419
  "Reads work on every plan; building/writing generally needs Support Plus or above, and the Knowledge Base is on every plan (media and OCR ingest need Pro, a public widget and Ingestion Packs need Support Plus). Never retry a 403: it carries either an upgrade path (relay it honestly, let the user decide) or a privacy toggle only the user can flip (send them the settings link).",
41420
41420
  "Every response is stamped `account: <slug>` \u2014 if that is not the account the user expects, stop and fix the connection before doing any work.",
41421
41421
  "Features are given account by account: awesomate_get_context carries `features` ({contacts, email, knowledge, agents, ...}, each {available, reason, message}). Never offer or start work in a feature whose `available` is false; say its message in one line and stop. No `features` block (an older hub) or no entry for a feature means carry on as before: never infer unavailable. A tool for such a feature answers feature_unavailable with the same sentence: never retry it, and never switch anything back on for the user.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.73.0",
3
+ "version": "0.74.0",
4
4
  "description": "Awesomate MCP server — lets Claude manage your Awesomate WordPress hosting, plan, limits, n8n automations, and build Node/static apps + databases",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,5 +1,11 @@
1
1
  {
2
2
  "versions": [
3
+ {
4
+ "version": "0.74.0",
5
+ "highlights": [
6
+ "Claude knows 1Brain: how each person connects their own 1Brain in the hub, when to use 1Brain's own Claude connector, the 1Brain node in your automations or an AI agent, and the rules it keeps (drafts first, your own words, links to every page it used). New guide: what the 1Brain node can do"
7
+ ]
8
+ },
3
9
  {
4
10
  "version": "0.73.0",
5
11
  "highlights": [
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: awesomate-n8n
3
- description: Build, test, and fix the user's Awesomate-hosted n8n automations, data tables, and AI agents. Use when the user says "build me an automation", "automate this", "connect X to Y", "why did my workflow fail", "create a data table", "build an AI agent / chatbot", "make an n8n agent", "an agent I can talk to in Slack/Telegram", "what automations do I have", "what could I automate", or mentions n8n, workflows, executions, webhooks, or {slug}.awesomate.io. Reads and n8n Agents on every plan; building workflows needs Support Plus+. Companion to awesomate-hosting: same connection, same PAT.
3
+ description: Build, test, and fix the user's Awesomate-hosted n8n automations, data tables, and AI agents. Use when the user says "build me an automation", "automate this", "connect X to Y", "why did my workflow fail", "create a data table", "build an AI agent / chatbot", "make an n8n agent", "an agent I can talk to in Slack/Telegram", "what automations do I have", "what could I automate", or mentions n8n, workflows, executions, webhooks, the 1Brain node, or {slug}.awesomate.io. Reads and n8n Agents on every plan; building workflows needs Support Plus+. Companion to awesomate-hosting: same connection, same PAT.
4
4
  ---
5
5
 
6
6
  # Awesomate n8n — your automations from Claude Code
@@ -128,6 +128,7 @@ they're blocked on a restart.
128
128
  | Changing a LIVE workflow | [upgrade-loop.md](references/upgrade-loop.md) |
129
129
  | "What could I automate?" | [possibilities.md](references/possibilities.md) |
130
130
  | WordPress form → n8n | [wp-form-handler.md](references/wp-form-handler.md) |
131
+ | **1Brain** in a workflow or agent: procedures, SOPs, policies, the `CUSTOM.oneBrain` node (check it is on the instance first). Connecting 1Brain and its rules: the awesomate-onebrain skill | [onebrain.md](references/onebrain.md) |
131
132
  | A designed page served BY n8n — form, phone capture mini-app, approval page, status page | [webhook-pages.md](references/webhook-pages.md) |
132
133
  | Expression syntax details | [vendor/expressions/](references/vendor/expressions/SKILL.md) |
133
134
  | Code-node JavaScript | [vendor/code-node/](references/vendor/code-node/SKILL.md) |
@@ -0,0 +1,224 @@
1
+ # The 1Brain node: workflows and AI agents that use 1Brain
2
+
3
+ 1Brain (Business Blueprint) holds the business's systems: policies, procedures
4
+ (SOPs), training courses, quizzes and acknowledgements. The 1Brain node reads
5
+ and writes them from a workflow, or gives an AI Agent node tools to answer from
6
+ them. For what 1Brain is, connecting it, and the rules that apply on every
7
+ route (drafts, explicit account, never invent SOP content, page links in every
8
+ answer), load the **awesomate-onebrain** skill too.
9
+
10
+ ## 0. Before you design anything
11
+
12
+ 1. **`features.onebrain`** in `awesomate_get_context`: `available: false` means
13
+ say its `message` in one line and stop.
14
+ 2. **Is the node on this instance?** It ships in fleet image
15
+ `2.41.4-awesomate.10` and later, which only some instances run so far; the
16
+ rest get it with the next fleet image. Check:
17
+ - `awesomate_n8n_inspect {what:'credentials'}`: a `oneBrainApi` credential
18
+ ("1Brain - <person>") means the node is there (the hub can only place it on
19
+ an instance that knows the type).
20
+ - `awesomate_n8n_inspect {what:'nodes'}`: `CUSTOM.oneBrain` or
21
+ `CUSTOM.oneBrainTool` already in use means it is there.
22
+ - Neither: assume it is not, or ask Awesomate support whether the account's
23
+ n8n has the 1Brain node yet. Say
24
+ so, and offer the MCP Client Tool route (section 6), which needs only
25
+ core n8n (not yet proven end to end: say so).
26
+ 3. **Whose credential?** Each person who connected 1Brain in the hub has their
27
+ own "1Brain - <person>" credential. No credential: they connect first
28
+ (hub Settings, Integrations, 1Brain). For an agent, use the credential of
29
+ the person the agent answers to (its supervisor): the agent can never see
30
+ more than that person.
31
+ 4. **Validation false positive:** `awesomate_n8n_deploy {action:'validate'}`
32
+ and `awesomate_n8n_node_docs` do not know CUSTOM nodes and report the 1Brain
33
+ node as unknown. Expected; do not "fix" it. The node catalog has no schema
34
+ for it either: this page is the reference.
35
+
36
+ ## 1. Node types and credentials
37
+
38
+ | | |
39
+ |---|---|
40
+ | Regular node | `CUSTOM.oneBrain` |
41
+ | AI Agent tool | `CUSTOM.oneBrainTool` (connect to the agent's `ai_tool` input) |
42
+ | typeVersion | `2` for anything new. Version 1 exists only so old workflows open |
43
+ | Authentication `accessToken` (default) | Credential `oneBrainApi` (fields `accessToken`, `baseUrl`). Made and kept current by the hub, one per person. Never create or edit it |
44
+ | Authentication `oAuth2` | Credential `oneBrainOAuth2Api`: n8n signs in to 1Brain itself. Only for n8n instances the hub does not manage |
45
+ | Base URL | `https://dev.1brain.io` until 1Brain's production connection is live. Only https `1brain.io`, `1brain.app` or `1brain.it` hosts are accepted |
46
+
47
+ Parameters: `resource`, `operation`, `businessId` (the 1Brain account id, on
48
+ every operation except Tool > Call, where it is optional), then the operation's
49
+ own fields. Optional fields sit in `additionalFields`. A Page Search as an
50
+ agent tool:
51
+
52
+ ```json
53
+ {
54
+ "name": "Search procedures",
55
+ "type": "CUSTOM.oneBrainTool",
56
+ "typeVersion": 2,
57
+ "position": [600, 400],
58
+ "parameters": {
59
+ "authentication": "accessToken",
60
+ "businessId": 1234,
61
+ "resource": "page",
62
+ "operation": "search",
63
+ "query": "={{ $fromAI('query', 'Words to search the business procedures for', 'string') }}",
64
+ "limit": 5
65
+ },
66
+ "credentials": {
67
+ "oneBrainApi": { "id": "<id from awesomate_n8n_inspect credentials>", "name": "1Brain - Sam Taylor" }
68
+ }
69
+ }
70
+ ```
71
+
72
+ Get the account id from an Account > Get Many run (or the dropdown in the
73
+ editor). Page Get takes `pageId` (a number). Department fields are
74
+ `departmentId`, category fields `categoryId`; folder fields are a resource
75
+ locator (`{ "__rl": true, "mode": "id", "value": "415331" }`, or `mode: "title"`).
76
+
77
+ ## 2. Operations
78
+
79
+ | Resource | Operation (`resource` / `operation`) | What it does | Who can |
80
+ |---|---|---|---|
81
+ | Account | Get Many (`account` / `getMany`) | Accounts this connection may use, with their categories | anyone |
82
+ | Account | Set Active (`account` / `setActive`) | Make an account the default. Rarely needed: the node names the account on every call | anyone |
83
+ | Page | **Search** (`page` / `search`, the default) | Full-text search over titles, content and video transcripts, drafts included | anyone |
84
+ | Page | Get (`page` / `get`) | One page: plain text, HTML, videos and transcripts | anyone with access |
85
+ | Page | Get Many (`page` / `getMany`) | Every page in a department, folder or category, drafts included | anyone |
86
+ | Page | Create (`page` / `create`) | A page in a department, optionally in a folder | editors |
87
+ | Page | Update (`page` / `update`) | Title or description of a page or folder (not its contents) | its creator |
88
+ | Page | Publish (`page` / `publish`) | Publish the latest draft (policies go to review) | its creator |
89
+ | Page | Publish Many (`page` / `publishMany`) | Every unpublished page in a scope, 25 per call | its creator |
90
+ | Page | Share (`page` / `share`) | Turn on public sharing and return the link | its creator |
91
+ | Page | Add Tags (`page` / `addTags`) | Add tags to a page or folder (folder tags reach its pages) | editors |
92
+ | SOP | Save (`sop` / `save`) | Save SOP or policy HTML you wrote, as a new page or a new version | editors |
93
+ | SOP | Create Many (`sop` / `createMany`) | Up to 25 SOP or policy pages in one call | editors |
94
+ | SOP | Tailor (`sop` / `tailor`) | Fit existing pages to the business (find and replace rules, or rewritten HTML) | editors |
95
+ | SOP | Get Tailor Progress (`sop` / `getTailorProgress`) | Status of a background tailoring run | anyone |
96
+ | SOP | Cancel Tailor (`sop` / `cancelTailor`) | Stop a background tailoring run | editors |
97
+ | Category | Get Many (`category` / `getMany`) | Categories, and whether each has a business description | anyone |
98
+ | Category | Create (`category` / `create`) | A category, private to its creator until shared | editors |
99
+ | Department | Get Many (`department` / `getMany`) | Departments, optionally in one category | anyone |
100
+ | Department | Create (`department` / `create`) | A department in a category | editors |
101
+ | Department | Update (`department` / `update`) | Name, description, cover | editors |
102
+ | Folder | Create (`folder` / `create`) | A folder in a department | editors |
103
+ | Image | Upload (`image` / `upload`) | PNG or JPEG (up to 8 MB) from binary data; returns an upload id | editors |
104
+ | Image | Add to Page (`image` / `addToPage`) | Put an image at the end of a page | the page's creator |
105
+ | Image | Set Department Cover (`image` / `setDepartmentCover`) | Use an image as a department's cover | editors |
106
+ | Course | Get Many, Get (`course` / `getMany`, `get`) | Courses and their lessons | anyone who can see them |
107
+ | Course | Create (`course` / `create`) | A **published** course from a category, department, folder or chosen pages | owners, admins |
108
+ | Quiz | Get Many, Get (`quiz` / `getMany`, `get`) | Quizzes and each member's results | owners, admins |
109
+ | Quiz | Create, Delete (`quiz` / `create`, `delete`) | Add a quiz you wrote to a page, or remove it | owners, admins |
110
+ | Read Marker | Get Many, Get (`readMarker` / `getMany`, `get`) | Acknowledgements and who completed them | owners, admins |
111
+ | Read Marker | Create, Delete (`readMarker` / `create`, `delete`) | Add or remove an acknowledgement on a page | owners, admins |
112
+ | Team Member | Get Many (`teamMember` / `getMany`) | Members with name, email and role | owners, admins |
113
+ | Tool | Call (`tool` / `call`) | Any 1Brain tool by name (`toolName`) with JSON arguments (`toolArguments`) | depends on the tool |
114
+
115
+ Search options (`searchOptions`): **Include Content** (`includeContent`: adds
116
+ each hit's page text, one extra request per hit), **Limit to Department**
117
+ (`department`), **Limit to Folder** (`folder`), and Status and Type filters on
118
+ the results. Results carry `id`, `title`, `type`, `status` and `url`; every
119
+ answer built from a page ends with its `url`. Search ids come back as strings;
120
+ Page Get takes a number (`={{ Number($json.id) }}`).
121
+
122
+ ## 3. Behaviour to design around
123
+
124
+ - **Drafts by default.** Every write that takes a status defaults to Draft in
125
+ the node (1Brain itself defaults to Published). Publish with Page > Publish,
126
+ only when the person asked.
127
+ - **The account is always explicit.** The node sends it on every call;
128
+ otherwise 1Brain uses (and changes) the connection's active account.
129
+ - **Permissions are 1Brain's.** A run sees and changes only what the connected
130
+ person can. Update, Publish, Share and Add to Page need the page's creator.
131
+ - **60 requests a minute per person**, shared by every workflow and agent on
132
+ that person's credential. The node retries a 429 itself. Prefer one Get Many
133
+ over many Gets; turn Include Content on only for a few hits.
134
+ - **Errors are plain.** Access switched off by the 1Brain account's owner
135
+ arrives as an error, not a sign-in problem: never "fix" it by reconnecting.
136
+ 401 means the person connects again in the hub. A login page means the
137
+ credential is not signed in. An old operation says "This 1Brain operation was
138
+ retired. Open the node and pick a new one."
139
+ - **1Brain never writes content.** You (or an LLM step working from the owner's
140
+ material) write the HTML. A category with no business description makes the
141
+ SOP operations stop and ask for one (`business_description`); SOP Save asks
142
+ which template to follow (`sop_template_source`: `1brain` or `user`). Pass
143
+ the owner's own words, never invented ones.
144
+ - **Tags cannot be read** and **search cannot filter by tag**. Use Limit to
145
+ Department or Limit to Folder.
146
+ - **Search ranking is loose and returns titles only.** For answers, search,
147
+ then read the top pages with Page Get.
148
+
149
+ ## 4. Patterns
150
+
151
+ ### An agent that answers from the business's procedures
152
+
153
+ Chat Trigger (or a channel) → AI Agent with two `CUSTOM.oneBrainTool` tools,
154
+ both on the supervisor's credential and the same `businessId`:
155
+
156
+ 1. **Search procedures**: Page > Search, `query` from `$fromAI`, `limit` 5.
157
+ 2. **Read a procedure**: Page > Get, `pageId` from
158
+ `$fromAI('pageId', 'The id of a page from Search procedures', 'number')`.
159
+
160
+ System message (adapt, keep the rules): "Answer only from the business's
161
+ procedures in 1Brain. Search first, then read the most relevant pages before
162
+ answering. If nothing relevant is found, say you couldn't find a procedure for
163
+ it and suggest who to ask; never guess. End every answer with the links (url)
164
+ of the pages you used." Add the hat's `instructionLine` from
165
+ `awesomate_business_map` when the agent helps a hat. Read-only by design: give
166
+ it no write operations unless the owner asks for that, and then make writes
167
+ Draft. Test with a question the procedures answer and one they do not.
168
+
169
+ ### A form or email turned into an SOP draft
170
+
171
+ Trigger (form, email, Slack message) → an LLM step that turns the person's
172
+ notes into SOP HTML **using only what they wrote**, marking gaps as questions →
173
+ 1Brain **SOP > Save** (scope department, `status` draft; or Page > Create with
174
+ `status: draft`) → tell the owner, with the page link, that a draft is waiting
175
+ for review. Run Category > Get Many once while designing: a category with no
176
+ business description needs one from the owner before SOP Save works.
177
+
178
+ ### A weekly report of unpublished drafts
179
+
180
+ Schedule Trigger → Department > Get Many → Page > Get Many per department
181
+ (scope department: one request each, not one per page) → keep `status: draft`
182
+ → one email or message listing each draft's title and link, grouped by
183
+ department. See [recurring-reports.md](recurring-reports.md) for the delivery
184
+ side. Ten departments is ten requests: well inside 60 a minute.
185
+
186
+ ### Anything not in the operation list
187
+
188
+ Tool > Call with the 1Brain tool's name (the dropdown lists them live) and its
189
+ arguments as JSON. Use it sparingly and keep writes as drafts.
190
+
191
+ ## 5. Old 1Brain workflows (version 1)
192
+
193
+ Some accounts have workflows from the earlier, pre-Awesomate 1Brain node (one
194
+ action, "Search 1Brain"). They open as version 1, Page > Search, with the
195
+ account (`businessId`) and `query` kept and page text added by default, as
196
+ before. To bring one back to life:
197
+
198
+ 1. Reconnect: pick the person's hub-made "1Brain - <person>" credential. Old
199
+ credentials cannot reach 1Brain's new connection.
200
+ 2. **Remove the tags.** Search can no longer filter by tag, so a version 1 node
201
+ with tags stops with a clear message rather than searching the whole
202
+ account. Use Limit to Department or Limit to Folder instead.
203
+ 3. Check the account: an old `businessId` may be a production 1Brain account
204
+ that the development server (today's only connection point) does not have.
205
+ 4. Any other old operation says "This 1Brain operation was retired": pick a new
206
+ one in the node.
207
+
208
+ Change a live workflow through the upgrade loop
209
+ ([upgrade-loop.md](upgrade-loop.md)), never in place.
210
+
211
+ ## 6. The no-code route: MCP Client Tool
212
+
213
+ For an AI Agent that needs every 1Brain action with no node setup: n8n's own
214
+ MCP Client Tool (`@n8n/n8n-nodes-langchain.mcpClientTool`; resolve its
215
+ parameters with `awesomate_n8n_node_docs`) with the **MCP OAuth2** credential
216
+ (`mcpOAuth2Api`), server address `https://dev.1brain.io/mcp`. The person
217
+ creates and signs in to the credential on their n8n (it is an OAuth sign-in,
218
+ so it is always finished in the browser). n8n 2.41.4's own source supports
219
+ it (dynamic client registration, PKCE, rotating refresh tokens), but it has
220
+ **not been run end to end yet**: tell the person it is untested, and test it
221
+ with them before anyone relies on it. Each reconnect
222
+ registers a new 1Brain connection, and the agent can use every tool the person
223
+ can, writes included, so its system message must carry the rules above
224
+ (drafts, confirm, never invent, links).
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: awesomate-onebrain
3
+ description: Use the business's 1Brain (Business Blueprint's home for its systems) from Claude Code, its automations and its AI agents. Use when the user mentions 1Brain, Business Blueprint, "our systems", SOPs, policies, procedures, "what's our procedure for", "how do we do X here", "write this up as an SOP", "connect 1Brain", the 1Brain node in n8n, an agent that answers from our procedures, training courses, quizzes, acknowledgements or read markers. Covers connecting 1Brain in the hub, the three ways to use it and when to pick each, and the safety rules. Companion to awesomate-n8n (workflows and agents with the 1Brain node) and awesomate-hosting (the business map). Same connection, same PAT.
4
+ ---
5
+
6
+ # 1Brain: the business's systems, from Claude Code
7
+
8
+ 1Brain (from Business Blueprint) is where a business keeps its systems: its
9
+ policies, procedures (SOPs), training courses, quizzes and acknowledgements.
10
+ Most people asking about it are business owners and their teams, not
11
+ developers. Use plain words: "your procedures in 1Brain", "your systems",
12
+ never "MCP", "OAuth" or "JSON-RPC" unless they use them first.
13
+
14
+ **Routing rule:** what 1Brain holds comes from 1Brain itself (its own
15
+ connector, or the 1Brain node in a workflow). What Awesomate set up (the
16
+ connection, the credential, the feature) comes from the Awesomate tools.
17
+ Never answer "what's our procedure for X" from memory or general knowledge.
18
+
19
+ ## How 1Brain is organised
20
+
21
+ | 1Brain word | What it is | Watch out for |
22
+ |---|---|---|
23
+ | Account (1Brain's code calls it organization) | One business's 1Brain | A person can belong to several. Always name the one you mean |
24
+ | Category (some accounts call it "Organization") | A top-level group of departments | Two categories can share a name: pick by id |
25
+ | Department | A part of the business, such as Marketing or Finance | Matches a division on the business map |
26
+ | Folder | A small topical group of pages in a department | Titles are unique within a department |
27
+ | Page (System, SOP, policy) | One procedure or policy | Has a status: draft, published or for review |
28
+
29
+ ## 0. First (every session)
30
+
31
+ 1. `awesomate_whoami`: the account this folder is connected to. Wrong slug:
32
+ stop and fix the connection first.
33
+ 2. `awesomate_get_context` and read `features.onebrain`:
34
+ - `available: false`: say its `message` in one line and stop. Never offer
35
+ 1Brain work, never explain how to switch it on, never retry.
36
+ - No `features` block, or no `onebrain` entry (an older hub): carry on, never
37
+ read that as unavailable.
38
+ 3. Work out which of the three ways below fits the ask before doing anything.
39
+
40
+ ## 1. Connecting 1Brain (in the hub, per person)
41
+
42
+ Each person connects their **own** 1Brain login. Send them to the hub:
43
+ **Settings, Integrations, 1Brain** (`https://hub.awesomate.ai/settings?tab=integrations`),
44
+ then **Connect 1Brain**.
45
+
46
+ - They sign in on 1Brain's own page and tick the 1Brain accounts to allow.
47
+ Awesomate never sees their 1Brain password.
48
+ - The owner and team members with full access can connect. Each connection is
49
+ that person's: it sees exactly what they can see in 1Brain, no more.
50
+ - The hub then puts a credential named **"1Brain - <their name>"** in the
51
+ account's automations (n8n) for the 1Brain node, and keeps it current.
52
+ Nobody pastes a token. Connecting also switches on "Build and change
53
+ automations from Claude Code" (Settings, Privacy), because that is what lets
54
+ the hub place the credential.
55
+ - "Your automations don't have the 1Brain node yet": the connection worked,
56
+ but their n8n is on an older version. The credential arrives when the node
57
+ does. Nothing for them to do.
58
+ - To allow another 1Brain account later: **Connect again** and tick it.
59
+ - **Disconnect** forgets the sign-in and removes the credential (automations
60
+ using it stop reading 1Brain). 1Brain has no way for Awesomate to withdraw
61
+ its permission, so the hub links each 1Brain account's own MCP settings page
62
+ where they remove it.
63
+
64
+ You cannot connect 1Brain for them, and no Awesomate tool reads or changes the
65
+ connection. Never ask for a 1Brain token or password in chat.
66
+
67
+ **Today 1Brain's connection point runs only on 1Brain's development server
68
+ (`dev.1brain.io`).** `1brain.io` and `staging.1brain.io` do not offer it yet.
69
+ Until they do, a connection reaches 1Brain's development server, not the
70
+ 1Brain the team signs in to every day. Say so if their pages "are missing".
71
+
72
+ ## 2. Three ways to use 1Brain, and which to pick
73
+
74
+ | They want | Use |
75
+ |---|---|
76
+ | Claude (Claude Code, Claude.ai) to look things up or write in 1Brain, in a chat | **1Brain's own Claude connector** (2a) |
77
+ | A workflow step that reads or writes 1Brain: a scheduled report, a form or email turned into an SOP draft, a sync | **The 1Brain node** with the hub-made "1Brain - <person>" credential (2b) |
78
+ | An AI agent in their automations that answers from their procedures | **The 1Brain node as an agent tool** (`CUSTOM.oneBrainTool`: Page Search, then Page Get), on the credential of the person the agent answers to (2b) |
79
+ | An AI agent that needs every 1Brain action, with no setup in the node | **MCP Client Tool** with n8n's own MCP OAuth2 credential (2c) |
80
+ | Something done as the business rather than as a person | **Not possible yet.** Every 1Brain connection is a person |
81
+
82
+ ### 2a. Claude working directly in 1Brain
83
+
84
+ 1Brain has its own connector for Claude at `https://dev.1brain.io/mcp`
85
+ (the development server, see above). The person adds it themselves:
86
+
87
+ - Claude Code: `claude mcp add --transport http onebrain https://dev.1brain.io/mcp`,
88
+ then run `/mcp` in Claude Code and sign in to 1Brain.
89
+ - Claude.ai: Settings, Connectors, Add custom connector, with that address.
90
+
91
+ It signs in as them and asks which 1Brain accounts to allow. The Awesomate MCP
92
+ has no 1Brain tool of its own: if 1Brain's tools are not in this session,
93
+ never pretend to search 1Brain. Offer to set up the connector, or build a
94
+ workflow that does it.
95
+
96
+ When 1Brain's tools are in the session: confirm which account first (1Brain's
97
+ own instructions ask this too), pass it on every call, search, then read the
98
+ page before answering. 1Brain search returns titles only, and ranks loosely,
99
+ so read the top few pages, not just the first.
100
+
101
+ ### 2b. Workflows and agents: the 1Brain node
102
+
103
+ The node is in the account's n8n as `CUSTOM.oneBrain` (and `CUSTOM.oneBrainTool`
104
+ for AI agents), on the hub-made credential. Load the **awesomate-n8n** skill and
105
+ read its [references/onebrain.md](../awesomate-n8n/references/onebrain.md) for
106
+ the operations, the parameters and tested patterns. The node is only on some
107
+ instances so far: check before designing around it (that reference says how).
108
+
109
+ ### 2c. The no-code agent route
110
+
111
+ n8n's own **MCP Client Tool** on an AI Agent, with an **MCP OAuth2** credential
112
+ whose server address is `https://dev.1brain.io/mcp`. The person signs in from
113
+ their n8n. It gives the agent every 1Brain tool with no setup, but each
114
+ reconnect registers a new 1Brain connection, and the agent can do anything the
115
+ person can, so give it strict instructions. n8n's own code supports this
116
+ route, but it has not been run end to end yet: say it is untested and test it
117
+ with them before anyone relies on it. Prefer 2b when the agent only needs to
118
+ read procedures.
119
+
120
+ ## 3. Rules (every route)
121
+
122
+ 1. **Drafts by default.** Anything written to 1Brain goes in as a draft (the
123
+ node defaults to Draft, although 1Brain itself defaults to Published).
124
+ Publishing is a separate, deliberate step the person asks for.
125
+ 2. **Name the account every time.** A person can belong to several 1Brain
126
+ accounts. Ask which one if it is not obvious, then use it on every call.
127
+ 3. **Write only when asked.** Reading is fine whenever it helps. Creating,
128
+ changing, publishing, sharing, tagging or tailoring pages happens only when
129
+ the person asks for it.
130
+ 4. **Confirm before writing more than one page.** Say how many pages, which
131
+ department, and draft or published, and wait for a yes. Bulk tools (Create
132
+ Many, Publish Many, Tailor) also ask 1Brain's own confirm step: never tick
133
+ it for them.
134
+ 5. **Never invent SOP content.** 1Brain never writes content: what goes in a
135
+ page comes from the owner's own words, documents or answers. Where a step is
136
+ missing, leave a clear gap and ask. Never fill it with a plausible guess.
137
+ 6. **End every answer built from 1Brain with the page links** (each result's
138
+ `url`), so the person can check the source.
139
+ 7. **Nothing found is an answer.** "I couldn't find a procedure for that in
140
+ your 1Brain" beats a made-up one. Offer to draft one from their words.
141
+ 8. **60 requests a minute per person,** shared by every workflow and agent on
142
+ that person's connection. Prefer one list over many single reads; never
143
+ loop page by page over a whole account.
144
+ 9. **Permissions are the person's own.** A connection sees and changes only
145
+ what that person can in 1Brain. Some actions (update, publish, share, add an
146
+ image to a page) only work on pages that person created.
147
+ 10. **An agent can never see more than the person it answers to.** An agent
148
+ on its supervisor's credential is capped at that supervisor's access.
149
+ Never put an agent on a more senior person's credential to "give it more".
150
+
151
+ ## 4. Writing an SOP or policy
152
+
153
+ 1. Gather the owner's own material: their notes, a recording transcript, an
154
+ existing document, or answers to a few short questions.
155
+ 2. Write the page as HTML in their voice (`awesomate_business` for the
156
+ business's name and voice). Mark anything you could not confirm.
157
+ 3. Show it to them. Save it as a **draft** in the department they choose.
158
+ 4. 1Brain may stop and ask for two things first: a **business description**
159
+ for the category (what the business does, who its customers are, where it
160
+ works; take it from the owner, never invent it) and **which template to
161
+ follow** (1Brain's SOP template or their own).
162
+ 5. Publishing is a separate yes. Policies go to review rather than straight
163
+ to published.
164
+
165
+ ## 5. Training: courses, quizzes, acknowledgements
166
+
167
+ Owners and admins can list and read courses, quizzes and who passed them,
168
+ and acknowledgements (read markers: "I have read and understood this page")
169
+ and who completed them; members can read courses. Creating a course
170
+ publishes it, so confirm first. A quiz or acknowledgement is added to one
171
+ page; confirm by name before deleting one.
172
+
173
+ ## 6. Known gaps (say so plainly)
174
+
175
+ - **Tags cannot be read.** 1Brain returns pages without their tags, and has no
176
+ way to list them. Tags can be added, not read back or removed.
177
+ - **Search cannot filter by tag** (or by department or folder). In a workflow,
178
+ use the node's Limit to Department or Limit to Folder instead.
179
+ - So a hat's procedures linked by its 1Brain tag on the business map
180
+ (`job:<slug>`, from `awesomate_business_map`) cannot be fetched by tag yet:
181
+ find them by department, folder or search.
182
+ - No deleting or moving pages, folders, departments or categories through any
183
+ route. That is done in 1Brain itself.
184
+ - Nothing can run as the business itself: every connection is a person.
185
+
186
+ ## 7. When something goes wrong
187
+
188
+ | What they see | What it means | What to do |
189
+ |---|---|---|
190
+ | "1Brain access is switched off for you" | The 1Brain account's owner turned off Claude and automation access for them (or for the whole account) | Only that owner can turn it back on, in 1Brain's settings. Never reconnect to "fix" it |
191
+ | "Sign in again" / 401 | The connection has lapsed | Connect again in Settings, Integrations, 1Brain |
192
+ | A login page instead of data | The credential is not signed in | The same: connect again |
193
+ | "This 1Brain operation was retired" | An old (pre-Awesomate) 1Brain step | Open the node and pick a new operation (awesomate-n8n onebrain.md, old workflows) |
194
+ | "Your automations don't have the 1Brain node yet" | Their n8n is on an older version | Nothing to do; it arrives with the next update |
195
+ | Too many requests | The 60 a minute is used up across their workflows and agents | Wait a minute; spread the work out |
196
+ | Pages they expect are missing | Not shared with them in 1Brain, the wrong account, or the development-server note above | Check the account, then their access in 1Brain |