@iflow-mcp/graphlit-graphlit-mcp-server 1.0.1
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 +21 -0
- package/README.md +371 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +74 -0
- package/dist/resources.d.ts +2 -0
- package/dist/resources.js +533 -0
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +4019 -0
- package/package.json +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Unstruk Data Inc.
|
|
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,371 @@
|
|
|
1
|
+
[](https://badge.fury.io/js/graphlit-mcp-server)
|
|
2
|
+
[](https://smithery.ai/server/@graphlit/graphlit-mcp-server)
|
|
3
|
+
|
|
4
|
+
# Model Context Protocol (MCP) Server for Graphlit Platform
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. This document outlines the setup process and provides a basic example of using the client.
|
|
9
|
+
|
|
10
|
+
Ingest anything from Slack, Discord, websites, Google Drive, email, Jira, Linear or GitHub into a Graphlit project - and then search and retrieve relevant knowledge within an MCP client like Cursor, Windsurf, Goose or Cline.
|
|
11
|
+
|
|
12
|
+
Your Graphlit project acts as a searchable, and RAG-ready knowledge base across all your developer and product management tools.
|
|
13
|
+
|
|
14
|
+
Documents (PDF, DOCX, PPTX, etc.) and HTML web pages will be extracted to Markdown upon ingestion. Audio and video files will be transcribed upon ingestion.
|
|
15
|
+
|
|
16
|
+
Web crawling and web search are built-in as MCP tools, with no need to integrate other tools like Firecrawl, Exa, etc. separately.
|
|
17
|
+
|
|
18
|
+
You can read more about the MCP Server use cases and features on our [blog](https://www.graphlit.com/blog/graphlit-mcp-server).
|
|
19
|
+
|
|
20
|
+
Watch our latest [YouTube video](https://www.youtube.com/watch?v=Or-QqonvcAs&t=4s) on using the Graphlit MCP Server with the Goose MCP client.
|
|
21
|
+
|
|
22
|
+
For any questions on using the MCP Server, please join our [Discord](https://discord.gg/ygFmfjy3Qx) community and post on the #mcp channel.
|
|
23
|
+
|
|
24
|
+
<a href="https://glama.ai/mcp/servers/fscrivteod">
|
|
25
|
+
<img width="380" height="200" src="https://glama.ai/mcp/servers/fscrivteod/badge" alt="graphlit-mcp-server MCP server" />
|
|
26
|
+
</a>
|
|
27
|
+
|
|
28
|
+
## Tools
|
|
29
|
+
|
|
30
|
+
### Retrieval
|
|
31
|
+
|
|
32
|
+
- Query Contents
|
|
33
|
+
- Query Collections
|
|
34
|
+
- Query Feeds
|
|
35
|
+
- Query Conversations
|
|
36
|
+
- Retrieve Relevant Sources
|
|
37
|
+
- Retrieve Similar Images
|
|
38
|
+
- Visually Describe Image
|
|
39
|
+
|
|
40
|
+
### RAG
|
|
41
|
+
|
|
42
|
+
- Prompt LLM Conversation
|
|
43
|
+
|
|
44
|
+
### Extraction
|
|
45
|
+
|
|
46
|
+
- Extract Structured JSON from Text
|
|
47
|
+
|
|
48
|
+
### Publishing
|
|
49
|
+
|
|
50
|
+
- Publish as Audio (ElevenLabs Audio)
|
|
51
|
+
- Publish as Image (OpenAI Image Generation)
|
|
52
|
+
|
|
53
|
+
### Ingestion
|
|
54
|
+
|
|
55
|
+
- Files
|
|
56
|
+
- Web Pages
|
|
57
|
+
- Messages
|
|
58
|
+
- Posts
|
|
59
|
+
- Emails
|
|
60
|
+
- Issues
|
|
61
|
+
- Text
|
|
62
|
+
- Memory (Short-Term)
|
|
63
|
+
|
|
64
|
+
### Data Connectors
|
|
65
|
+
|
|
66
|
+
- Microsoft Outlook email
|
|
67
|
+
- Google Mail
|
|
68
|
+
- Notion
|
|
69
|
+
- Reddit
|
|
70
|
+
- Linear
|
|
71
|
+
- Jira
|
|
72
|
+
- GitHub Issues
|
|
73
|
+
- Google Drive
|
|
74
|
+
- OneDrive
|
|
75
|
+
- SharePoint
|
|
76
|
+
- Dropbox
|
|
77
|
+
- Box
|
|
78
|
+
- GitHub
|
|
79
|
+
- Slack
|
|
80
|
+
- Microsoft Teams
|
|
81
|
+
- Discord
|
|
82
|
+
- Twitter/X
|
|
83
|
+
- Podcasts (RSS)
|
|
84
|
+
|
|
85
|
+
### Web
|
|
86
|
+
|
|
87
|
+
- Web Crawling
|
|
88
|
+
- Web Search (including Podcast Search)
|
|
89
|
+
- Web Mapping
|
|
90
|
+
- Screenshot Page
|
|
91
|
+
|
|
92
|
+
### Notifications
|
|
93
|
+
|
|
94
|
+
- Slack
|
|
95
|
+
- Email
|
|
96
|
+
- Webhook
|
|
97
|
+
- Twitter/X
|
|
98
|
+
|
|
99
|
+
### Operations
|
|
100
|
+
|
|
101
|
+
- Configure Project
|
|
102
|
+
- Create Collection
|
|
103
|
+
- Add Contents to Collection
|
|
104
|
+
- Remove Contents from Collection
|
|
105
|
+
- Delete Collection(s)
|
|
106
|
+
- Delete Feed(s)
|
|
107
|
+
- Delete Content(s)
|
|
108
|
+
- Delete Conversation(s)
|
|
109
|
+
- Is Feed Done?
|
|
110
|
+
- Is Content Done?
|
|
111
|
+
|
|
112
|
+
### Enumerations
|
|
113
|
+
|
|
114
|
+
- List Slack Channels
|
|
115
|
+
- List Microsoft Teams Teams
|
|
116
|
+
- List Microsoft Teams Channels
|
|
117
|
+
- List SharePoint Libraries
|
|
118
|
+
- List SharePoint Folders
|
|
119
|
+
- List Linear Projects
|
|
120
|
+
- List Notion Databases
|
|
121
|
+
- List Notion Pages
|
|
122
|
+
- List Dropbox Folders
|
|
123
|
+
- List Box Folders
|
|
124
|
+
- List Discord Guilds
|
|
125
|
+
- List Discord Channels
|
|
126
|
+
- List Google Calendars
|
|
127
|
+
- List Microsoft Calendars
|
|
128
|
+
|
|
129
|
+
## Resources
|
|
130
|
+
|
|
131
|
+
- Project
|
|
132
|
+
- Contents
|
|
133
|
+
- Feeds
|
|
134
|
+
- Collections (of Content)
|
|
135
|
+
- Workflows
|
|
136
|
+
- Conversations
|
|
137
|
+
- Specifications
|
|
138
|
+
|
|
139
|
+
## Prerequisites
|
|
140
|
+
|
|
141
|
+
Before you begin, ensure you have the following:
|
|
142
|
+
|
|
143
|
+
- Node.js installed on your system (recommended version 18.x or higher).
|
|
144
|
+
- An active account on the [Graphlit Platform](https://portal.graphlit.dev) with access to the API settings dashboard.
|
|
145
|
+
|
|
146
|
+
## Configuration
|
|
147
|
+
|
|
148
|
+
The Graphlit MCP Server supports environment variables to be set for authentication and configuration:
|
|
149
|
+
|
|
150
|
+
- `GRAPHLIT_ENVIRONMENT_ID`: Your environment ID.
|
|
151
|
+
- `GRAPHLIT_ORGANIZATION_ID`: Your organization ID.
|
|
152
|
+
- `GRAPHLIT_JWT_SECRET`: Your JWT secret for signing the JWT token.
|
|
153
|
+
|
|
154
|
+
You can find these values in the API settings dashboard on the [Graphlit Platform](https://portal.graphlit.dev).
|
|
155
|
+
|
|
156
|
+
## Installation
|
|
157
|
+
|
|
158
|
+
### Installing via VS Code
|
|
159
|
+
|
|
160
|
+
For quick installation, use one of the one-click install buttons below:
|
|
161
|
+
|
|
162
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=graphlit&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22organization_id%22%2C%22description%22%3A%22Graphlit%20Organization%20ID%22%2C%22password%22%3Atrue%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22environment_id%22%2C%22description%22%3A%22Graphlit%20Environment%20ID%22%2C%22password%22%3Atrue%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22jwt_secret%22%2C%22description%22%3A%22Graphlit%20JWT%20Secret%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22graphlit-mcp-server%22%5D%2C%22env%22%3A%7B%22GRAPHLIT_ORGANIZATION_ID%22%3A%22%24%7Binput%3Aorganization_id%7D%22%2C%22GRAPHLIT_ENVIRONMENT_ID%22%3A%22%24%7Binput%3Aenvironment_id%7D%22%2C%22GRAPHLIT_JWT_SECRET%22%3A%22%24%7Binput%3Ajwt_secret%7D%22%7D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=graphlit&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22organization_id%22%2C%22description%22%3A%22Graphlit%20Organization%20ID%22%2C%22password%22%3Atrue%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22environment_id%22%2C%22description%22%3A%22Graphlit%20Environment%20ID%22%2C%22password%22%3Atrue%7D%2C%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22jwt_secret%22%2C%22description%22%3A%22Graphlit%20JWT%20Secret%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22graphlit-mcp-server%22%5D%2C%22env%22%3A%7B%22GRAPHLIT_ORGANIZATION_ID%22%3A%22%24%7Binput%3Aorganization_id%7D%22%2C%22GRAPHLIT_ENVIRONMENT_ID%22%3A%22%24%7Binput%3Aenvironment_id%7D%22%2C%22GRAPHLIT_JWT_SECRET%22%3A%22%24%7Binput%3Ajwt_secret%7D%22%7D%7D&quality=insiders)
|
|
163
|
+
|
|
164
|
+
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
|
|
165
|
+
|
|
166
|
+
Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.
|
|
167
|
+
|
|
168
|
+
> Note that the `mcp` key is not needed in the `.vscode/mcp.json` file.
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"mcp": {
|
|
173
|
+
"inputs": [
|
|
174
|
+
{
|
|
175
|
+
"type": "promptString",
|
|
176
|
+
"id": "organization_id",
|
|
177
|
+
"description": "Graphlit Organization ID",
|
|
178
|
+
"password": true
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "promptString",
|
|
182
|
+
"id": "environment_id",
|
|
183
|
+
"description": "Graphlit Environment ID",
|
|
184
|
+
"password": true
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"type": "promptString",
|
|
188
|
+
"id": "jwt_secret",
|
|
189
|
+
"description": "Graphlit JWT Secret",
|
|
190
|
+
"password": true
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"servers": {
|
|
194
|
+
"graphlit": {
|
|
195
|
+
"command": "npx",
|
|
196
|
+
"args": ["-y", "graphlit-mcp-server"],
|
|
197
|
+
"env": {
|
|
198
|
+
"GRAPHLIT_ORGANIZATION_ID": "${input:organization_id}",
|
|
199
|
+
"GRAPHLIT_ENVIRONMENT_ID": "${input:environment_id}",
|
|
200
|
+
"GRAPHLIT_JWT_SECRET": "${input:jwt_secret}"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Installing via Windsurf
|
|
209
|
+
|
|
210
|
+
To install graphlit-mcp-server in Windsurf IDE application, Cline should use NPX:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
npx -y graphlit-mcp-server
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Your mcp_config.json file should be configured similar to:
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
{
|
|
220
|
+
"mcpServers": {
|
|
221
|
+
"graphlit-mcp-server": {
|
|
222
|
+
"command": "npx",
|
|
223
|
+
"args": [
|
|
224
|
+
"-y",
|
|
225
|
+
"graphlit-mcp-server"
|
|
226
|
+
],
|
|
227
|
+
"env": {
|
|
228
|
+
"GRAPHLIT_ORGANIZATION_ID": "your-organization-id",
|
|
229
|
+
"GRAPHLIT_ENVIRONMENT_ID": "your-environment-id",
|
|
230
|
+
"GRAPHLIT_JWT_SECRET": "your-jwt-secret",
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Installing via Cline
|
|
238
|
+
|
|
239
|
+
To install graphlit-mcp-server in Cline IDE application, Cline should use NPX:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
npx -y graphlit-mcp-server
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Your cline_mcp_settings.json file should be configured similar to:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
{
|
|
249
|
+
"mcpServers": {
|
|
250
|
+
"graphlit-mcp-server": {
|
|
251
|
+
"command": "npx",
|
|
252
|
+
"args": [
|
|
253
|
+
"-y",
|
|
254
|
+
"graphlit-mcp-server"
|
|
255
|
+
],
|
|
256
|
+
"env": {
|
|
257
|
+
"GRAPHLIT_ORGANIZATION_ID": "your-organization-id",
|
|
258
|
+
"GRAPHLIT_ENVIRONMENT_ID": "your-environment-id",
|
|
259
|
+
"GRAPHLIT_JWT_SECRET": "your-jwt-secret",
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Installing via Cursor
|
|
267
|
+
|
|
268
|
+
To install graphlit-mcp-server in Cursor IDE application, Cursor should use NPX:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
npx -y graphlit-mcp-server
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Your mcp.json file should be configured similar to:
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
{
|
|
278
|
+
"mcpServers": {
|
|
279
|
+
"graphlit-mcp-server": {
|
|
280
|
+
"command": "npx",
|
|
281
|
+
"args": [
|
|
282
|
+
"-y",
|
|
283
|
+
"graphlit-mcp-server"
|
|
284
|
+
],
|
|
285
|
+
"env": {
|
|
286
|
+
"GRAPHLIT_ORGANIZATION_ID": "your-organization-id",
|
|
287
|
+
"GRAPHLIT_ENVIRONMENT_ID": "your-environment-id",
|
|
288
|
+
"GRAPHLIT_JWT_SECRET": "your-jwt-secret",
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Installing via Smithery
|
|
296
|
+
|
|
297
|
+
To install graphlit-mcp-server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@graphlit/graphlit-mcp-server):
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
npx -y @smithery/cli install @graphlit/graphlit-mcp-server --client claude
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Installing manually
|
|
304
|
+
|
|
305
|
+
To use the Graphlit MCP Server in any MCP client application, use:
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
{
|
|
309
|
+
"mcpServers": {
|
|
310
|
+
"graphlit-mcp-server": {
|
|
311
|
+
"command": "npx",
|
|
312
|
+
"args": [
|
|
313
|
+
"-y",
|
|
314
|
+
"graphlit-mcp-server"
|
|
315
|
+
],
|
|
316
|
+
"env": {
|
|
317
|
+
"GRAPHLIT_ORGANIZATION_ID": "your-organization-id",
|
|
318
|
+
"GRAPHLIT_ENVIRONMENT_ID": "your-environment-id",
|
|
319
|
+
"GRAPHLIT_JWT_SECRET": "your-jwt-secret",
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Optionally, you can configure the credentials for data connectors, such as Slack, Google Email and Notion.
|
|
327
|
+
Only GRAPHLIT_ORGANIZATION_ID, GRAPHLIT_ENVIRONMENT_ID and GRAPHLIT_JWT_SECRET are required.
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
{
|
|
331
|
+
"mcpServers": {
|
|
332
|
+
"graphlit-mcp-server": {
|
|
333
|
+
"command": "npx",
|
|
334
|
+
"args": [
|
|
335
|
+
"-y",
|
|
336
|
+
"graphlit-mcp-server"
|
|
337
|
+
],
|
|
338
|
+
"env": {
|
|
339
|
+
"GRAPHLIT_ORGANIZATION_ID": "your-organization-id",
|
|
340
|
+
"GRAPHLIT_ENVIRONMENT_ID": "your-environment-id",
|
|
341
|
+
"GRAPHLIT_JWT_SECRET": "your-jwt-secret",
|
|
342
|
+
"SLACK_BOT_TOKEN": "your-slack-bot-token",
|
|
343
|
+
"DISCORD_BOT_TOKEN": "your-discord-bot-token",
|
|
344
|
+
"TWITTER_TOKEN": "your-twitter-token",
|
|
345
|
+
"GOOGLE_EMAIL_REFRESH_TOKEN": "your-google-refresh-token",
|
|
346
|
+
"GOOGLE_EMAIL_CLIENT_ID": "your-google-client-id",
|
|
347
|
+
"GOOGLE_EMAIL_CLIENT_SECRET": "your-google-client-secret",
|
|
348
|
+
"LINEAR_API_KEY": "your-linear-api-key",
|
|
349
|
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-github-pat",
|
|
350
|
+
"JIRA_EMAIL": "your-jira-email",
|
|
351
|
+
"JIRA_TOKEN": "your-jira-token",
|
|
352
|
+
"NOTION_API_KEY": "your-notion-api-key"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
NOTE: when running 'npx' on Windows, you may need to explicitly call npx via the command prompt.
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
"command": "C:\\Windows\\System32\\cmd.exe /c npx"
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## Support
|
|
366
|
+
|
|
367
|
+
Please refer to the [Graphlit API Documentation](https://docs.graphlit.dev/).
|
|
368
|
+
|
|
369
|
+
For support with the Graphlit MCP Server, please submit a [GitHub Issue](https://github.com/graphlit/graphlit-mcp-server/issues).
|
|
370
|
+
|
|
371
|
+
For further support with the Graphlit Platform, please join our [Discord](https://discord.gg/ygFmfjy3Qx) community.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { registerResources } from "./resources.js";
|
|
5
|
+
import { registerTools } from "./tools.js";
|
|
6
|
+
const DEFAULT_INSTRUCTIONS = `
|
|
7
|
+
You are provided a set of MCP tools and resources that integrate with the [Graphlit](https://www.graphlit.com) Platform.
|
|
8
|
+
|
|
9
|
+
To use each of the Graphlit MCP tools, there may be environment variables which are required to be configured in your MCP client. These are described in the description for each tool.
|
|
10
|
+
These must be configured in the MCP client YAML or JSON configuration file before you can use the tools. *Do not* set these directly in your Terminal or shell environment.
|
|
11
|
+
|
|
12
|
+
Graphlit is an LLM-enabled knowledge API platform, which supports these resources:
|
|
13
|
+
- project: container for ingested contents, which can be configured with a default workflow
|
|
14
|
+
- contents: all ingested files, web pages, messages, etc.; also includes short-term 'memory' contents
|
|
15
|
+
- feeds: data connectors which ingest contents
|
|
16
|
+
- collections: named groups of contents
|
|
17
|
+
- conversations: chat message history of LLM conversation, which uses RAG pipeline for content retrieval
|
|
18
|
+
- workflows: how content is handled during the ingestion process
|
|
19
|
+
- specifications: LLM configuration presets, used by workflows and conversations
|
|
20
|
+
|
|
21
|
+
Identifiers for all resources are unique within the Graphlit project, and are formatted as GUIDs.
|
|
22
|
+
|
|
23
|
+
You have access to one and only one Graphlit project, which can optionally be configured with a workflow to guide the document preparation and entity extraction of ingested content.
|
|
24
|
+
The Graphlit project is non-deletable, but you can create and delete contents, feeds, collections, conversations, specifications and workflows within the project.
|
|
25
|
+
|
|
26
|
+
You can query the Graphlit project resource for the credits used, LLM tokens used, and the available project quota. By default, credits cost USD$0.10, and are discounted on higher paid tiers.
|
|
27
|
+
|
|
28
|
+
With this Graphlit MCP Server, you can ingest anything from Slack, Discord, websites, Notion, Google Drive, email, Jira, Linear or GitHub into a Graphlit project - and then search and retrieve relevant knowledge within an MCP client like Cursor, Windsurf or Cline.
|
|
29
|
+
|
|
30
|
+
Documents (PDF, DOCX, PPTX, etc.) and HTML web pages will be extracted to Markdown upon ingestion. Audio and video files will be transcribed upon ingestion.
|
|
31
|
+
|
|
32
|
+
## Best Practices:
|
|
33
|
+
1. Always look for matching resources before you try to call any tools.
|
|
34
|
+
For example, "have i configured any graphlit workflows?", you should check for workflow resources before trying to call any other tools.
|
|
35
|
+
2. Don't use 'retrieveSources' to locate contents, when you have already added the contents into a collection. In that case, first retrieve the collection resource, which contains the content resources.
|
|
36
|
+
3. Only call the 'configureProject' tool when the user explicitly asks to configure their Graphlit project defaults.
|
|
37
|
+
4. Never infer, guess at or hallucinate any URLs. Always retrieve the latest content resources in order to get downloadable URLs.
|
|
38
|
+
5. Use 'ingestMemory' to save short-term memories, such as temporary notes or intermediate state for research. Use 'ingestText' to store long-term knowledge, such as Markdown results from research.
|
|
39
|
+
6. Always use 'PODSCAN' web search type when searching for podcast episodes, podcast appearances, etc.
|
|
40
|
+
7. Prioritize using feeds, rather than 'ingestUrl', when you want to ingest a website. Feeds are more efficient and faster than using 'ingestUrl'.
|
|
41
|
+
If you receive a request to ingest a GitHub URL, use the 'ingestGitHubFiles' tool to ingest the repository, rather than using 'ingestUrl'.
|
|
42
|
+
Always attempt to use the most-specific tool for the task at hand.
|
|
43
|
+
|
|
44
|
+
## Short-term vs Long-term Memory:
|
|
45
|
+
You can perform scatter-gather operations where you save short-term memories after each workflow step, and then gather relevant memories prior to the moving onto the next step.
|
|
46
|
+
Leverage short-term memories when evaluating the results of a workflow step, and then use long-term memories to store the final results of your workflow.
|
|
47
|
+
You can collect memories in collections, and then use the 'queryContents' tool to retrieve the 'memory' contents by the collection. This will help you to keep track of your progress and avoid losing any important information.
|
|
48
|
+
|
|
49
|
+
If you have any trouble with this Graphlit MCP Server, join our [Discord](https://discord.gg/ygFmfjy3Qx) community for support.
|
|
50
|
+
`;
|
|
51
|
+
export const server = new McpServer({
|
|
52
|
+
name: "Graphlit MCP Server",
|
|
53
|
+
version: "1.0.0",
|
|
54
|
+
}, {
|
|
55
|
+
instructions: DEFAULT_INSTRUCTIONS,
|
|
56
|
+
});
|
|
57
|
+
registerResources(server);
|
|
58
|
+
registerTools(server);
|
|
59
|
+
async function runServer() {
|
|
60
|
+
try {
|
|
61
|
+
console.error("Attempting to start Graphlit MCP Server.");
|
|
62
|
+
const transport = new StdioServerTransport();
|
|
63
|
+
await server.connect(transport);
|
|
64
|
+
console.error("Successfully started Graphlit MCP Server.");
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
console.error("Failed to start Graphlit MCP Server.", error);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
runServer().catch((error) => {
|
|
72
|
+
console.error("Failed to start Graphlit MCP Server.", error);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
});
|