Gartner 研究检索与阅读 MCP 服务器

为 AI 助手提供 Gartner 研究报告搜索、全文阅读、PDF 下载及 AskGartner AI 问答能力的 MCP 服务器,适用于需要获取 Gartner 研究内容的场景。

  • by rosskukulinski
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 rosskukulinski/gartner-mcp

使用说明

Gartner MCP Server

A Model Context Protocol (MCP) server that provides access to Gartner.com research from AI assistants like Claude.

Features

  • Search — Search Gartner's research library by keyword, sorted by relevance or date
  • Read Documents — Fetch the full text content of any Gartner research document
  • Download PDFs — Download official Gartner PDFs to your local machine
  • AskGartner AI — Ask research questions and get AI-generated answers with source citations
  • Conversation History — Retrieve past AskGartner conversations

Requirements

  • Python 3.12+
  • uv package manager
  • A Gartner account with research access

Setup

# Clone the repository
git clone https://github.com/rosskukulinski/gartner-mcp.git
cd gartner-mcp

# Install dependencies
uv sync

# Install Playwright's Chromium browser
uv run playwright install chromium

Configuration

Add the server to your MCP client configuration. For Claude Code, add to .mcp.json:

{
  "mcpServers": {
    "gartner": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/gartner-mcp", "python", "-m", "gartner_mcp"]
    }
  }
}

Tools

gartner_login

Authenticate with Gartner. Opens a browser window for login (handles CAPTCHA/MFA). The browser stays open during the session to maintain access to Cloudflare-protected APIs.

Parameter Type Required Description
email string yes Gartner account email
password string no Account password. If omitted, enter it manually in the browser.

gartner_search

Search for Gartner research documents.

Parameter Type Required Description
query string yes Search terms
max_results int no Maximum results to return (default: 10)
sort string no "relevance", "date_desc", or "date_asc"

gartner_get_document

Read a Gartner document's full text content.

Parameter Type Required Description
document_id int yes Gartner document ID

gartner_download_pdf

Download a Gartner document as a PDF file.

Parameter Type Required Description
document_id int yes Gartner document ID
output_path string no File path to save the PDF (default: ./gartner_{id}.pdf)

gartner_ask

Ask a question using AskGartner AI.

Parameter Type Required Description
question string yes Your research question
conversation_id string no Conversation ID for follow-up questions

gartner_ask_history

Get AskGartner conversation history.

Parameter Type Required Description
limit int no Maximum entries to return (default: 20)

Usage

Once configured, interact with Gartner through your MCP client:

  1. Login — Authenticate with your Gartner credentials (a browser window will open)
  2. Search — Find research documents by topic
  3. Read or Download — Get full document content or download the PDF

Example workflow in Claude:

"Login to Gartner with my email, search for the Magic Quadrant for API Management, and download the PDF."

How It Works

The server uses two different HTTP paths depending on the Gartner endpoint:

  • Search & AskGartner — Uses httpx with persistent cookies. These APIs are on separate domains (searchapi.pdo.aws.gartner.com, searchapi.gartner.com) not behind Cloudflare.
  • Documents & PDFs — Uses the live Playwright browser from the login session. The www.gartner.com document API is behind Cloudflare's bot protection, so requests must come from a real browser context. The server navigates to the document reader page and intercepts the API responses.

License

MIT