Skip to main content
Glama
mcp-server-qiita-researcher

mcp-server-qiita-researcher

by AkashiShogo

mcp-server-qiita-researcher

単なるAPIラッパーではなく、リサーチアシスタント。

npm version License: MIT Buy Me A Coffee

English README


⚡ 3秒で始める

Claude Desktopの設定ファイルに、これを貼るだけ:

{
  "mcpServers": {
    "qiita-researcher": {
      "command": "npx",
      "args": ["-y", "mcp-server-qiita-researcher"],
      "env": {
        "QIITA_ACCESS_TOKEN": ""
      }
    }
  }
}

Claude Desktopを再起動 → 完了🎉

Claude Desktop:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

ファイルが存在しない場合は新規作成してください。

トークンなし: 60リクエスト/時 トークンあり: 1000リクエスト/時

  1. Qiitaトークン設定にアクセス

  2. 読み取り権限で新しいトークンを作成

  3. トークンを上記のQIITA_ACCESS_TOKENに貼り付け


Related MCP server: Qiita API MCP Server

なぜこのMCPサーバー?

ほとんどのQiita MCPサーバーは、Qiita APIの薄いラッパーに過ぎません。 mcp-server-qiita-researcherは、3つの革新的な機能で差別化を図っています。

🎯 スマートリーディング:記事+有益なコメント

キラー機能 - 記事だけでなく、最も価値のあるコメント(リアクション数順TOP3)を1回の呼び出しで取得

  • 並列API呼び出しによる高速化

  • コミュニティの知見や洞察を自動収集

  • トークン効率化のためのHTMLクリーンアップ

📈 トレンドスカウト:ワンクリックでトレンド発見

複雑なクエリ構文や日付計算なしで、Qiitaのトレンド記事を発見

  • weekly:過去7日間、20ストック以上

  • monthly:過去30日間、50ストック以上

  • new_arrival:過去2日間、5ストック以上

  • オプションでトピック絞り込み

🔍 ノイズ削減:品質重視の検索

デフォルトで低品質な記事を自動的に除外(ストック数閾値は設定可能)

  • クエリに自動でstocks:>Nフィルタを追加

  • トークン負荷の高いHTML(iframe、画像、スクリプト)を削除

  • 段落境界でのスマート切り詰め


他のQiita MCPサーバーとの比較

機能

本サーバー

他

記事+コメント同時取得

✅ 並列取得

❌ 記事のみ

自動品質フィルタリング

✅ ストック閾値

❌ なし

トレンド自動計算

✅ ワンクリック

❌ 手動クエリ

HTMLクリーンアップ

✅ cheerio

❌ なし

日本語エラーメッセージ

✅ 完全対応

⚠️ 英語のみ

型安全性

✅ TypeScript + Zod

⚠️ 部分的


使い方

Claudeに自然に話しかけるだけ:

💬 「Qiitaで『TypeScript』のトレンド記事を教えて」 → get_tech_trends で週間トレンドを自動収集

💬 「『React hooks』について検索して」 → search_articles で高品質記事のみをフィルタリング

💬 「このQiita記事を要約して: https://qiita.com/.../items/abc123」 → read_article_smart で記事+有益なコメントを一括取得


設定ファイル

~/.claude.json を編集:

{
  "mcpServers": {
    "qiita-researcher": {
      "command": "npx",
      "args": ["-y", "mcp-server-qiita-researcher"],
      "env": {
        "QIITA_ACCESS_TOKEN": ""
      }
    }
  }
}

起動

claude

Claudeで試してみる:

Qiitaで「React」のトレンドを教えて

✅ 3つのツール(search_articles、get_tech_trends、read_article_smart)が使えるようになります


コードを修正・カスタマイズしたい場合:

クローンとビルド

git clone https://github.com/yourusername/mcp-server-qiita-researcher.git
cd mcp-server-qiita-researcher
npm install
npm run build

設定ファイル

npxの代わりにnodeを使用:

