@attrove/mcp 0.1.3 → 0.1.5
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 +52 -1
- package/cjs/README.md +247 -0
- package/cjs/bin/attrove-mcp.js +69 -0
- package/cjs/package.json +69 -0
- package/cjs/src/__mocks__/version.js +17 -0
- package/cjs/src/__mocks__/version.js.map +1 -0
- package/cjs/src/constants.js +17 -0
- package/cjs/src/constants.js.map +1 -0
- package/cjs/src/index.js +43 -0
- package/cjs/src/index.js.map +1 -0
- package/cjs/src/server.js +247 -0
- package/cjs/src/server.js.map +1 -0
- package/cjs/src/tools/index.js +26 -0
- package/cjs/src/tools/index.js.map +1 -0
- package/cjs/src/tools/integrations.js +50 -0
- package/cjs/src/tools/integrations.js.map +1 -0
- package/cjs/src/tools/query.js +70 -0
- package/cjs/src/tools/query.js.map +1 -0
- package/cjs/src/tools/search.js +147 -0
- package/cjs/src/tools/search.js.map +1 -0
- package/cjs/src/version.js +142 -0
- package/cjs/src/version.js.map +1 -0
- package/esm/README.md +247 -0
- package/esm/bin/attrove-mcp.js +69 -0
- package/esm/package.json +69 -0
- package/esm/src/__mocks__/version.js +12 -0
- package/esm/src/__mocks__/version.js.map +1 -0
- package/esm/src/constants.js +14 -0
- package/esm/src/constants.js.map +1 -0
- package/esm/src/index.js +32 -0
- package/esm/src/index.js.map +1 -0
- package/esm/src/server.js +241 -0
- package/esm/src/server.js.map +1 -0
- package/esm/src/tools/index.js +19 -0
- package/esm/src/tools/index.js.map +1 -0
- package/esm/src/tools/integrations.js +46 -0
- package/esm/src/tools/integrations.js.map +1 -0
- package/esm/src/tools/query.js +66 -0
- package/esm/src/tools/query.js.map +1 -0
- package/esm/src/tools/search.js +143 -0
- package/esm/src/tools/search.js.map +1 -0
- package/esm/src/version.js +137 -0
- package/esm/src/version.js.map +1 -0
- package/package.json +13 -11
- package/types/src/__mocks__/version.d.ts +7 -0
- package/types/src/constants.d.ts +13 -0
- package/types/src/index.d.ts +32 -0
- package/types/src/server.d.ts +38 -0
- package/types/src/tools/index.d.ts +80 -0
- package/types/src/tools/integrations.d.ts +22 -0
- package/types/src/tools/query.d.ts +47 -0
- package/types/src/tools/search.d.ts +57 -0
- package/types/src/version.d.ts +23 -0
package/README.md
CHANGED
|
@@ -35,7 +35,9 @@ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/
|
|
|
35
35
|
|
|
36
36
|
### Cursor
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
1. Open Cursor Settings (`Cmd+,` on macOS, `Ctrl+,` on Windows/Linux)
|
|
39
|
+
2. Search for "MCP" or navigate to **Features > MCP Servers**
|
|
40
|
+
3. Click "Edit in settings.json" or add directly:
|
|
39
41
|
|
|
40
42
|
```json
|
|
41
43
|
{
|
|
@@ -52,12 +54,43 @@ Add to your Cursor MCP settings:
|
|
|
52
54
|
}
|
|
53
55
|
```
|
|
54
56
|
|
|
57
|
+
4. Restart Cursor for changes to take effect
|
|
58
|
+
5. In the chat, you can now ask questions about your connected integrations
|
|
59
|
+
|
|
60
|
+
### Claude Code (Terminal)
|
|
61
|
+
|
|
62
|
+
If using Claude Code in the terminal, the MCP server is configured via environment variables:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
export ATTROVE_API_KEY="sk_..."
|
|
66
|
+
export ATTROVE_USER_ID="user-uuid"
|
|
67
|
+
```
|
|
68
|
+
|
|
55
69
|
### Direct CLI Usage
|
|
56
70
|
|
|
57
71
|
```bash
|
|
58
72
|
ATTROVE_API_KEY=sk_... ATTROVE_USER_ID=user-uuid npx @attrove/mcp
|
|
59
73
|
```
|
|
60
74
|
|
|
75
|
+
## Common Use Cases
|
|
76
|
+
|
|
77
|
+
Once connected, you can ask your AI assistant natural language questions. Here are some examples:
|
|
78
|
+
|
|
79
|
+
**Meeting prep:**
|
|
80
|
+
> "What context do I need for my 2pm meeting with the marketing team?"
|
|
81
|
+
|
|
82
|
+
**Email follow-ups:**
|
|
83
|
+
> "Are there any emails from last week that I haven't responded to?"
|
|
84
|
+
|
|
85
|
+
**Project status:**
|
|
86
|
+
> "What's the latest on the Q4 roadmap discussions?"
|
|
87
|
+
|
|
88
|
+
**People search:**
|
|
89
|
+
> "What has John from Acme Corp been asking about recently?"
|
|
90
|
+
|
|
91
|
+
**Historical context:**
|
|
92
|
+
> "Find the thread where we discussed the pricing changes last month"
|
|
93
|
+
|
|
61
94
|
## Available Tools
|
|
62
95
|
|
|
63
96
|
### `attrove_query`
|
|
@@ -73,6 +106,8 @@ Ask questions about the user's communications and get AI-generated answers.
|
|
|
73
106
|
- "What did Sarah say about the Q4 budget?"
|
|
74
107
|
- "Summarize my meeting with the engineering team"
|
|
75
108
|
- "What are the action items from yesterday's standup?"
|
|
109
|
+
- "When is my next meeting with the product team?"
|
|
110
|
+
- "What context do I need before my 3pm call?"
|
|
76
111
|
|
|
77
112
|
### `attrove_search`
|
|
78
113
|
|
|
@@ -88,6 +123,8 @@ Search for specific messages or conversations.
|
|
|
88
123
|
**Example prompts:**
|
|
89
124
|
- "Find all emails about the product launch"
|
|
90
125
|
- "Show me conversations with the marketing team"
|
|
126
|
+
- "Search for messages mentioning the deadline extension"
|
|
127
|
+
- "Find discussions with acme.com from last month"
|
|
91
128
|
|
|
92
129
|
### `attrove_integrations`
|
|
93
130
|
|
|
@@ -191,6 +228,20 @@ The Attrove API has rate limits. If you're making many requests, you may need to
|
|
|
191
228
|
|
|
192
229
|
- Node.js 18.0.0 or later
|
|
193
230
|
|
|
231
|
+
## AI-Friendly Documentation
|
|
232
|
+
|
|
233
|
+
For AI assistants and code generation tools, Attrove provides machine-readable documentation:
|
|
234
|
+
|
|
235
|
+
- **llms.txt**: `https://attrove.com/llms.txt` - Condensed API reference for LLMs
|
|
236
|
+
- **Quickstart**: `https://github.com/attrove/quickstart` - Example code with CLAUDE.md context
|
|
237
|
+
|
|
238
|
+
## Links
|
|
239
|
+
|
|
240
|
+
- [Documentation](https://docs.attrove.com)
|
|
241
|
+
- [API Reference](https://docs.attrove.com/api)
|
|
242
|
+
- [TypeScript SDK](https://www.npmjs.com/package/@attrove/sdk)
|
|
243
|
+
- [Quickstart Examples](https://github.com/attrove/quickstart)
|
|
244
|
+
|
|
194
245
|
## License
|
|
195
246
|
|
|
196
247
|
MIT
|
package/cjs/README.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# @attrove/mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for Attrove. Enables AI assistants like Claude and Cursor to access your users' unified context from Gmail, Slack, Google Calendar, and more.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @attrove/mcp
|
|
9
|
+
# or
|
|
10
|
+
yarn add @attrove/mcp
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @attrove/mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Claude Desktop
|
|
18
|
+
|
|
19
|
+
Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"attrove": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["@attrove/mcp"],
|
|
27
|
+
"env": {
|
|
28
|
+
"ATTROVE_API_KEY": "sk_...",
|
|
29
|
+
"ATTROVE_USER_ID": "user-uuid"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Cursor
|
|
37
|
+
|
|
38
|
+
1. Open Cursor Settings (`Cmd+,` on macOS, `Ctrl+,` on Windows/Linux)
|
|
39
|
+
2. Search for "MCP" or navigate to **Features > MCP Servers**
|
|
40
|
+
3. Click "Edit in settings.json" or add directly:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"attrove": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["@attrove/mcp"],
|
|
48
|
+
"env": {
|
|
49
|
+
"ATTROVE_API_KEY": "sk_...",
|
|
50
|
+
"ATTROVE_USER_ID": "user-uuid"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
4. Restart Cursor for changes to take effect
|
|
58
|
+
5. In the chat, you can now ask questions about your connected integrations
|
|
59
|
+
|
|
60
|
+
### Claude Code (Terminal)
|
|
61
|
+
|
|
62
|
+
If using Claude Code in the terminal, the MCP server is configured via environment variables:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
export ATTROVE_API_KEY="sk_..."
|
|
66
|
+
export ATTROVE_USER_ID="user-uuid"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Direct CLI Usage
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
ATTROVE_API_KEY=sk_... ATTROVE_USER_ID=user-uuid npx @attrove/mcp
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Common Use Cases
|
|
76
|
+
|
|
77
|
+
Once connected, you can ask your AI assistant natural language questions. Here are some examples:
|
|
78
|
+
|
|
79
|
+
**Meeting prep:**
|
|
80
|
+
> "What context do I need for my 2pm meeting with the marketing team?"
|
|
81
|
+
|
|
82
|
+
**Email follow-ups:**
|
|
83
|
+
> "Are there any emails from last week that I haven't responded to?"
|
|
84
|
+
|
|
85
|
+
**Project status:**
|
|
86
|
+
> "What's the latest on the Q4 roadmap discussions?"
|
|
87
|
+
|
|
88
|
+
**People search:**
|
|
89
|
+
> "What has John from Acme Corp been asking about recently?"
|
|
90
|
+
|
|
91
|
+
**Historical context:**
|
|
92
|
+
> "Find the thread where we discussed the pricing changes last month"
|
|
93
|
+
|
|
94
|
+
## Available Tools
|
|
95
|
+
|
|
96
|
+
### `attrove_query`
|
|
97
|
+
|
|
98
|
+
Ask questions about the user's communications and get AI-generated answers.
|
|
99
|
+
|
|
100
|
+
**Parameters:**
|
|
101
|
+
- `query` (required): The question to ask
|
|
102
|
+
- `integration_ids` (optional): Filter to specific integration IDs (UUIDs, e.g., `["550e8400-e29b-41d4-a716-446655440000"]`)
|
|
103
|
+
- `include_sources` (optional): Include source snippets
|
|
104
|
+
|
|
105
|
+
**Example prompts:**
|
|
106
|
+
- "What did Sarah say about the Q4 budget?"
|
|
107
|
+
- "Summarize my meeting with the engineering team"
|
|
108
|
+
- "What are the action items from yesterday's standup?"
|
|
109
|
+
- "When is my next meeting with the product team?"
|
|
110
|
+
- "What context do I need before my 3pm call?"
|
|
111
|
+
|
|
112
|
+
### `attrove_search`
|
|
113
|
+
|
|
114
|
+
Search for specific messages or conversations.
|
|
115
|
+
|
|
116
|
+
**Parameters:**
|
|
117
|
+
- `query` (required): The search query
|
|
118
|
+
- `after_date` (optional): Only messages after this date (ISO 8601)
|
|
119
|
+
- `before_date` (optional): Only messages before this date
|
|
120
|
+
- `sender_domains` (optional): Filter by sender domains
|
|
121
|
+
- `include_body_text` (optional): Include message content (default: true)
|
|
122
|
+
|
|
123
|
+
**Example prompts:**
|
|
124
|
+
- "Find all emails about the product launch"
|
|
125
|
+
- "Show me conversations with the marketing team"
|
|
126
|
+
- "Search for messages mentioning the deadline extension"
|
|
127
|
+
- "Find discussions with acme.com from last month"
|
|
128
|
+
|
|
129
|
+
### `attrove_integrations`
|
|
130
|
+
|
|
131
|
+
List the user's connected integrations.
|
|
132
|
+
|
|
133
|
+
**Parameters:** None
|
|
134
|
+
|
|
135
|
+
**Example prompts:**
|
|
136
|
+
- "What services are connected?"
|
|
137
|
+
- "Show me my integrations"
|
|
138
|
+
|
|
139
|
+
## Environment Variables
|
|
140
|
+
|
|
141
|
+
| Variable | Required | Description |
|
|
142
|
+
|----------|----------|-------------|
|
|
143
|
+
| `ATTROVE_API_KEY` | Yes | Your Attrove API key (`sk_...`) |
|
|
144
|
+
| `ATTROVE_USER_ID` | Yes | User ID to scope API calls |
|
|
145
|
+
| `ATTROVE_BASE_URL` | No | Custom API base URL |
|
|
146
|
+
| `ATTROVE_DEBUG` | No | Set to `true` for verbose error logging |
|
|
147
|
+
|
|
148
|
+
## Programmatic Usage
|
|
149
|
+
|
|
150
|
+
You can also use the server programmatically:
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
import { createServer, startServer } from '@attrove/mcp';
|
|
154
|
+
|
|
155
|
+
// Create a server instance
|
|
156
|
+
const server = createServer({
|
|
157
|
+
apiKey: 'sk_...',
|
|
158
|
+
userId: 'user-uuid'
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Or start directly with stdio transport
|
|
162
|
+
await startServer({
|
|
163
|
+
apiKey: 'sk_...',
|
|
164
|
+
userId: 'user-uuid'
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Getting API Credentials
|
|
169
|
+
|
|
170
|
+
1. Sign up at [attrove.com](https://attrove.com)
|
|
171
|
+
2. Create an organization in the dashboard
|
|
172
|
+
3. Generate an API key (`sk_...`)
|
|
173
|
+
4. Provision a user to get a user ID
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import { Attrove } from '@attrove/sdk';
|
|
177
|
+
|
|
178
|
+
const admin = Attrove.admin({
|
|
179
|
+
clientId: 'your-client-id',
|
|
180
|
+
clientSecret: 'your-client-secret'
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// Create a user
|
|
184
|
+
const { id, apiKey } = await admin.users.create({
|
|
185
|
+
email: 'user@example.com'
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// Use `apiKey` as ATTROVE_API_KEY and `id` as ATTROVE_USER_ID
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Troubleshooting
|
|
192
|
+
|
|
193
|
+
### "ATTROVE_API_KEY environment variable is required"
|
|
194
|
+
|
|
195
|
+
Make sure you've set the environment variables correctly in your MCP configuration.
|
|
196
|
+
|
|
197
|
+
### Tools not showing up
|
|
198
|
+
|
|
199
|
+
1. Restart Claude/Cursor after configuration changes
|
|
200
|
+
2. Check the MCP server logs for errors
|
|
201
|
+
3. Verify your API key is valid
|
|
202
|
+
|
|
203
|
+
### Debugging errors
|
|
204
|
+
|
|
205
|
+
Set `ATTROVE_DEBUG=true` to enable verbose error logging with stack traces:
|
|
206
|
+
|
|
207
|
+
```json
|
|
208
|
+
{
|
|
209
|
+
"mcpServers": {
|
|
210
|
+
"attrove": {
|
|
211
|
+
"command": "npx",
|
|
212
|
+
"args": ["@attrove/mcp"],
|
|
213
|
+
"env": {
|
|
214
|
+
"ATTROVE_API_KEY": "sk_...",
|
|
215
|
+
"ATTROVE_USER_ID": "user-uuid",
|
|
216
|
+
"ATTROVE_DEBUG": "true"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Rate limiting
|
|
224
|
+
|
|
225
|
+
The Attrove API has rate limits. If you're making many requests, you may need to wait before trying again.
|
|
226
|
+
|
|
227
|
+
## Requirements
|
|
228
|
+
|
|
229
|
+
- Node.js 18.0.0 or later
|
|
230
|
+
|
|
231
|
+
## AI-Friendly Documentation
|
|
232
|
+
|
|
233
|
+
For AI assistants and code generation tools, Attrove provides machine-readable documentation:
|
|
234
|
+
|
|
235
|
+
- **llms.txt**: `https://attrove.com/llms.txt` - Condensed API reference for LLMs
|
|
236
|
+
- **Quickstart**: `https://github.com/attrove/quickstart` - Example code with CLAUDE.md context
|
|
237
|
+
|
|
238
|
+
## Links
|
|
239
|
+
|
|
240
|
+
- [Documentation](https://docs.attrove.com)
|
|
241
|
+
- [API Reference](https://docs.attrove.com/api)
|
|
242
|
+
- [TypeScript SDK](https://www.npmjs.com/package/@attrove/sdk)
|
|
243
|
+
- [Quickstart Examples](https://github.com/attrove/quickstart)
|
|
244
|
+
|
|
245
|
+
## License
|
|
246
|
+
|
|
247
|
+
MIT
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Attrove MCP Server CLI
|
|
5
|
+
*
|
|
6
|
+
* Starts the MCP server for use with Claude, Cursor, or other MCP-compatible clients.
|
|
7
|
+
*
|
|
8
|
+
* Required environment variables:
|
|
9
|
+
* - ATTROVE_API_KEY: Your Attrove API key (sk_...)
|
|
10
|
+
* - ATTROVE_USER_ID: The user ID to scope API calls
|
|
11
|
+
*
|
|
12
|
+
* Optional environment variables:
|
|
13
|
+
* - ATTROVE_BASE_URL: Custom API base URL (defaults to https://api.attrove.com)
|
|
14
|
+
* - ATTROVE_DEBUG: Set to "true" to enable debug logging
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* ATTROVE_API_KEY=sk_... ATTROVE_USER_ID=... npx @attrove/mcp
|
|
18
|
+
*
|
|
19
|
+
* Claude Desktop configuration:
|
|
20
|
+
* {
|
|
21
|
+
* "mcpServers": {
|
|
22
|
+
* "attrove": {
|
|
23
|
+
* "command": "npx",
|
|
24
|
+
* "args": ["@attrove/mcp"],
|
|
25
|
+
* "env": {
|
|
26
|
+
* "ATTROVE_API_KEY": "sk_...",
|
|
27
|
+
* "ATTROVE_USER_ID": "..."
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
const isDebug = process.env.ATTROVE_DEBUG === 'true' || process.env.DEBUG === 'true';
|
|
35
|
+
|
|
36
|
+
async function main() {
|
|
37
|
+
try {
|
|
38
|
+
// Import the server module
|
|
39
|
+
const { startServer, getConfigFromEnv } = await import('../esm/index.js');
|
|
40
|
+
|
|
41
|
+
// Get configuration from environment
|
|
42
|
+
const config = getConfigFromEnv();
|
|
43
|
+
|
|
44
|
+
// Start the server
|
|
45
|
+
await startServer(config);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
// Always show the error message
|
|
48
|
+
console.error('Failed to start Attrove MCP server:', error.message);
|
|
49
|
+
|
|
50
|
+
// Show stack trace in debug mode for easier troubleshooting
|
|
51
|
+
if (isDebug && error.stack) {
|
|
52
|
+
console.error('\nStack trace:');
|
|
53
|
+
console.error(error.stack);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Show additional context for common errors
|
|
57
|
+
if (error.message.includes('ATTROVE_API_KEY')) {
|
|
58
|
+
console.error('\nHint: Set the ATTROVE_API_KEY environment variable to your API key (sk_...)');
|
|
59
|
+
} else if (error.message.includes('ATTROVE_USER_ID')) {
|
|
60
|
+
console.error('\nHint: Set the ATTROVE_USER_ID environment variable to the user ID (UUID)');
|
|
61
|
+
} else if (error.message.includes('Cannot find module')) {
|
|
62
|
+
console.error('\nHint: Try running "npm install" or "npm rebuild" to reinstall dependencies');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
main();
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@attrove/mcp",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "MCP server for Attrove - AI-powered context retrieval for Claude and Cursor",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.js",
|
|
7
|
+
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"attrove-mcp": "./bin/attrove-mcp.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"default": "./dist/esm/index.js"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/types/index.d.ts",
|
|
19
|
+
"default": "./dist/cjs/index.js"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"bin",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"keywords": [
|
|
30
|
+
"attrove",
|
|
31
|
+
"mcp",
|
|
32
|
+
"model-context-protocol",
|
|
33
|
+
"claude",
|
|
34
|
+
"cursor",
|
|
35
|
+
"ai",
|
|
36
|
+
"rag",
|
|
37
|
+
"llm"
|
|
38
|
+
],
|
|
39
|
+
"author": "Attrove <support@attrove.com>",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "https://github.com/attrove/attrove-js.git",
|
|
44
|
+
"directory": "packages/mcp"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://attrove.com/docs/mcp",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/attrove/attrove-js/issues"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=18.0.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "nx build mcp",
|
|
55
|
+
"test": "nx test mcp"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
59
|
+
"@attrove/sdk": "*"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/node": "^20.0.0",
|
|
63
|
+
"typescript": "~5.7.0"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"type": "commonjs"
|
|
69
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Mock version module for Jest tests.
|
|
4
|
+
*
|
|
5
|
+
* This avoids the import.meta.url ESM issue when running tests with ts-jest.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.resetVersionCache = exports.getVersion = void 0;
|
|
9
|
+
function getVersion() {
|
|
10
|
+
return '1.0.0-test';
|
|
11
|
+
}
|
|
12
|
+
exports.getVersion = getVersion;
|
|
13
|
+
function resetVersionCache() {
|
|
14
|
+
// No-op in mock
|
|
15
|
+
}
|
|
16
|
+
exports.resetVersionCache = resetVersionCache;
|
|
17
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../../packages/mcp/src/__mocks__/version.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,SAAgB,UAAU;IACxB,OAAO,YAAY,CAAC;AACtB,CAAC;AAFD,gCAEC;AAED,SAAgB,iBAAiB;IAC/B,gBAAgB;AAClB,CAAC;AAFD,8CAEC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Constants
|
|
4
|
+
*
|
|
5
|
+
* Centralized constants used across the MCP server. Consolidating these ensures
|
|
6
|
+
* consistency and makes maintenance easier.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MAX_BODY_PREVIEW_LENGTH = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Maximum length for message body preview text in search results.
|
|
12
|
+
*
|
|
13
|
+
* When displaying search results, message bodies longer than this value
|
|
14
|
+
* will be truncated with an ellipsis to keep output manageable.
|
|
15
|
+
*/
|
|
16
|
+
exports.MAX_BODY_PREVIEW_LENGTH = 200;
|
|
17
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../packages/mcp/src/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;GAKG;AACU,QAAA,uBAAuB,GAAG,GAAG,CAAC"}
|
package/cjs/src/index.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @attrove/mcp
|
|
4
|
+
*
|
|
5
|
+
* MCP server for Attrove - enables AI assistants like Claude and Cursor
|
|
6
|
+
* to access user context through the Attrove API.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```bash
|
|
10
|
+
* # Run via npx
|
|
11
|
+
* ATTROVE_API_KEY=sk_... ATTROVE_USER_ID=... npx @attrove/mcp
|
|
12
|
+
*
|
|
13
|
+
* # Configure in Claude Desktop
|
|
14
|
+
* {
|
|
15
|
+
* "mcpServers": {
|
|
16
|
+
* "attrove": {
|
|
17
|
+
* "command": "npx",
|
|
18
|
+
* "args": ["@attrove/mcp"],
|
|
19
|
+
* "env": {
|
|
20
|
+
* "ATTROVE_API_KEY": "sk_...",
|
|
21
|
+
* "ATTROVE_USER_ID": "..."
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @packageDocumentation
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.getVersion = exports.integrationsToolDefinition = exports.searchToolDefinition = exports.queryToolDefinition = exports.allToolDefinitions = exports.getConfigFromEnv = exports.startServer = exports.createServer = void 0;
|
|
32
|
+
var server_1 = require("./server");
|
|
33
|
+
Object.defineProperty(exports, "createServer", { enumerable: true, get: function () { return server_1.createServer; } });
|
|
34
|
+
Object.defineProperty(exports, "startServer", { enumerable: true, get: function () { return server_1.startServer; } });
|
|
35
|
+
Object.defineProperty(exports, "getConfigFromEnv", { enumerable: true, get: function () { return server_1.getConfigFromEnv; } });
|
|
36
|
+
var tools_1 = require("./tools");
|
|
37
|
+
Object.defineProperty(exports, "allToolDefinitions", { enumerable: true, get: function () { return tools_1.allToolDefinitions; } });
|
|
38
|
+
Object.defineProperty(exports, "queryToolDefinition", { enumerable: true, get: function () { return tools_1.queryToolDefinition; } });
|
|
39
|
+
Object.defineProperty(exports, "searchToolDefinition", { enumerable: true, get: function () { return tools_1.searchToolDefinition; } });
|
|
40
|
+
Object.defineProperty(exports, "integrationsToolDefinition", { enumerable: true, get: function () { return tools_1.integrationsToolDefinition; } });
|
|
41
|
+
var version_1 = require("./version");
|
|
42
|
+
Object.defineProperty(exports, "getVersion", { enumerable: true, get: function () { return version_1.getVersion; } });
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/mcp/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAEH,mCAAuE;AAA9D,sGAAA,YAAY,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAGpD,iCAKiB;AAJf,2GAAA,kBAAkB,OAAA;AAClB,4GAAA,mBAAmB,OAAA;AACnB,6GAAA,oBAAoB,OAAA;AACpB,mHAAA,0BAA0B,OAAA;AAG5B,qCAAuC;AAA9B,qGAAA,UAAU,OAAA"}
|