MCP Server Setup
⏱️ Time to Complete: 10 minutes 🎯 Level: Beginner 💻 Language: TypeScript (MCP Server)
What You'll Build
✅ Connect Graphlit to your MCP-compatible IDE (Cursor, Windsurf, Claude Desktop, Cline)
✅ Search your Graphlit project (Slack, Gmail, Notion, etc.) from your editor
✅ Query conversations, collections, feeds, and workflows
✅ Ingest new content or trigger workflows without leaving the IDE
📁 Graphlit MCP Server Repository
Prerequisites
Node.js 18+
One of the MCP-aware IDEs (Cursor, Windsurf, Claude Desktop, or VS Code with Cline)
Graphlit credentials in
.env(from Getting Started guide):GRAPHLIT_ORGANIZATION_IDGRAPHLIT_ENVIRONMENT_IDGRAPHLIT_JWT_SECRET
npm install -g graphlit-mcp-server(or usenpxin configs below)
Setup
The Graphlit MCP Server exposes your actual Graphlit project: contents, feeds, collections, workflows, conversations, and specifications.
Environment
Create .env with your Graphlit credentials (from Getting Started):
GRAPHLIT_ORGANIZATION_ID=your_org_id_from_portal
GRAPHLIT_ENVIRONMENT_ID=your_env_id_from_portal
GRAPHLIT_JWT_SECRET=your_jwt_secret_from_portalInstall and test locally:
npm install -g graphlit-mcp-server
# or npx graphlit-mcp-server
npx graphlit-mcp-server --testIDE Configuration
Cursor / Windsurf / Cline / Claude Desktop
{
"mcpServers": {
"graphlit": {
"command": "npx",
"args": ["graphlit-mcp-server"],
"env": {
"GRAPHLIT_ORGANIZATION_ID": "${GRAPHLIT_ORGANIZATION_ID}",
"GRAPHLIT_ENVIRONMENT_ID": "${GRAPHLIT_ENVIRONMENT_ID}",
"GRAPHLIT_JWT_SECRET": "${GRAPHLIT_JWT_SECRET}"
}
}
}
}Restart your IDE. Graphlit will appear alongside other MCP tools.
Key MCP Tools (from graphlit-mcp-server)
graphlit-mcp-server)The server registers 60+ tools via registerTools:
Retrieval
queryContents, queryCollections, queryFeeds, queryConversations, retrieveRelevantSources
Conversations
promptConversation (streams via MCP channel)
Ingestion
ingestFile, ingestText, ingestWebPage, ingestEmail, ingestIssue, ingestMessage, ingestFeed
Publishing
publishAudio, publishImage
Operations
configureProject, createCollection, addContentsToCollection, deleteContent, isContentDone
Enumerations
listSlackChannels, listNotionDatabases, listLinearProjects, listGoogleCalendars, etc.
All enumerations, types, and arguments match the TypeScript SDK. For example:
import {
FeedTypes,
FeedListingTypes,
EmailListingTypes,
SearchServiceTypes,
} from 'graphlit-client/dist/generated/graphql-types';Use these same enums in MCP prompts when specifying properties.
Example Prompts (Local Server)
Search Company Knowledge
@graphlit query_contents search="redis failover" searchType=HYBRID limit=5Scope by Collection + Entity
@graphlit query_contents search="pricing" searchType=HYBRID collections=["${GRAPHLIT_COLLECTION_SUPPORT}"] observations=[{"type":"ORGANIZATION","observable":{"id":"${GRAPHLIT_ORG_ACME}"}}]Ingest a File
@graphlit ingest_file path="./runbooks/cache-playbook.pdf" workflow={"id":"${WORKFLOW_ID}"} isSynchronous=truePrompt a Conversation
@graphlit prompt_conversation id="${CONVERSATION_ID}" prompt="Summarize the last three incidents for Acme Corp and list remaining blockers."The MCP server streams token updates back to the IDE when using promptConversation.
Integrating with Other MCP Servers
Combine Graphlit with filesystem, GitHub, database or cloud MCP servers in one config:
{
"mcpServers": {
"graphlit": { ... },
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/path/to/code"]
},
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
}
}
}Now your AI can pull:
Local source files
Open PRs and discussions
Production incidents stored in Graphlit
Slack, email, meetings tied to an account
Production Tips
Separate projects per tenant/team: set
GRAPHLIT_ENVIRONMENT_IDper MCP entry.Persist identifiers: store collection/workflow IDs in env vars to reuse across prompts.
Use
isContentDonebefore prompting to avoid stale context on newly ingested data.Secure secrets: reference OS-level environment variables (
${VAR}) instead of hardcoding values.Log tool output: Cursor and Claude show MCP logs; use them to audit retrieved sources.
Troubleshooting
Run
npx graphlit-mcp-server --testto validate credentials.Confirm Node.js 18+ and that
graphlit-clientinstalls without errors.OAuth-based tools (Slack, Gmail, GitHub) require tokens in the environment; follow instructions in the MCP server README.
If tools fail, inspect IDE MCP logs; most errors surface there (
stdout/stderr).
Next Steps
AI Agents – orchestrate tools from inside Graphlit agents.
Context Engineering – design memory and retrieval strategies.
Knowledge Graph – extract entities your MCP prompts can filter on.
With MCP + Graphlit, your IDE has direct access to the same semantic memory your production agents use. Build smarter tooling without leaving the editor.
Last updated
Was this helpful?