{
  "mcpServers": {
    "qiita-researcher": {
      "command": "node",
      "args": ["/絶対パス/mcp-server-qiita-researcher/build/index.js"],
      "env": {
        "QIITA_ACCESS_TOKEN": ""
      }
    }
  }
}

絶対パスの確認:

cd mcp-server-qiita-researcher
pwd

開発コマンド

npm run dev    # ウォッチモード(変更を自動検知)
npm run build  # ビルド
npm start      # 起動確認

プロジェクト構造

src/
├── index.ts              # MCPサーバーエントリーポイント
├── qiitaClient.ts        # Qiita APIクライアント
├── types.ts              # Zodスキーマ + TypeScript型
├── constants.ts          # 設定
└── utils/
    ├── dateUtils.ts      # 日付計算
    ├── queryBuilder.ts   # クエリ構築
    ├── htmlCleaner.ts    # HTMLクリーンアップ(cheerio)
    └── textTruncator.ts  # スマート切り詰め

search_articles - 品質重視の検索

{
  "query": "React hooks",           // 検索キーワード
  "sort": "stock",                  // "rel" (関連度順) | "stock" (ストック数順)
  "threshold_stocks": 20            // 最小ストック数(デフォルト: 10)
}

動作:

  • 低品質記事を自動除外

  • トークン効率の良いクリーンなサマリーを返却


{
  "scope": "weekly",                // "weekly" | "monthly" | "new_arrival"
  "topic": "React"                  // オプション:タグで絞り込み
}

動作:

  • 日付範囲を自動計算

  • 適切なストック閾値を適用

  • 複雑なクエリ構文なしでトレンド記事を取得


read_article_smart ⭐ - 記事+コメント一括取得

{
  "item_id": "abc123def456"         // URLの末尾ID
}

キラー機能:

  • 記事本文+リアクション数TOP3コメントを並列取得

  • 記事だけでは得られないコミュニティの知見を提供

  • 20,000文字を超える場合のスマート切り詰め

取得内容:

  • 記事メタデータ(タイトル、著者、作成日、ストック数、いいね数、タグ)

  • クリーンな記事本文(HTML除去済み)

  • リアクション数順のトップ3コメント


ツールが認識されない

npx版

# 動作確認
npx -y mcp-server-qiita-researcher

# キャッシュクリア
npm cache clean --force

期待される出力:

Qiita Researcher MCP Server started successfully
Version: 1.0.0

ソースコード版

# ビルド確認
npm run build
ls build/index.js

# パス確認
pwd  # この出力が設定ファイルのパスと一致するか確認

→ Claudeを完全再起動(すべてのウィンドウを閉じる)


よくあるエラー

「Qiita APIのレート制限に達しました」

原因: リクエスト制限に到達

解決策:

  1. エラーメッセージに表示された時間まで待つ

  2. Qiitaアクセストークンを設定(60 → 1000リクエスト/時)

「指定された記事が見つかりませんでした」

原因: 記事IDが間違っているか、記事が非公開/削除

解決策:

  • URLから記事IDを確認

  • 記事が公開されているか確認


エラーハンドリング

サーバーは実用的な日本語エラーメッセージを提供:

  • 429(レート制限): Retry-Afterヘッダーから具体的な再試行時間を提示

  • 404(見つからない): 「記事が見つかりませんでした」という明確なメッセージ

  • 401(認証エラー): 無効なアクセストークンの通知

  • ネットワークエラー: 接続失敗の詳細


機能一覧

  • 3つのインテリジェントツール

    • search_articles - 品質重視の記事検索

    • get_tech_trends - ワンショットトレンド収集

    • read_article_smart - 記事+コメントを1回で取得

  • トークン効率

    • cheerioによるHTMLクリーンアップ

    • スマートなテキスト切り詰め(20,000文字制限)

    • ノイズを削減し、シグナルを維持

  • 堅牢なエラーハンドリング

    • レート制限検出(429)と具体的な再試行時間の提示

    • 日本語での実用的なエラーメッセージ

    • グレースフルデグラデーション

  • 型安全性

    • 完全なTypeScript実装

    • ランタイム検証のためのZodスキーマ

    • 包括的なエラー型定義


