RA

Ragie MCP Server: Context from Google Drive, Notion

Retrieve context from your Ragie knowledge base via the MCP server, integrating Google Drive, Notion, JIRA and other sources for smarter results.

Quick Install
npx -y @ragieai/ragie-mcp-server

Overview

Ragie MCP Server implements the Model Context Protocol (MCP) to surface relevant context from a configurable knowledge base for use by LLMs and other inference systems. It acts as a connector layer that indexes or queries external sources — for example Google Drive, Notion, and JIRA — and exposes that context through a simple HTTP MCP-compatible API. The server is intended to be run alongside a model or chain that needs live, up-to-date context beyond what the model can memorize.

Using an MCP server reduces prompt engineering overhead: instead of stuffing entire documents into prompts, the model requests compact, scored context snippets relevant to the current query. This improves accuracy, reduces token costs, and makes it easier to combine many heterogeneous sources (documents, tickets, notes) into a single, ranked context response.

Features

  • Integrates with popular knowledge sources: Google Drive, Notion, JIRA (and others via adapters)
  • Exposes a standard MCP-compatible HTTP API to request context for a query
  • Returns scored, chunked context snippets and metadata (source, link, timestamp)
  • Supports configurable connectors and simple runtime configuration via environment variables or Docker
  • Lightweight, made to run alongside your model stack or as a shared context service for teams

Installation / Configuration

Clone and run the server locally or via Docker.

Clone repository:

git clone https://github.com/ragieai/ragie-mcp-server.git
cd ragie-mcp-server

Install and run with Node (if the project uses Node):

# install dependencies
npm install

# set env vars (see table below) then
npm run build
npm start

Run via Docker:

# build image
docker build -t ragie-mcp-server .

# run container (example)
docker run -p 3000:3000 \
  -e PORT=3000 \
  -e GOOGLE_CREDENTIALS_JSON='{"type":...}' \
  -e NOTION_TOKEN='secret_xxx' \
  -e JIRA_BASE_URL='https://yourorg.atlassian.net' \
  -e JIRA_EMAIL='[email protected]' \
  -e JIRA_API_TOKEN='api_token' \
  ragie-mcp-server

Example .env

PORT=3000
GOOGLE_CREDENTIALS_JSON={"type":"service_account",...}
NOTION_TOKEN=secret_xxx
JIRA_BASE_URL=https://yourorg.atlassian.net
[email protected]
JIRA_API_TOKEN=xxxx

Default port: 3000 (can be overridden with PORT env var).

Environment Variables (commonly used)

VariableDescription
PORTHTTP server port (default 3000)
GOOGLE_CREDENTIALS_JSONJSON string of Google service account credentials for Drive API
NOTION_TOKENNotion integration token
JIRA_BASE_URLJira instance base URL
JIRA_EMAILJira account email (for API auth)
JIRA_API_TOKENJira API token

Connector-specific credentials are required for the respective adapters to access data. Use least-privilege service accounts/tokens and restrict scopes to the resources the server needs.

Available Tools / Resources

  • Connectors: Google Drive, Notion, JIRA (others can be added via an adapter interface)
  • MCP-compatible HTTP endpoint (see example requests)
  • Optional indexing or on-demand retrieval modes (depends on connector capabilities)
  • Source metadata in responses: document title, URL, last modified, and score

If you need to add another source, implement the connector interface (fetch documents, chunk and embed or pass-through snippets, return metadata). Check the repository for connector templates and examples.

Example MCP Request

A typical MCP request asks for context related to a short query. Example using curl:

curl -X POST "http://localhost:3000/mcp" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "How do I configure SSO for our product?",
    "top_k": 5
  }'

Example response (simplified):

{
  "query": "How do I configure SSO for our product?",
  "results": [
    {
      "id": "gdrive:12345",
      "text": "To enable SSO, go to Admin > Security ...",
      "score": 0.92,
      "source": "Google Drive",
      "url": "https://drive.google.com/file/d/12345",
      "modified_at": "2025-02-12T10:00:00Z"
    }
  ]
}

Use Cases

  • Augment chatbots and assistants with live company docs: return precise snippets from policies, runbooks, and design docs.
  • Contextualize model responses for customer support: fetch relevant JIRA tickets and KB articles to provide current ticket context in replies.
  • Summarization pipelines: gather the most relevant document fragments to feed into a summarizer or to produce an extractive summary.
  • Code and documentation search: surface code snippets, PRs or design notes from Drive/Notion when a developer asks about implementation details.
  • Compliance and audit: provide source attribution and timestamps so models can point to authoritative documents.

Tips and Troubleshooting

  • Ensure connectors have appropriate API scopes; missing scopes are the most common cause of failures.
  • For large knowledge bases, prefer an indexing/embedding layer or caching to avoid long latencies on every request.
  • Monitor response sizes and token usage if you plan to stitch multiple snippets into model prompts.
  • Check logs for connector-specific errors (auth failures, rate limits).

For full developer reference, examples, and connector templates, see the GitHub repository: https://github.com/ragieai/ragie-mcp-server/