Graphlit MCP Server Setup with Client Example
Configure the MCP server with Graphlit using a concise setup guide and client example to quickly integrate MCP clients.
npx -y @graphlit/graphlit-mcp-serverOverview
The Graphlit MCP (Model Context Protocol) Server provides a bridge between MCP-compatible clients (Cursor, Windsurf, Goose, Cline, etc.) and a Graphlit project. It turns everything you ingest into a searchable, RAG-ready knowledge base: files (PDF, DOCX, PPTX), web pages (extracted to Markdown), audio/video (transcribed), messages and issues, calendars, and more. MCP clients connect to the server to run retrieval, extraction, ingestion and publishing tools against that project.
This server is useful when you want to surface organized, contextualized knowledge into third‑party LLM frontends or tools without rebuilding ingestion and connectors. It centralizes connectors (Slack, Google Drive, GitHub, Notion, etc.), web crawling/search, and a set of MCP tools so clients can request search results, prompt conversations, extract structured JSON, publish audio/images, and more.
Features
- Centralized MCP server that exposes Graphlit tools to MCP clients
- Built‑in ingestion for files, web pages, messages, emails, issues, and RSS
- Web crawling, web search, and screenshot capabilities
- Retrieval tools: query contents, collections, feeds, conversations, and relevant sources
- RAG workflows: prompt LLM conversation tooling for contextualized responses
- Extraction tools: structured JSON extraction from unstructured text
- Publishing: generate audio (ElevenLabs) and images (OpenAI)
- Connectors for Slack, Google Drive, Gmail, Notion, GitHub, Jira, Linear, Dropbox, Box, OneDrive, SharePoint, and more
Installation / Configuration
Prerequisites:
- Node.js 18+ recommended
- A Graphlit account and API settings (Organization ID, Environment ID, JWT secret)
Install and run via npx (quick demo):
# one-time install & run (will prompt or read environment variables)
Or install as a local dependency:
Environment variables
| Variable | Purpose |
|---|---|
| GRAPHLIT_ORGANIZATION_ID | Your Graphlit organization ID (from portal.graphlit.dev) |
| GRAPHLIT_ENVIRONMENT_ID | Graphlit environment/project ID |
| GRAPHLIT_JWT_SECRET | Secret used to sign JWTs for MCP client authentication |
Example export (Linux / macOS):
By default the server listens on localhost and exposes HTTP endpoints for MCP clients. Check the process output to confirm the listening port (commonly 3000).
Available Tools / Resources
The server exposes a comprehensive set of tools (grouped):
- Retrieval: query contents, query collections, query feeds, retrieve similar images, visually describe image
- RAG: prompt LLM conversation
- Extraction: extract structured JSON from text
- Ingestion: add files, web pages, messages, emails, issues, and memory
- Publishing: publish audio (ElevenLabs), publish image (OpenAI)
- Web: web crawl, web search (including podcast search), screenshot page
- Operations: configure project, create/delete collections, add/remove content, delete feeds/conversations, check ingestion status
- Connectors: Slack, Google Drive, Gmail/Outlook, Notion, Discord, Teams, GitHub, Jira, Linear, Dropbox, Box, OneDrive, SharePoint, RSS podcasts, Twitter/X
Use the server UI or the tools listing endpoint to see available tool names and their parameter shapes.
Client example (Node.js)
Below is a minimal client flow: sign a JWT using your GRAPHLIT_JWT_SECRET, request the server’s tools list, and invoke a retrieval tool. This uses node-fetch and jsonwebtoken.
Install dependencies:
Client (example):
// client.js
;
;
; // adjust if different
;
// create a short-lived JWT for the client
;
// list tools
;
'tools:', await ;
// invoke a retrieval tool (example: query_contents)
;