Disclaimer / 免責事項

This tool allows users to search and summarize Qiita articles using the official Qiita API.

  • This is an unofficial tool and is not affiliated with Qiita Inc.

  • Please ensure you comply with Qiita's Terms of Service and API Policy when using this tool.

  • The developer is not responsible for any issues or damages arising from the use of this tool.

本ツールはQiita公式APIを使用して記事を検索・要約する非公式ツールです。

  • Qiita株式会社とは一切関係ありません。

  • 利用の際は、必ずQiita利用規約およびAPI利用規約を遵守してください。

  • 本ツールの使用により生じた問題や損害について、開発者は一切の責任を負いません。


ライセンス

MIT License - 詳細はLICENSEを参照してください。


コントリビューション

コントリビューションを歓迎します!お気軽にPull Requestを送ってください。


作者

AKASHI SHOGO


謝辞

Available Tools

3 tools
read_article_smartA

Qiita記事の本文と、最も有益なコメント(リアクション数が多い上位3件)を取得します。これがこのサーバーの「キラー機能」です。記事とコメントを並列取得し、HTMLをクリーンアップして、AIが理解しやすい形式に変換します。

特徴:

  • 記事本文 + 価値の高いコメントを一度に取得

  • 並列API呼び出しで高速レスポンス

  • HTMLタグを除去してトークン効率を最大化

  • 20,000文字を超える場合は賢く切り詰め

使用例:

  • 記事を読みながら、コミュニティの有益なフィードバックも同時に確認

  • 記事だけでは分からない実践的なTipsをコメントから発見

  • 技術的な議論や補足情報を効率的に収集

IMPORTANT: When summarizing or explaining specific articles, you MUST clearly state the Title and URL of the source article at the beginning or end of the summary to ensure proper attribution.

Inputs: item_id (required).

search_articlesB

Qiita記事を検索します。デフォルトでストック数によるフィルタリングを行い、質の高い記事を優先的に取得します。ノイズの多い低品質な記事を自動的に除外することで、信頼性の高い情報を効率的に見つけることができます。

使用例:

  • 「TypeScript 型推論」で検索し、ストック数10以上の記事のみ取得

  • 人気順にソートして最も参考にされている記事を発見

  • threshold_stocksを調整して品質基準を変更可能

Inputs: query (required), sort, threshold_stocks.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools have mostly distinct purposes: trend discovery, article reading with comments, and keyword search. There is some conceptual overlap between get_tech_trends and search_articles because both surface article lists, but the descriptions make the intended use cases reasonably clear.

    Naming Consistency4/5

    All names use snake_case and begin with a verb, giving a predictable verb_noun pattern. The only minor deviation is the extra adjective in read_article_smart, but it remains readable and consistent with the overall style.

    Tool Count5/5

    Three tools is a well-scoped set for a focused Qiita research server: discover trends, search articles, and read an article with comments. Each tool has a clear role and there are no redundant or filler tools.

    Completeness4/5

    The surface covers the core research workflow of finding trends, searching articles, and reading article content with top comments. Minor gaps remain, such as dedicated topic/tag browsing or standalone comment retrieval, but these are not blocking for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides Claude with real-time access to Wikipedia through four essential tools: search articles, get full content, retrieve summaries, and find related articles. Enables comprehensive Wikipedia research workflows with structured data access and no API keys required.
      -
    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Qiita, a Japanese developer community platform, through its API v2. Supports comprehensive operations including article management, user interactions, tag following, and commenting with Japanese language support.
      30
      8 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables searching and browsing Qiita articles, including filtering by tags and users, retrieving comments, and accessing bookmarked articles. Supports both public Qiita and private Qiita Team instances.
      7
      MIT