Grokipedia MCP Server

Grokipedia MCP Server

Enables searching and retrieving articles, citations, and structured content from Grokipedia for research and information retrieval. It provides specialized tools for section extraction, related page discovery, and filtered search results.

Category
访问服务器

README

Add to Cursor Add to VS Code Add to Claude Add to ChatGPT Add to Codex Add to Gemini

Grokipedia MCP Server

smithery badge

<a href="https://glama.ai/mcp/servers/@skymoore/grokipedia-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@skymoore/grokipedia-mcp/badge" alt="Grokipedia MCP Server" /> </a>

MCP server for searching and retrieving content from Grokipedia

The User of the MCP assumes full responsibility for interacting with Grokipedia.

Please see the Xai Terms of Service if you have any doubts.

Elon, please don't sue me. I only wanted my agents to have access to truthful information and stop referencing wikipedia all the time.

Quick Start

Add this to your MCP configuration file:

{
  "mcpServers": {
    "grokipedia": {
      "command": "uvx",
      "args": ["grokipedia-mcp"]
    }
  }
}

Verifying Installation

You should see the Grokipedia server available with these tools:

  • search - Search with filters
  • get_page - Get page overview
  • get_page_content - Get full content
  • get_page_citations - Get citations
  • get_related_pages - Get linked pages
  • get_page_sections - List all section headers
  • get_page_section - Extract specific sections

And these prompts:

  • research_topic - Research workflow
  • find_sources - Find citations
  • explore_related - Explore connections
  • compare_topics - Compare two topics

Features

  • Search with Filters: Search with sorting (relevance/views) and filtering (min views)
  • Page Content: Retrieve articles, citations, and metadata with smart truncation
  • Related Pages: Discover linked/related articles
  • Section Extraction: Get specific sections from long articles
  • Smart Suggestions: Helpful alternatives when pages aren't found
  • Guided Prompts: Pre-built workflows for research, sources, exploration

Installation (Development)

Using uv:

cd grokipedia-mcp
uv sync

For development with MCP Inspector and CLI tools:

uv sync --dev

Usage

Run with MCP Inspector (Development)

The fastest way to test and debug (requires dev dependencies):

uv run --dev mcp dev main.py

This launches the MCP Inspector UI where you can:

  • Explore available tools
  • Test search queries
  • Retrieve page content
  • View structured output

Run Directly

# Using the installed entry point
uv run grokipedia-mcp

# Or as a Python module
uv run python -m grokipedia_mcp

# Or directly
uv run python main.py

Available Tools

search

Search for articles in Grokipedia with filtering and sorting options.

Parameters:

  • query (string, required) - Search query
  • limit (int, optional, default: 12) - Maximum number of results
  • offset (int, optional, default: 0) - Pagination offset
  • sort_by (string, optional, default: "relevance") - Sort by "relevance" or "views"
  • min_views (int, optional) - Filter to articles with at least this many views

Returns: List of search results with title, slug, snippet, relevance score, and view count.

Examples:

// Basic search
{"query": "machine learning", "limit": 5}

// Sort by most viewed
{"query": "python", "sort_by": "views"}

// Filter popular articles only
{"query": "artificial intelligence", "min_views": 1000}

get_page

Get complete page information including metadata, content preview, and citations summary. Includes smart suggestion of alternatives if page not found.

Parameters:

  • slug (string, required) - Article identifier (from search results)
  • max_content_length (int, optional, default: 5000) - Maximum content length

Returns: Complete page object with metadata, truncated content, and citation summaries.

Features:

  • Suggests similar pages if the requested slug doesn't exist
  • Provides overview with content preview and citations

Use this when: You need an overview of a page with metadata and a content preview.

Example:

{"slug": "Machine_learning"}

get_page_content

Get only the article content without citations or metadata.

Parameters:

  • slug (string, required) - Article identifier
  • max_length (int, optional, default: 10000) - Maximum content length

Returns: Only the article content (title and content text).

Use this when: You need to read the full article content without citations.

Example:

{"slug": "Machine_learning", "max_length": 15000}

get_page_citations

Get the citations list for a specific page.

Parameters:

  • slug (string, required) - Article identifier
  • limit (int, optional) - Maximum number of citations to return (returns all if not specified)

Returns: List of citations with titles, URLs, and descriptions. Includes total count and returned count.

Use this when: You need to access source references and citations.

Examples:

// Get all citations
{"slug": "Machine_learning"}

// Get first 10 citations only
{"slug": "Machine_learning", "limit": 10}

get_related_pages

Get pages that are linked from a specific article.

Parameters:

  • slug (string, required) - Article identifier
  • limit (int, optional, default: 10) - Maximum number of related pages to return

Returns: List of related/linked pages with titles and slugs.

Use this when: You want to discover related topics or explore connections between articles.

Examples:

// Get related pages
{"slug": "Machine_learning"}

// Get more related pages
{"slug": "Quantum_computing", "limit": 20}

get_page_sections

Get a list of all section headers in an article.

Parameters:

  • slug (string, required) - Article identifier

Returns: List of all section headers with their levels (h1, h2, h3, etc.).

Use this when: You want to see the structure/outline of an article before reading specific sections.

Example:

{"slug": "Machine_learning"}

get_page_section

Extract a specific section from an article by header name.

Parameters:

  • slug (string, required) - Article identifier
  • section_header (string, required) - Section header to extract (case-insensitive)
  • max_length (int, optional, default: 5000) - Maximum section content length

Returns: Content of the specified section only.

Use this when: You need just one section of a long article (e.g., "Applications", "History", "Examples").

Examples:

// Get specific section
{"slug": "Neural_networks", "section_header": "Applications"}

// Get longer section
{"slug": "Python", "section_header": "Syntax", "max_length": 10000}

Note: Articles can be 100,000+ characters. Content is automatically truncated to prevent overwhelming LLM context windows. Use the max_length parameters to control the amount returned.

Prompts

The server provides pre-built prompts for common workflows:

research_topic

Guided workflow to research a topic: search → retrieve → analyze related pages and citations

find_sources

Find authoritative sources and citations for academic/research purposes

explore_related

Discover connections between topics and suggested further reading

compare_topics

Compare two topics side-by-side with their content and citations

Architecture

The server uses:

  • FastMCP for declarative MCP server implementation
  • grokipedia-api-sdk AsyncClient for API communication
  • Lifespan context for client connection management
  • Structured output using Pydantic models from the SDK
  • Comprehensive error handling with specific exception types

Error Handling

The server handles various error scenarios:

  • ValueError for invalid parameters or not found pages
  • RuntimeError for network or API errors
  • Detailed logging at debug, info, warning, and error levels

Development

Project Structure

grokipedia-mcp/
├── grokipedia_mcp/
│   ├── __init__.py       # Package exports
│   ├── __main__.py       # CLI entry point
│   └── server.py         # FastMCP server implementation
├── main.py               # Direct execution entry point
├── pyproject.toml        # Project configuration
└── README.md             # This file

Testing

Use the MCP Inspector for interactive testing:

uv run mcp dev main.py

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选