@assemblyline-agents/attio 3.0.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 Assembly Line contributors
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
+ # @assemblyline-agents/attio
2
+
3
+ Official Assembly Line connection plugin for Attio's hosted Streamable HTTP MCP
4
+ server at `https://mcp.attio.com/mcp`. It exposes Attio's reviewed CRM,
5
+ activity-intelligence, and reporting tools through user-authorized OAuth.
6
+
7
+ ## Setup
8
+
9
+ Attio uses OAuth Authorization Code + PKCE and supports dynamic client
10
+ registration. Register one public client for the Assembly Line deployment:
11
+
12
+ ```sh
13
+ curl -X POST https://app.attio.com/oauth/register \
14
+ -H 'content-type: application/json' \
15
+ -d '{
16
+ "client_name": "Assembly Line",
17
+ "redirect_uris": ["https://YOUR-AGENT-HOST/assembly-line/connections/callback"],
18
+ "grant_types": ["authorization_code", "refresh_token"],
19
+ "response_types": ["code"],
20
+ "token_endpoint_auth_method": "none"
21
+ }'
22
+ ```
23
+
24
+ Store the returned `client_id` as `ATTIO_MCP_CLIENT_ID`. Set
25
+ `ATTIO_MCP_REDIRECT_URI` only when the registered callback differs from
26
+ Assembly Line's normal connection callback URL. `ATTIO_MCP_URL` optionally
27
+ overrides the hosted endpoint.
28
+
29
+ Add the connection to an agent:
30
+
31
+ ```sh
32
+ assembly-line add attio agent
33
+ ```
34
+
35
+ The default connection is user-scoped: each person authorizes their own Attio
36
+ account, and Attio enforces that person's workspace permissions.
37
+
38
+ ```ts
39
+ import { defineAttioConnection } from "@assemblyline-agents/attio";
40
+
41
+ export default defineAttioConnection({ access: "approval-required" });
42
+ ```
43
+
44
+ When an agent should operate as one company service identity, authorize a
45
+ dedicated Attio member once through the protected operator connection flow and
46
+ store the grant at workspace scope:
47
+
48
+ ```ts
49
+ export default defineAttioConnection({
50
+ subject: "workspace",
51
+ access: "approval-required"
52
+ });
53
+ ```
54
+
55
+ Do not let an arbitrary end user establish that shared grant. Preauthorize the
56
+ dedicated account before opening the agent to users:
57
+
58
+ ```text
59
+ GET /assembly-line/connections/authorize?connection=attio
60
+ ```
61
+
62
+ That route requires the runtime's `agent-control` authentication. The returned
63
+ URL opens Attio's consent screen; the callback stores the access and refresh
64
+ tokens in Assembly Line's host-side grant store. User-scoped connections can
65
+ also authorize lazily: the invoking run parks, sends the consent link to the
66
+ user, and resumes after the callback.
67
+
68
+ The reviewed MCP surface includes records and objects, lists and list entries,
69
+ comments, notes, tasks, meetings, call recordings and transcripts, email
70
+ search and content, workspace members and teams, basic reports, and read-only
71
+ Particle SQL where the Attio plan supports it. It does not expose every REST
72
+ administration operation, webhook management, file upload, or arbitrary schema
73
+ mutation.
74
+
75
+ ## License
76
+
77
+ MIT
@@ -0,0 +1,11 @@
1
+ import { type ConnectionAuthDefinition, type McpPluginConnectionOptions } from "@assemblyline-agents/core";
2
+ export interface AttioConnectionOptions extends Omit<McpPluginConnectionOptions, "auth"> {
3
+ auth?: ConnectionAuthDefinition | false;
4
+ /** Stable public OAuth client id registered with Attio. */
5
+ clientId?: string;
6
+ /** Override the runtime's normal /assembly-line/connections/callback URI. */
7
+ redirectUri?: string;
8
+ }
9
+ export declare function defineAttioConnection(options?: AttioConnectionOptions): import("@assemblyline-agents/core").McpHttpClientConnectionDefinition;
10
+ export declare const assemblyLinePlugin: import("@assemblyline-agents/core").PluginModule;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,0BAA0B,EAAE,MAAM,CAAC;IACtF,IAAI,CAAC,EAAE,wBAAwB,GAAG,KAAK,CAAC;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,yEAYzE;AAED,eAAO,MAAM,kBAAkB,kDAA0C,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,38 @@
1
+ import { connectionPluginMetadata, defineMcpPluginConnection, defineOAuthAuthorization, definePlugin } from "@assemblyline-agents/core";
2
+ const PLUGIN = connectionPluginMetadata("attio");
3
+ export function defineAttioConnection(options = {}) {
4
+ const { auth, clientId, redirectUri, ...connection } = options;
5
+ return defineMcpPluginConnection(PLUGIN, {
6
+ ...connection,
7
+ auth: auth === false
8
+ ? false
9
+ : auth ?? attioOAuth({
10
+ ...(clientId ? { clientId } : {}),
11
+ ...(redirectUri ? { redirectUri } : {}),
12
+ ...(connection.url ? { mcpUrl: connection.url } : {})
13
+ })
14
+ });
15
+ }
16
+ export const assemblyLinePlugin = definePlugin({ connections: [PLUGIN] });
17
+ function attioOAuth(input) {
18
+ return ({ env }) => {
19
+ const clientId = input.clientId?.trim() || env.ATTIO_MCP_CLIENT_ID?.trim();
20
+ if (!clientId) {
21
+ throw new Error("Attio OAuth requires ATTIO_MCP_CLIENT_ID or clientId.");
22
+ }
23
+ const redirectUri = input.redirectUri?.trim() || env.ATTIO_MCP_REDIRECT_URI?.trim();
24
+ const resource = input.mcpUrl?.trim() || env.ATTIO_MCP_URL?.trim() || PLUGIN.defaultUrl;
25
+ return defineOAuthAuthorization({
26
+ displayName: "Attio",
27
+ authorizeUrl: "https://app.attio.com/oidc/authorize",
28
+ tokenUrl: "https://app.attio.com/oidc/token",
29
+ clientId,
30
+ scopes: ["mcp", "offline_access", "openid"],
31
+ ...(redirectUri ? { redirectUri } : {}),
32
+ authorizationParams: { resource },
33
+ tokenParams: { resource },
34
+ pkce: true
35
+ });
36
+ };
37
+ }
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EAGb,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,GAAG,wBAAwB,CAAC,OAAO,CAAE,CAAC;AAUlD,MAAM,UAAU,qBAAqB,CAAC,UAAkC,EAAE;IACxE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC;IAC/D,OAAO,yBAAyB,CAAC,MAAM,EAAE;QACvC,GAAG,UAAU;QACb,IAAI,EAAE,IAAI,KAAK,KAAK;YAClB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,IAAI,UAAU,CAAC;gBACjB,GAAG,CAAC,QAAQ,CAAC,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;YACvC,mBAAmB,EAAE,EAAE,QAAQ,EAAE;YACjC,WAAW,EAAE,EAAE,QAAQ,EAAE;YACzB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@assemblyline-agents/attio",
3
+ "version": "3.0.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "default": "./dist/index.js"
9
+ }
10
+ },
11
+ "dependencies": {
12
+ "@assemblyline-agents/core": "3.0.0"
13
+ },
14
+ "description": "Official Assembly Line connection plugin for Attio's hosted MCP server.",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "engines": {
19
+ "node": ">=22.19.0"
20
+ },
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/jasonbadeaux/assembly-line.git",
25
+ "directory": "packages/attio"
26
+ },
27
+ "bugs": {
28
+ "url": "https://github.com/jasonbadeaux/assembly-line/issues"
29
+ },
30
+ "homepage": "https://github.com/jasonbadeaux/assembly-line#readme",
31
+ "author": "Assembly Line contributors",
32
+ "keywords": [
33
+ "assembly-line",
34
+ "ai",
35
+ "agents",
36
+ "attio",
37
+ "crm",
38
+ "mcp",
39
+ "oauth",
40
+ "connection",
41
+ "plugin"
42
+ ],
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json",
48
+ "check": "tsc -p tsconfig.json --noEmit"
49
+ }
50
+ }