MCP.so
登录

LeetCode Crawler

@louisfghbvc

关于 LeetCode Crawler

mcp server for craw the interview questions in discussion

基本信息

分类

浏览器自动化

运行时

python

传输方式

stdio

发布者

louisfghbvc

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-leetcode-crawler": {
      "command": "python",
      "args": [
        "cli.py",
        "--company",
        "google",
        "--pages",
        "10"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is LeetCode Crawler?

LeetCode Crawler is an MCP server that crawls LeetCode interview discussion forums filtered by company tag, optionally enriches posts with Claude AI to extract structured fields, and exposes the data via four stdio-based tools for Claude Desktop and Claude Code.

How to use LeetCode Crawler?

Install by cloning the repository and running pip install -r requirements.txt. Use the CLI (e.g., python cli.py --company google --pages 10 --enrich) or run the MCP server directly (python mcp_server.py) and register it with Claude Desktop using mcp install mcp_server.py. Key configuration options include --company, --pages, --since, and --enrich (requires ANTHROPIC_API_KEY).

Key features of LeetCode Crawler

  • Crawls LeetCode discussion forums by company tag (google, meta, amazon, etc.)
  • Classifies posts into types: leetcode, discuss_link, discussion
  • Deduplicates and groups discussions by title and company across pages
  • Optionally enriches posts with AI-extracted fields (problem name, stage, difficulty, outcome)
  • Saves results to CSV with per-company cache or monthly output
  • Exposes four MCP tools: search_discussions, get_hot_problems, get_thread, refresh

Use cases of LeetCode Crawler

  • Research LeetCode interview questions for a specific company (e.g., Google, Meta)
  • Analyze discussion frequency to identify hot problems for interview preparation
  • Enrich posts with extracted difficulty and interview stage for structured analysis
  • Cache data locally for offline or repeated use without re-crawling
  • Integrate with Claude Desktop or Claude Code for real-time question lookups

FAQ from LeetCode Crawler

What MCP tools does the server expose?

The server provides four tools: search_discussions(company, days) to filter cached posts, get_hot_problems(company, limit) to get top problems by frequency, get_thread(post_id) for real-time single-thread fetch, and refresh(company, num_pages, days, enrich) to crawl and rebuild the cache.

What does AI enrichment cost?

Enrichment uses claude-haiku-4-5-20251001 at approximately $0.001 per post. Already-enriched posts are skipped on re-run.

How is data cached and stored?

Data is cached in ./cache/{company}_questions.csv as per-company CSV files. The refresh tool must be run once to populate the cache before using search_discussions or get_hot_problems.

What are the runtime requirements?

Python 3.12+ is required. The ANTHROPIC_API_KEY environment variable is needed only when using the --enrich flag or enrich=True in the MCP refresh tool.

What transport and authentication does the server use?

The MCP server communicates over stdio transport. No external authentication is required; the only authentication needed is the Anthropic API key for optional AI enrichment.

评论

浏览器自动化 分类下的更多 MCP 服务器