groq-docs-mcp

groq-docs-mcp

Enables users to search Groq's API documentation using natural language queries through an MCP-compatible interface.

Category
访问服务器

README

Groq Documentation MCP Server

An MCP (Model Context Protocol) server that provides semantic search over Groq's documentation using Cloudflare AI Search (AutoRAG) with R2 as the data source.

Features

  • search_documentation Tool: Query Groq's API documentation using natural language
  • AI-Powered RAG: Uses Cloudflare AI Search for semantic search and retrieval
  • Fast & Scalable: Built on Cloudflare Workers for global edge deployment
  • MCP Compatible: Works with Claude Desktop and other MCP clients

Setup Instructions

Prerequisites

  1. Cloudflare account with Workers enabled
  2. Wrangler CLI installed: npm install -g wrangler
  3. Authenticated with Wrangler: wrangler login

1. Install Dependencies

npm install

2. Install and Configure Rclone

Install rclone for fast bulk uploads:

brew install rclone  # macOS
# Or: curl https://rclone.org/install.sh | sudo bash  # Linux

Configure rclone for R2:

rclone config
# Choose 'n', name: 'r2', storage: 5, provider: 24
# Enter your Account ID and R2 API Token

3. Create R2 Bucket

wrangler r2 bucket create groq-docs

4. Scrape Documentation

Set up Browser Rendering API credentials:

export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export CLOUDFLARE_API_TOKEN="your-api-token"

Run the scraper:

npm run scrape

This will:

  • Use Browser Rendering API for clean content extraction
  • Scrape all pages from https://console.groq.com/docs
  • Save locally to ./scraped-docs/
  • Bulk upload to R2 using rclone

Note: Takes several minutes depending on page count.

5. Configure AI Search (Manual)

In the Cloudflare Dashboard:

  1. Go to AI > AI Search
  2. Create a new AI Search instance named groq-docs-ai-search
  3. Configure the data source:
    • Select R2 as the data source
    • Choose the groq-docs bucket
  4. Select embedding and generation models (use defaults)
  5. Set up AI Gateway for monitoring
  6. Assign a Service API token
  7. Wait for indexing to complete (monitor in the AI Search dashboard)

6. Deploy the Worker

Deploy the MCP server to Cloudflare Workers:

npm run deploy

Your server will be available at: groq-docs-mcp.<your-account>.workers.dev/mcp or groq-docs-mcp.<your-account>.workers.dev/sse

Usage

Connect to Claude Desktop

To use this MCP server with Claude Desktop:

  1. Open Claude Desktop settings
  2. Go to Settings > Developer > Edit Config
  3. Add this configuration:
{
  "mcpServers": {
    "groq-docs": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://groq-docs-mcp.<your-account>.workers.dev/sse"
      ]
    }
  }
}
  1. Restart Claude Desktop

Connect to Cloudflare AI Playground

  1. Go to https://playground.ai.cloudflare.com/
  2. Enter your deployed MCP server URL: groq-docs-mcp.<your-account>.workers.dev/sse
  3. Start using the search_documentation tool!

Example Queries

Try asking:

  • "How do I use the Groq API?"
  • "What models are available on Groq?"
  • "How do I implement streaming with Groq?"
  • "What are the rate limits for Groq API?"
  • "How do I use OpenAI compatibility with Groq?"

Development

Local Development

Run the server locally:

npm run dev

The server will be available at http://localhost:8787

Type Checking

Generate types for Cloudflare bindings:

npm run cf-typegen

Check types:

npm run type-check

Code Formatting

Format code with Biome:

npm run format
npm run lint:fix

Project Structure

groq-docs-mcp/
├── src/
│   └── index.ts           # Main MCP server implementation
├── scripts/
│   └── scrape-groq-docs.js # Documentation scraper script
├── scraped-docs/          # Local cache of scraped docs (git-ignored)
├── package.json           # Dependencies and scripts
├── wrangler.jsonc         # Cloudflare Worker configuration
└── README.md             # This file

How It Works

  1. Scraping: Uses Cloudflare Browser Rendering API to extract clean markdown from Groq's documentation
  2. Storage: Documentation is stored as markdown files in R2 (uploaded via rclone)
  3. Indexing: Cloudflare AI Search indexes the R2 content using embeddings
  4. Query: The MCP tool queries the AI Search index and returns relevant documentation snippets
  5. Results: Formatted results include URLs, titles, content, and relevance scores

Troubleshooting

Scraper Issues

If the scraper fails:

  • Check your internet connection
  • Verify Groq's documentation site is accessible
  • Ensure Wrangler is authenticated: wrangler whoami

AI Search Not Working

If searches return no results:

  • Verify the AI Search instance is created and named groq-docs-ai-search
  • Check that indexing is complete in the AI Search dashboard
  • Ensure the R2 bucket contains the scraped files: wrangler r2 object list groq-docs

Worker Deployment Issues

If deployment fails:

  • Verify Wrangler is up to date: npm install -g wrangler@latest
  • Check your Cloudflare account has Workers enabled
  • Ensure the R2 bucket exists: wrangler r2 bucket list

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选