Skip to main content

MCP server for RAGStack knowledge base - search, chat, upload, and scrape

Project description

RAGStack MCP Server

MCP (Model Context Protocol) server for RAGStack knowledge bases. Enables AI assistants to search, chat, upload, and scrape your knowledge base.

Installation

# Using uvx (recommended - no install needed)
uvx ragstack-mcp

# Or install globally
pip install ragstack-mcp

Configuration

Get your GraphQL endpoint and API key from the RAGStack dashboard: Settings → API Key

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "ragstack-kb": {
      "command": "uvx",
      "args": ["ragstack-mcp"],
      "env": {
        "RAGSTACK_GRAPHQL_ENDPOINT": "https://xxx.appsync-api.us-east-1.amazonaws.com/graphql",
        "RAGSTACK_API_KEY": "da2-xxxxxxxxxxxx"
      }
    }
  }
}

Amazon Q CLI

Edit ~/.aws/amazonq/mcp.json:

{
  "mcpServers": {
    "ragstack-kb": {
      "command": "uvx",
      "args": ["ragstack-mcp"],
      "env": {
        "RAGSTACK_GRAPHQL_ENDPOINT": "https://xxx.appsync-api.us-east-1.amazonaws.com/graphql",
        "RAGSTACK_API_KEY": "da2-xxxxxxxxxxxx"
      }
    }
  }
}

Cursor

Open Settings → MCP Servers → Add Server, or edit .cursor/mcp.json:

{
  "ragstack-kb": {
    "command": "uvx",
    "args": ["ragstack-mcp"],
    "env": {
      "RAGSTACK_GRAPHQL_ENDPOINT": "https://xxx.appsync-api.us-east-1.amazonaws.com/graphql",
      "RAGSTACK_API_KEY": "da2-xxxxxxxxxxxx"
    }
  }
}

VS Code + Cline

Edit .vscode/cline_mcp_settings.json:

{
  "mcpServers": {
    "ragstack-kb": {
      "command": "uvx",
      "args": ["ragstack-mcp"],
      "env": {
        "RAGSTACK_GRAPHQL_ENDPOINT": "https://xxx.appsync-api.us-east-1.amazonaws.com/graphql",
        "RAGSTACK_API_KEY": "da2-xxxxxxxxxxxx"
      }
    }
  }
}

VS Code + Continue

Edit ~/.continue/config.json, add to mcpServers array:

{
  "mcpServers": [
    {
      "name": "ragstack-kb",
      "command": "uvx",
      "args": ["ragstack-mcp"],
      "env": {
        "RAGSTACK_GRAPHQL_ENDPOINT": "https://xxx.appsync-api.us-east-1.amazonaws.com/graphql",
        "RAGSTACK_API_KEY": "da2-xxxxxxxxxxxx"
      }
    }
  ]
}

Available Tools

search_knowledge_base

Search for relevant documents in the knowledge base.

Parameter Type Required Default Description
query string Yes - The search query
max_results int No 5 Maximum results to return

chat_with_knowledge_base

Ask questions and get AI-generated answers with source citations.

Parameter Type Required Default Description
query string Yes - Your question
conversation_id string No null ID to maintain conversation context

start_scrape_job

Scrape a website into the knowledge base.

Parameter Type Required Default Description
url string Yes - Starting URL to scrape
max_pages int No 50 Maximum pages to scrape
max_depth int No 3 How deep to follow links (0 = start page only)
scope string No "HOSTNAME" SUBPAGES, HOSTNAME, or DOMAIN
include_patterns list[str] No null Only scrape URLs matching these glob patterns
exclude_patterns list[str] No null Skip URLs matching these glob patterns
scrape_mode string No "AUTO" AUTO, FAST (HTTP only), or FULL (browser)
cookies string No null Cookie string for authenticated sites
force_rescrape bool No false Re-scrape even if content unchanged

Scope values:

  • SUBPAGES - Only URLs under the starting path
  • HOSTNAME - All pages on the same subdomain
  • DOMAIN - All subdomains of the domain

Scrape mode values:

  • AUTO - Try fast mode, fall back to full for SPAs
  • FAST - HTTP only, faster but may miss JavaScript content
  • FULL - Uses headless browser, handles all JavaScript

get_scrape_job_status

Check the status of a scrape job.

Parameter Type Required Description
job_id string Yes The scrape job ID

list_scrape_jobs

List recent scrape jobs.

Parameter Type Required Default Description
limit int No 10 Maximum jobs to return

upload_document_url

Get a presigned URL to upload a document.

Parameter Type Required Description
filename string Yes Name of the file (e.g., 'report.pdf')

Usage Examples

Once configured, just ask your AI assistant naturally:

  • "Search my knowledge base for authentication best practices"
  • "What does our documentation say about API rate limits?"
  • "Scrape the React docs at react.dev/reference"
  • "Check the status of my scrape job"
  • "Upload a new document called quarterly-report.pdf"

Environment Variables

Variable Required Description
RAGSTACK_GRAPHQL_ENDPOINT Yes Your RAGStack GraphQL API URL
RAGSTACK_API_KEY Yes Your RAGStack API key

Development

# Clone and install
cd src/ragstack-mcp
uv sync

# Run locally
uv run ragstack-mcp

# Build package
uv build

# Publish to PyPI
uv publish

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ragstack_mcp-0.1.2.dev6.tar.gz (53.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ragstack_mcp-0.1.2.dev6-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file ragstack_mcp-0.1.2.dev6.tar.gz.

File metadata

  • Download URL: ragstack_mcp-0.1.2.dev6.tar.gz
  • Upload date:
  • Size: 53.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ragstack_mcp-0.1.2.dev6.tar.gz
Algorithm Hash digest
SHA256 6f4b6ecba97cc14852d00c28f6db916b856968193d8010bf811285497915b2a8
MD5 a0527f782a9b220c64e535c7a29e6fda
BLAKE2b-256 432b8d1d4d55237fab481ddc3201db1f13eaa49c074193c5a09b49cbe8a9b1bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ragstack_mcp-0.1.2.dev6.tar.gz:

Publisher: publish-mcp.yml on HatmanStack/RAGStack-Lambda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ragstack_mcp-0.1.2.dev6-py3-none-any.whl.

File metadata

File hashes

Hashes for ragstack_mcp-0.1.2.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 766ecb6885bff8446368b739f18c10513053e0fcff52d9b0e818da6eadeb4b33
MD5 5c3a8cd27b2e2e82aef37923e7c4ca93
BLAKE2b-256 06557d2ddb19aaeb7e1619a47b0a6da23b35d501c8a683cf42a925eab0433a86

See more details on using hashes here.

Provenance

The following attestation bundles were made for ragstack_mcp-0.1.2.dev6-py3-none-any.whl:

Publisher: publish-mcp.yml on HatmanStack/RAGStack-Lambda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page