@iflow-mcp/hmk-attio-mcp-server 0.0.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/LICENSE +28 -0
- package/README.md +91 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +306 -0
- package/dist/index.js.map +1 -0
- package/package.json +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, @hmk
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# attio-mcp-server
|
|
2
|
+
|
|
3
|
+
This is an MCP server for [Attio](https://attio.com/), the AI-native CRM. It allows mcp clients (like Claude) to connect to the Attio API.
|
|
4
|
+
|
|
5
|
+
#### Current Capabilities
|
|
6
|
+
|
|
7
|
+
- [x] reading company records
|
|
8
|
+
- [x] reading company notes
|
|
9
|
+
- [x] writing company notes
|
|
10
|
+
- [ ] other activities
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
You will need:
|
|
15
|
+
|
|
16
|
+
- `ATTIO_API_KEY`
|
|
17
|
+
|
|
18
|
+
This is expected to be a *bearer token* which means you can get one through the [API Explorer](https://developers.attio.com/reference/get_v2-objects) on the right hand side or configure OAuth and retrieve one throught the Attio API.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Claude Desktop Configuration
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"attio": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["attio-mcp-server"],
|
|
29
|
+
"env": {
|
|
30
|
+
"ATTIO_API_KEY": "YOUR_ATTIO_API_KEY"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
## Development
|
|
37
|
+
|
|
38
|
+
### Prerequisites
|
|
39
|
+
|
|
40
|
+
Before you begin, ensure you have the following installed:
|
|
41
|
+
|
|
42
|
+
- Node.js (recommended v22 or higher)
|
|
43
|
+
- npm
|
|
44
|
+
- git
|
|
45
|
+
- dotenv
|
|
46
|
+
|
|
47
|
+
### Setting up Development Environment
|
|
48
|
+
|
|
49
|
+
To set up the development environment, follow these steps:
|
|
50
|
+
|
|
51
|
+
1. Fork the repository
|
|
52
|
+
|
|
53
|
+
- Click the "Fork" button in the top-right corner of this repository
|
|
54
|
+
- This creates your own copy of the repository under your Github acocunt
|
|
55
|
+
|
|
56
|
+
1. Clone Your Fork:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
git clone https://github.com/YOUR_USERNAME/attio-mcp-server.git
|
|
60
|
+
cd attio-mcp-server
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
1. Add Upstream Remote
|
|
64
|
+
```sh
|
|
65
|
+
git remote add upstream https://github.com/hmk/attio-mcp-server.git
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
1. Copy the dotenv file
|
|
69
|
+
```sh
|
|
70
|
+
cp .env.template .env
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
1. Install dependencies:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npm install
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
1. Run watch to keep index.js updated:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
npm run build:watch
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
1. Start the model context protocol development server:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
dotenv npx @modelcontextprotocol/inspector node PATH_TO_YOUR_CLONED_REPO/dist/index.js
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
1. If the development server did not load the environment variable correctly, set the `ATTIO_API_KEY` on the left-hand side of the mcp inspector.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
import axios from "axios";
|
|
6
|
+
// Configure Axios instance with Attio API credentials from environment
|
|
7
|
+
const api = axios.create({
|
|
8
|
+
baseURL: "https://api.attio.com/v2",
|
|
9
|
+
headers: {
|
|
10
|
+
"Authorization": `Bearer ${process.env.ATTIO_API_KEY}`,
|
|
11
|
+
"Content-Type": "application/json",
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const server = new Server({
|
|
15
|
+
name: "attio-mcp-server",
|
|
16
|
+
version: "0.0.1",
|
|
17
|
+
}, {
|
|
18
|
+
capabilities: {
|
|
19
|
+
resources: {},
|
|
20
|
+
tools: {},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
// Helper function to create detailed error responses
|
|
24
|
+
function createErrorResult(error, url, method, responseData) {
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: "text",
|
|
29
|
+
text: `ERROR: ${error.message}\n\n` +
|
|
30
|
+
`=== Request Details ===\n` +
|
|
31
|
+
`- Method: ${method}\n` +
|
|
32
|
+
`- URL: ${url}\n\n` +
|
|
33
|
+
`=== Response Details ===\n` +
|
|
34
|
+
`- Status: ${responseData.status}\n` +
|
|
35
|
+
`- Headers: ${JSON.stringify(responseData.headers || {}, null, 2)}\n` +
|
|
36
|
+
`- Data: ${JSON.stringify(responseData.data || {}, null, 2)}\n`
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
isError: true,
|
|
40
|
+
error: {
|
|
41
|
+
code: responseData.status || 500,
|
|
42
|
+
message: error.message,
|
|
43
|
+
details: responseData.data?.error || "Unknown error occurred"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Example: List Resources Handler (List Companies)
|
|
48
|
+
server.setRequestHandler(ListResourcesRequestSchema, async (request) => {
|
|
49
|
+
const path = "/objects/companies/records/query";
|
|
50
|
+
try {
|
|
51
|
+
const response = await api.post(path, {
|
|
52
|
+
limit: 20,
|
|
53
|
+
sorts: [{ attribute: 'last_interaction', field: 'interacted_at', direction: 'desc' }]
|
|
54
|
+
});
|
|
55
|
+
const companies = response.data.data || [];
|
|
56
|
+
return {
|
|
57
|
+
resources: companies.map((company) => ({
|
|
58
|
+
uri: `attio://companies/${company.id?.record_id}`,
|
|
59
|
+
name: company.values?.name?.[0]?.value || "Unknown Company",
|
|
60
|
+
mimeType: "application/json",
|
|
61
|
+
})),
|
|
62
|
+
description: `Found ${companies.length} companies that you have interacted with most recently`,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return createErrorResult(error instanceof Error ? error : new Error("Unknown error"), path, "POST", error.response?.data || {});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
// Example: Read Resource Handler (Get Company Details)
|
|
70
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
71
|
+
const companyId = request.params.uri.replace("attio://companies/", "");
|
|
72
|
+
try {
|
|
73
|
+
const path = `/objects/companies/records/${companyId}`;
|
|
74
|
+
const response = await api.get(path);
|
|
75
|
+
return {
|
|
76
|
+
contents: [
|
|
77
|
+
{
|
|
78
|
+
uri: request.params.uri,
|
|
79
|
+
text: JSON.stringify(response.data, null, 2),
|
|
80
|
+
mimeType: "application/json",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
return createErrorResult(error instanceof Error ? error : new Error("Unknown error"), `/objects/companies/${companyId}`, "GET", error.response?.data || {});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// Example: List Tools Handler
|
|
90
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
91
|
+
return {
|
|
92
|
+
tools: [
|
|
93
|
+
{
|
|
94
|
+
name: "search-companies",
|
|
95
|
+
description: "Search for companies by name",
|
|
96
|
+
inputSchema: {
|
|
97
|
+
type: "object",
|
|
98
|
+
properties: {
|
|
99
|
+
query: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "Company name or keyword to search for",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
required: ["query"],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "read-company-details",
|
|
109
|
+
description: "Read details of a company",
|
|
110
|
+
inputSchema: {
|
|
111
|
+
type: "object",
|
|
112
|
+
properties: {
|
|
113
|
+
uri: {
|
|
114
|
+
type: "string",
|
|
115
|
+
description: "URI of the company to read",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
required: ["uri"],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "read-company-notes",
|
|
123
|
+
description: "Read notes for a company",
|
|
124
|
+
inputSchema: {
|
|
125
|
+
type: "object",
|
|
126
|
+
properties: {
|
|
127
|
+
uri: {
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "URI of the company to read notes for",
|
|
130
|
+
},
|
|
131
|
+
limit: {
|
|
132
|
+
type: "number",
|
|
133
|
+
description: "Maximum number of notes to fetch (optional, default 10)",
|
|
134
|
+
},
|
|
135
|
+
offset: {
|
|
136
|
+
type: "number",
|
|
137
|
+
description: "Number of notes to skip (optional, default 0)",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ["uri"],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "create-company-note",
|
|
145
|
+
description: "Add a new note to a company",
|
|
146
|
+
inputSchema: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
companyId: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "ID of the company to add the note to",
|
|
152
|
+
},
|
|
153
|
+
noteTitle: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "Title of the note",
|
|
156
|
+
},
|
|
157
|
+
noteText: {
|
|
158
|
+
type: "string",
|
|
159
|
+
description: "Text content of the note",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
required: ["companyId", "noteTitle", "noteText"],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
// Example: Call Tool Handler with enhanced error handling
|
|
169
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
170
|
+
const toolName = request.params.name;
|
|
171
|
+
try {
|
|
172
|
+
if (toolName === "search-companies") {
|
|
173
|
+
const query = request.params.arguments?.query;
|
|
174
|
+
const path = "/objects/companies/records/query";
|
|
175
|
+
try {
|
|
176
|
+
const response = await api.post(path, {
|
|
177
|
+
filter: {
|
|
178
|
+
name: { "$contains": query },
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
const results = response.data.data || [];
|
|
182
|
+
const companies = results.map((company) => {
|
|
183
|
+
const companyName = company.values?.name?.[0]?.value || "Unknown Company";
|
|
184
|
+
const companyId = company.id?.record_id || "Record ID not found";
|
|
185
|
+
return `${companyName}: attio://companies/${companyId}`;
|
|
186
|
+
})
|
|
187
|
+
.join("\n");
|
|
188
|
+
return {
|
|
189
|
+
content: [
|
|
190
|
+
{
|
|
191
|
+
type: "text",
|
|
192
|
+
text: `Found ${results.length} companies:\n${companies}`,
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
isError: false,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
return createErrorResult(error instanceof Error ? error : new Error("Unknown error"), path, "GET", error.response?.data || {});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
if (toolName === "read-company-details") {
|
|
203
|
+
const uri = request.params.arguments?.uri;
|
|
204
|
+
const companyId = uri.replace("attio://companies/", "");
|
|
205
|
+
const path = `/objects/companies/records/${companyId}`;
|
|
206
|
+
try {
|
|
207
|
+
const response = await api.get(path);
|
|
208
|
+
return {
|
|
209
|
+
content: [
|
|
210
|
+
{
|
|
211
|
+
type: "text",
|
|
212
|
+
text: `Company details for ${companyId}:\n${JSON.stringify(response.data, null, 2)}`,
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
isError: false,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
return createErrorResult(error instanceof Error ? error : new Error("Unknown error"), path, "GET", error.response?.data || {});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (toolName == 'read-company-notes') {
|
|
223
|
+
const uri = request.params.arguments?.uri;
|
|
224
|
+
const limit = request.params.arguments?.limit || 10;
|
|
225
|
+
const offset = request.params.arguments?.offset || 0;
|
|
226
|
+
const companyId = uri.replace("attio://companies/", "");
|
|
227
|
+
const path = `/notes?limit=${limit}&offset=${offset}&parent_object=companies&parent_record_id=${companyId}`;
|
|
228
|
+
try {
|
|
229
|
+
const response = await api.get(path);
|
|
230
|
+
const notes = response.data.data || [];
|
|
231
|
+
return {
|
|
232
|
+
content: [
|
|
233
|
+
{
|
|
234
|
+
type: "text",
|
|
235
|
+
text: `Found ${notes.length} notes for company ${companyId}:\n${notes.map((note) => JSON.stringify(note)).join("----------\n")}`,
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
isError: false,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
return createErrorResult(error instanceof Error ? error : new Error("Unknown error"), path, "GET", error.response?.data || {});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (toolName === "create-company-note") {
|
|
246
|
+
const companyId = request.params.arguments?.companyId;
|
|
247
|
+
const noteTitle = request.params.arguments?.noteTitle;
|
|
248
|
+
const noteText = request.params.arguments?.noteText;
|
|
249
|
+
const url = `notes`;
|
|
250
|
+
try {
|
|
251
|
+
const response = await api.post(url, {
|
|
252
|
+
data: {
|
|
253
|
+
format: "plaintext",
|
|
254
|
+
parent_object: "companies",
|
|
255
|
+
parent_record_id: companyId,
|
|
256
|
+
title: `[AI] ${noteTitle}`,
|
|
257
|
+
content: noteText
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
return {
|
|
261
|
+
content: [
|
|
262
|
+
{
|
|
263
|
+
type: "text",
|
|
264
|
+
text: `Note added to company ${companyId}: attio://notes/${response.data?.id?.note_id}`,
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
isError: false,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
return createErrorResult(error instanceof Error ? error : new Error("Unknown error"), url, "POST", error.response?.data || {});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
throw new Error("Tool not found");
|
|
275
|
+
}
|
|
276
|
+
catch (error) {
|
|
277
|
+
return {
|
|
278
|
+
content: [
|
|
279
|
+
{
|
|
280
|
+
type: "text",
|
|
281
|
+
text: `Error executing tool '${toolName}': ${error.message}`,
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
isError: true,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
// Main function
|
|
289
|
+
async function main() {
|
|
290
|
+
try {
|
|
291
|
+
if (!process.env.ATTIO_API_KEY) {
|
|
292
|
+
throw new Error("ATTIO_API_KEY environment variable not found");
|
|
293
|
+
}
|
|
294
|
+
const transport = new StdioServerTransport();
|
|
295
|
+
await server.connect(transport);
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
console.error("Error starting server:", error);
|
|
299
|
+
process.exit(1);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
main().catch(error => {
|
|
303
|
+
console.error("Unhandled error:", error);
|
|
304
|
+
process.exit(1);
|
|
305
|
+
});
|
|
306
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,uEAAuE;AACvE,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IACvB,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE;QACP,eAAe,EAAE,UAAU,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE;QACtD,cAAc,EAAE,kBAAkB;KACnC;CACF,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF,qDAAqD;AACrD,SAAS,iBAAiB,CAAC,KAAY,EAAE,GAAW,EAAE,MAAc,EAAE,YAAiB;IACrF,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,UAAU,KAAK,CAAC,OAAO,MAAM;oBACjC,2BAA2B;oBAC3B,aAAa,MAAM,IAAI;oBACvB,UAAU,GAAG,MAAM;oBACnB,4BAA4B;oBAC5B,aAAa,YAAY,CAAC,MAAM,IAAI;oBACpC,cAAc,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;oBACrE,WAAW,IAAI,CAAC,SAA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AE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "@iflow-mcp/hmk-attio-mcp-server", "version": "0.0.2", "description": "A Model Context Protocol server that connects Attio to LLMs", "main": "dist/index.js", "module": "dist/index.js", "type": "module", "access": "public", "bin": {"iflow-mcp_hmk-attio-mcp-server": "dist/index.js"}, "scripts": {"clean": "shx rm -rf dist", "build": "tsc", "postbuild": "shx chmod +x dist/*.js", "check": "tsc --noEmit", "build:watch": "tsc --watch"}, "files": ["dist"], "dependencies": {"@modelcontextprotocol/sdk": "^1.4.1", "axios": "^1.7.9", "shx": "^0.3.4", "typescript": "^5.7.2"}, "author": "@hmk", "license": "BSD-3-Clause", "devDependencies": {"@types/jest": "^29.5.14", "jest": "^29.7.0", "ts-jest": "^29.2.5", "tsx": "^4.19.2"}, "jest": {"preset": "ts-jest", "testEnvironment": "node", "testPathIgnorePatterns": ["<rootDir>/dist/"]}}
|