hatena-blog-mcp

hatena-blog-mcp

Enables users to fetch, search, and manage Hatena Blog entries and categories via MCP tools, with caching for fast performance.

Category
Visit Server

README

はてなブログ MCP サーバー

はてなブログの記事を取得・検索するためのMCP(Model Context Protocol)サーバーです。

機能

  • 📝 記事一覧の取得
  • 🔍 キーワードによる記事検索
  • 🏷️ カテゴリ管理(一覧取得、カテゴリ別記事取得)
  • 💾 キャッシュ機能による高速検索

セットアップ

1. 依存関係のインストール

uv sync

2. 環境変数の設定

.envファイルを作成し、以下の環境変数を設定してください:

HATENA_ID=あなたのはてなID
HATENA_BLOG_ID=あなたのブログID
HATENA_API_KEY=あなたのAPIキー

APIキーははてなブログの設定ページから取得できます。

3. キャッシュの管理

# キャッシュを更新(全記事をローカルに保存)
uv run python server.py --update-cache

# キャッシュをクリア
uv run python server.py --clear-cache

4. サーバーの起動

uv run python server.py

※ 初回起動時またはキャッシュが存在しない場合は、自動的にキャッシュを更新します。

利用可能なツール

list_entries

ブログ記事の一覧を取得します。

パラメータ:

  • page_url (optional): ページネーション用URL
  • max_results (optional): 取得する最大記事数(デフォルト: 10)

get_entry

特定の記事の詳細を取得します。キャッシュから取得します。

パラメータ:

  • entry_id: 記事ID

search_entries

記事をキーワードで検索します。キャッシュから高速検索します。

パラメータ:

  • keyword: 検索キーワード
  • max_results (optional): 取得する最大記事数(デフォルト: 10)

get_categories

全てのカテゴリと記事数を取得します。

get_entries_by_category

特定のカテゴリに属する記事を取得します。

パラメータ:

  • category: カテゴリ名
  • max_results (optional): 取得する最大記事数(デフォルト: 10)

キャッシュについて

  • キャッシュは~/.cache/hatena-blog-mcp/ディレクトリに保存されます
  • キャッシュの有効期限は1年間です
  • サーバー起動時にキャッシュがない場合は自動で更新されます
  • --update-cacheオプションでキャッシュを手動更新できます
  • 全ての記事検索と取得はキャッシュから高速に行われます

Claude Desktopでの設定

Claude Desktopの設定ファイルに以下を追加することで、MCPサーバーとして利用できます:

{
  "mcpServers": {
    "hatena-blog": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/hatena-blog-mcp",
        "run",
        "server.py"
      ]
    }
  }
}

/path/to/hatena-blog-mcpは実際のプロジェクトディレクトリのパスに置き換えてください。

設定ファイルの場所:

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

ライセンス

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured