@assemblyline-agents/grata 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,86 @@
1
+ # @assemblyline-agents/grata
2
+
3
+ Official Assembly Line connection plugin for Grata's hosted MCP server.
4
+
5
+ The connection gives agents access to Grata private-market intelligence for
6
+ company discovery, ownership, funding, transactions, buyers, executive
7
+ contacts, and related research. It uses a per-user Grata seat through OAuth
8
+ 2.0, PKCE, and refreshable grants.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install @assemblyline-agents/grata
14
+ ```
15
+
16
+ ## Configure OAuth
17
+
18
+ Register an OAuth client with the `/register` endpoint in the Grata region the
19
+ agent will use. Register the Assembly Line callback URL, normally:
20
+
21
+ ```text
22
+ https://your-agent.example/assembly-line/connections/callback
23
+ ```
24
+
25
+ Request `client_secret_post`, which matches Assembly Line's token exchange:
26
+
27
+ ```sh
28
+ curl https://mcp.grata.com/register \
29
+ --header 'content-type: application/json' \
30
+ --data '{
31
+ "client_name": "Assembly Line",
32
+ "redirect_uris": ["https://your-agent.example/assembly-line/connections/callback"],
33
+ "grant_types": ["authorization_code", "refresh_token"],
34
+ "response_types": ["code"],
35
+ "token_endpoint_auth_method": "client_secret_post"
36
+ }'
37
+ ```
38
+
39
+ Use `https://eu-mcp.grata.com/register` instead for the EU endpoint. Store the
40
+ returned client id and secret without putting them in source control.
41
+
42
+ Set the returned credentials on the runtime host:
43
+
44
+ ```sh
45
+ GRATA_MCP_CLIENT_ID=...
46
+ GRATA_MCP_CLIENT_SECRET=...
47
+ ```
48
+
49
+ The plugin defaults to the US endpoint, `https://mcp.grata.com`. European
50
+ users must select Grata's EU endpoint:
51
+
52
+ ```sh
53
+ GRATA_MCP_URL=https://eu-mcp.grata.com/
54
+ ```
55
+
56
+ Set `GRATA_MCP_REDIRECT_URI` only when the registered callback differs from
57
+ the runtime's standard connection callback. Each user authorizes their own
58
+ Grata account; credentials and refresh tokens stay in Assembly Line's
59
+ host-side connection grant store.
60
+
61
+ See [Grata's MCP setup guide](https://help.grata.com/en/articles/15279081-connecting-to-the-grata-mcp-server)
62
+ for the current regional endpoints and seat requirements.
63
+
64
+ ## Usage
65
+
66
+ ```ts
67
+ import { defineGrataConnection } from "@assemblyline-agents/grata";
68
+
69
+ export default defineGrataConnection();
70
+ ```
71
+
72
+ The plugin classifies reviewed search and retrieval tools as reads and
73
+ write-like tools, including exports, as writes. Reviewed tools are enabled by
74
+ default; developers can select `approval-required`, `read-only`, `autonomous`,
75
+ or a custom access policy. Unclassified upstream tools remain unavailable.
76
+
77
+ ## Part of Assembly Line
78
+
79
+ This package is part of [Assembly Line](https://github.com/jasonbadeaux/assembly-line),
80
+ a vendor-neutral, filesystem-first framework for durable AI agents. See the
81
+ developer documentation in [docs/developers/](https://github.com/jasonbadeaux/assembly-line/tree/main/docs/developers)
82
+ for setup, agent authoring, and deployment guides.
83
+
84
+ ## License
85
+
86
+ MIT
@@ -0,0 +1,13 @@
1
+ import { type ConnectionAuthDefinition, type McpPluginConnectionOptions } from "@assemblyline-agents/core";
2
+ export interface GrataConnectionOptions extends Omit<McpPluginConnectionOptions, "auth"> {
3
+ auth?: ConnectionAuthDefinition | false;
4
+ /** OAuth client id returned by the selected Grata MCP region's registration endpoint. */
5
+ clientId?: string;
6
+ /** OAuth client secret returned with the client id. */
7
+ clientSecret?: string;
8
+ /** Override the runtime's normal /assembly-line/connections/callback URI. */
9
+ redirectUri?: string;
10
+ }
11
+ export declare function defineGrataConnection(options?: GrataConnectionOptions): import("@assemblyline-agents/core").McpHttpClientConnectionDefinition;
12
+ export declare const assemblyLinePlugin: import("@assemblyline-agents/core").PluginModule;
13
+ //# 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,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,yEAazE;AAED,eAAO,MAAM,kBAAkB,kDAA0C,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ import { connectionPluginMetadata, defineMcpPluginConnection, defineOAuthAuthorization, definePlugin } from "@assemblyline-agents/core";
2
+ const PLUGIN = connectionPluginMetadata("grata");
3
+ export function defineGrataConnection(options = {}) {
4
+ const { auth, clientId, clientSecret, redirectUri, ...connection } = options;
5
+ return defineMcpPluginConnection(PLUGIN, {
6
+ ...connection,
7
+ auth: auth === false
8
+ ? false
9
+ : auth ?? grataOAuth({
10
+ ...(clientId ? { clientId } : {}),
11
+ ...(clientSecret ? { clientSecret } : {}),
12
+ ...(redirectUri ? { redirectUri } : {}),
13
+ ...(connection.url ? { mcpUrl: connection.url } : {})
14
+ })
15
+ });
16
+ }
17
+ export const assemblyLinePlugin = definePlugin({ connections: [PLUGIN] });
18
+ function grataOAuth(input) {
19
+ return ({ env }) => {
20
+ const clientId = input.clientId?.trim() || env.GRATA_MCP_CLIENT_ID?.trim();
21
+ const clientSecret = input.clientSecret?.trim() || env.GRATA_MCP_CLIENT_SECRET?.trim();
22
+ if (!clientId || !clientSecret) {
23
+ throw new Error("Grata OAuth requires GRATA_MCP_CLIENT_ID and GRATA_MCP_CLIENT_SECRET, or clientId and clientSecret options.");
24
+ }
25
+ const redirectUri = input.redirectUri?.trim() || env.GRATA_MCP_REDIRECT_URI?.trim();
26
+ const resource = new URL(input.mcpUrl?.trim() || env.GRATA_MCP_URL?.trim() || PLUGIN.defaultUrl).toString();
27
+ return defineOAuthAuthorization({
28
+ displayName: "Grata",
29
+ authorizeUrl: new URL("/authorize", resource).toString(),
30
+ tokenUrl: new URL("/token", resource).toString(),
31
+ clientId,
32
+ clientSecret,
33
+ scopes: ["openid", "profile", "email", "offline_access"],
34
+ ...(redirectUri ? { redirectUri } : {}),
35
+ authorizationParams: { resource },
36
+ tokenParams: { resource },
37
+ pkce: true
38
+ });
39
+ };
40
+ }
41
+ //# 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,wBAA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uB,EAAE,IAAI,EAAE,CAAC;QACvF,IAAI,CAAC,QAAQ,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,6GAA6G,CAAC,CAAC;QACjI,CAAC;QACD,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC;QACpF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,MAAM,CAAC,UAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC7G,OAAO,wBAAwB,CAAC;YAC9B,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,IAAI,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE;YACxD,QAAQ,EAAE,IAAI,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE;YAChD,QAAQ;YACR,YAAY;YACZ,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC;YACxD,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;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,48 @@
1
+ {
2
+ "name": "@assemblyline-agents/grata",
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 Grata hosted MCP connection plugin.",
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/grata"
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
+ "grata",
37
+ "private-markets",
38
+ "mcp",
39
+ "plugin"
40
+ ],
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "scripts": {
45
+ "build": "tsc -p tsconfig.json",
46
+ "check": "tsc -p tsconfig.json --noEmit"
47
+ }
48
+ }