Graphlit MCP Server

repository·main·Indexed 18 days ago

https://github.com/graphlit/graphlit-mcp-server

A Model Context Protocol (MCP) implementation that connects AI clients (such as Cursor, Windsurf, Goose, or Cline) to the Graphlit platform. It enables RAG-ready knowledge retrieval, data extraction, and ingestion from various developer and product management tools. The server provides tools for retrieval, publishing, web crawling, and managing Graphlit resources including projects, contents, feeds, collections, conversations, workflows, and specifications.

Tokens
11K
Snippets
20
Records
65
Agent score
64%

What's inside graphlit-mcp-server

  1. How Graphlit MCP Server works

    main

    The Graphlit MCP Server acts as a bridge between MCP-compatible clients (like AI coding agents) and the Graphlit platform.

    Core Workflow:

    1. Ingestion: You can ingest data from various sources (Slack, Discord, GitHub, Google Drive, etc.) or via web crawling/search. Documents are automatically converted to Markdown, and audio/video files are transcribed.
    2. Storage: Data is organized into Graphlit resources: Projects, Contents, Feeds, Collections, Workflows, Conversations, and Specifications.
    3. Retrieval & RAG: The server provides tools to query these resources, allowing an LLM to perform Retrieval-Augmented Generation (RAG) using your specific knowledge base.
    4. Automation: Built-in web search and crawling tools remove the need for external integrations like Firecrawl or Exa.
  2. Install the Graphlit MCP Server

    main

    The Graphlit MCP Server allows MCP clients (like Cursor, Windsurf, Goose, or Cline) to integrate with the Graphlit service for RAG-ready knowledge retrieval and ingestion.

    Prerequisites

    • Node.js (version 18.x or higher).
    • An active Graphlit Platform account with access to API settings.

    Installation Methods

    Via Smithery (Claude Desktop)

    Use the Smithery CLI to install automatically:

    npx -y @smithery/cli install @graphlit/graphlit-mcp-server --client claude

    Via VS Code

    1. Use the one-click install buttons in the README (if available).
    2. Or, manually add the configuration to your User Settings (JSON) or a .vscode/mcp.json file in your workspace.

    Via Other IDEs (Windsurf, Cline, Cursor)

    Configure your IDE's MCP settings file (e.g., mcp_config.json, cline_mcp_settings.json, or mcp.json) using the npx command and the required environment variables.

    {
        "mcpServers": {
            "graphlit-mcp-server": {
                "command": "npx",
                "args": [
                    "-y",
                    "graphlit-mcp-server"
                ],
                "env": {
                    "GRAPHLIT_ORGANIZATION_ID": "your-organization-id",
                    "GRAPHLIT_ENVIRONMENT_ID": "your-environment-id",
                    "GRAPHLIT_JWT_SECRET": "your-jwt-secret"
                }
            }
        }
    }
  3. Manage short-term vs long-term memory

    main

    The server supports a scatter-gather pattern for managing information lifecycle:

    1. Short-term Memory: Use ingestMemory to save temporary notes or intermediate states after each workflow step. This is useful for evaluating results of a specific step.
    2. Long-term Memory: Use ingestText to store final, permanent results of a workflow.
    3. Organization: You can collect memories into collections. Use the queryContents tool to retrieve 'memory' contents by their specific collection to track progress and prevent information loss.
  4. Understand Graphlit Platform resources

    main

    The Graphlit MCP Server provides access to several core resource types within a Graphlit project. All resource identifiers are unique GUIDs within a project.

    • project: The container for all ingested contents and workflows.
    • contents: All ingested files, web pages, messages, etc. This includes short-term 'memory' contents.
    • feeds: Data connectors used to ingest contents.
    • collections: Named groups of contents.
    • conversations: Chat message history that utilizes a RAG pipeline for content retrieval.
    • workflows: Definitions of how content is handled during the ingestion process.
    • specifications: LLM configuration presets used by workflows and conversations.
  5. Configure Graphlit MCP Server environment variables

    main

    The server requires specific environment variables for authentication. These can be found in your Graphlit Platform API settings dashboard.

    Required Variables

    • GRAPHLIT_ORGANIZATION_ID: Your organization ID.
    • GRAPHLIT_ENVIRONMENT_ID: Your environment ID.
    • GRAPHLIT_JWT_SECRET: Your JWT secret for signing the JWT token.

    Optional Data Connector Variables

    If you are using data connectors, you may need to provide additional credentials:

    • SLACK_BOT_TOKEN (Slack)
    • DISCORD_BOT_TOKEN (Discord)
    • TWITTER_TOKEN (Twitter/X)
    • GOOGLE_EMAIL_REFRESH_TOKEN, GOOGLE_EMAIL_CLIENT_ID, GOOGLE_EMAIL_CLIENT_SECRET (Google Mail)
    • LINEAR_API_KEY (Linear)
    • GITHUB_PERSONAL_ACCESS_TOKEN (GitHub)
    • JIRA_EMAIL, JIRA_TOKEN (Jira)
    • NOTION_API_KEY (Notion)
  6. Best practices for using Graphlit MCP tools

    main

    Follow these guidelines to ensure reliable interaction with the Graphlit platform:

    • Resource Discovery: Always look for matching resources (e.g., checking for existing workflows) before calling tools.
    • Content Retrieval: If contents are already in a collection, retrieve the collection resource first instead of using retrieveSources to locate individual contents.
    • Project Configuration: Only use the configureProject tool when explicitly asked to change project defaults.
    • URL Accuracy: Never hallucinate URLs. Always retrieve the latest content resources to obtain valid, downloadable URLs.
    • Ingestion Strategy:
      • Use ingestMemory for short-term notes or intermediate research states.
      • Use ingestText for long-term knowledge (e.g., Markdown research results).
      • Use feeds instead of ingestUrl for websites whenever possible for better efficiency.
      • Use ingestGitHubFiles for GitHub repositories instead of ingestUrl.
    • Search Specificity: Use the PODSCAN web search type when searching for podcasts or podcast appearances.
  7. Configure the Graphlit MCP Server in your client

    main

    To use the Graphlit MCP tools, you must configure required environment variables within your MCP client's configuration file (YAML or JSON).

    Important: Do not set these variables directly in your Terminal or shell environment; they must be defined in the MCP client configuration (e.g., in Cursor, Windsurf, or Cline) to be accessible by the server.

  8. Available Graphlit MCP Tools

    main

    The Graphlit MCP Server provides a wide range of tools categorized by functionality:

    Retrieval

    • Query Contents, Query Collections, Query Feeds, Query Conversations
    • Retrieve Relevant Sources, Retrieve Similar Images, Visually Describe Image

    RAG

    • Prompt LLM Conversation

    Extraction

    • Extract Structured JSON from Text

    Publishing

    • Publish as Audio (via ElevenLabs)
    • Publish as Image (via OpenAI)

    Ingestion

    • Files, Web Pages, Messages, Posts, Emails, Issues, Text, Memory (Short-Term)

    Web

    • Web Crawling, Web Search (including Podcast Search), Web Mapping, Screenshot Page

    Operations

    • Configure Project, Create Collection, Add Contents to Collection, Remove Contents from Collection, Delete Collection(s), Delete Feed(s), Delete Content(s), Delete Conversation(s), Is Feed Done?, Is Content Done?

    Notifications

    • Slack, Email, Webhook, Twitter/X
  9. Ingest Dropbox files

    main

    Ingests files from Dropbox into the Graphlit knowledge base. If no path is provided, it ingests from the root folder.

    Required Environment Variables:

    • DROPBOX_APP_KEY
    • DROPBOX_APP_SECRET
    • DROPBOX_REFRESH_TOKEN

    Options:

    • path (string, optional): Relative path to the Dropbox folder (e.g., '/Pictures').
    • readLimit (number, optional): Number of files to ingest. Defaults to 100.
    • recurring (boolean, optional): If true, creates a recurring feed. Defaults to false.
    • repeatInterval (string, optional): ISO 8601 duration for the recurring interval. Only used when recurring is true.
  10. Query project usage with queryProjectUsage

    main

    Retrieve a billable audit log of all Graphlit API operations. The tool returns usage records including metrics like BYTES, TOKENS, UNITS, or REQUESTS, and details such as credits charged, promptTokens, completionTokens, and the specific GraphQL operation performed.

    You can filter results using the inLast parameter, which accepts an ISO 8601 duration string (e.g., PT1H for the last hour, P1D for the last day).

    {
      "inLast": "P1D"
    }
  11. Ingest Twitter/X content via ingestTwitterSearch

    main

    Searches for recent posts from Twitter/X and ingests them into the Graphlit knowledge base. This tool executes asynchronously and returns a feed identifier. You can optionally create a recurring feed to check for new content at a specified interval.

    Required Environment Variable:

    • TWITTER_TOKEN

    Parameters:

    • query (string): The search query for Twitter posts.
    • readLimit (number, optional): Number of posts to ingest. Defaults to 100.
    • recurring (boolean, optional): If true, creates a recurring feed. Defaults to false.
    • repeatInterval (string, optional): ISO 8601 duration for the recurrence (e.g., 'PT15M'). Must be at least 'PT5M'. Only used if recurring is true.