LGTMeow

LGTMeow MCPサーバー

LGTMeow は、MCP(Model Context Protocol)に対応したリモートMCPサーバーを提供しています。MCPを利用すると、AIエージェントから猫のLGTM画像を簡単に呼び出すことができるようになります。

使用例:

  • レビュー結果に応じてAIが自動でLGTM画像を挿入する
  • 「LGTM画像ください」と依頼して、Markdownを受け取る

利用可能ツール

get_random_lgtm_images

ランダムに選択されたLGTM画像のリストを返します。

レスポンス形式: application/json

レスポンス例:

{
"lgtmImages": [
{
"id": "1",
"url": "https://lgtm-images.lgtmeow.com/2021/03/16/23/5947f291-a46e-453c-a230-0d756d7174cb.webp"
},
{
"id": "2",
"url": "https://lgtm-images.lgtmeow.com/2021/03/16/23/6947f291-a46e-453c-a230-0d756d7174cb.webp"
}
]
}

get_recently_created_lgtm_images

最近作成されたLGTM画像のリストを返します。

レスポンス形式: application/json

レスポンス例:

{
"lgtmImages": [
{
"id": "1",
"url": "https://lgtm-images.lgtmeow.com/2021/03/16/23/5947f291-a46e-453c-a230-0d756d7174cb.webp"
},
{
"id": "2",
"url": "https://lgtm-images.lgtmeow.com/2021/03/16/23/6947f291-a46e-453c-a230-0d756d7174cb.webp"
}
]
}

get_random_lgtm_markdown

Markdown 形式の LGTM 画像を 1 件返します。PRコメントなどにそのまま貼り付け可能です。

レスポンス形式: application/json

レスポンス例:

{
"markdown": "[![LGTMeow](https://lgtm-images.lgtmeow.com/2022/03/23/10/9738095a-f426-48e4-be8d-93f933c42917.webp)](https://lgtmeow.com)"
}

MCPクライアントの設定方法

LGTMeow MCP Server は、リモート(SSE)方式のみ提供しています。

認証について

認証不要で利用できます。API キーやトークンの設定は不要です。

サーバー URL

https://api.lgtmeow.com/sse

お使いの MCP クライアントが SSE を「直接サポートしているか」に応じて、以下の 3 パターンのいずれかを利用してください。

1. SSE を直接サポートするクライアントの場合

{
"mcpServers": {
"lgtmeow": {
"type": "sse",
"url": "https://api.lgtmeow.com/sse"
}
}
}

2. Node 環境 / mcp-remote を使う場合

クライアントが SSE を直接サポートしない場合、mcp-remote を利用して SSE → stdio をブリッジできます。

{
"mcpServers": {
"lgtmeow": {
"command": "npx",
"args": ["mcp-remote", "https://api.lgtmeow.com/sse"]
}
}
}

npx が見つからない場合は、Node.js がインストールされているか、PATH が通っているかをご確認ください。必要に応じて npx のフルパスを指定してください。

3. Python / uvx + mcp-proxy を使う場合

Python ユーザー向けの SSE → stdio ブリッジです。

{
"mcpServers": {
"lgtmeow": {
"command": "uvx",
"args": [
"mcp-proxy",
"https://api.lgtmeow.com/sse"
]
}
}
}

uvx が見つからない場合は、インストール状況と PATH をご確認ください。必要に応じて uvx のフルパスを指定してください。

GitHub Actions連携

Claude Code Action を使った例

PR が作成 or 更新された際に Claude Code がレビューを実行し、マージ可能と判断した場合に LGTMeow MCP Server から LGTM 画像を取得して自動でコメントするワークフロー例です。

フォルダ構成

.github
├── mcp-servers.json              # LGTMeow MCP Server の設定
└── workflows
    └── claude-auto-review.yml    # PR を自動レビューする GitHub Actions

MCP サーバー設定 (.github/mcp-servers.json)

{
"mcpServers": {
"lgtmeow": {
"type": "sse",
"url": "https://api.lgtmeow.com/sse"
}
}
}

GitHub Actions ワークフロー

name: Claude Code Auto Review on PR Open

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  claude-auto-review:
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
      cancel-in-progress: false
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v6
        with:
          fetch-depth: 0
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Run Claude Code
        uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            リポジトリ: ${{ github.repository }}
            PR番号: ${{ github.event.pull_request.number }}

            このPRの変更内容をレビューしてください。

            レビュー完了後、必ず mcp__github__add_issue_comment ツールを使用して、
            上記のPR番号にレビュー結果をコメントとして投稿してください。

            マージ可能と判断した場合は、
            mcp__lgtmeow__get_random_lgtm_markdown で LGTM画像を取得し、
            レビューコメントに含めてください。

            問題がある場合は、改善点を具体的に指摘してください。

          claude_args: |
            --mcp-config .github/mcp-servers.json
            --allowedTools "Bash(git diff),Read,LS,Glob,Grep,mcp__github__pull_request_read,mcp__github__get_pull_request,mcp__github__get_pull_request_files,mcp__github__get_pull_request_diff,mcp__github__add_issue_comment,mcp__github__get_issue,mcp__lgtmeow__get_random_lgtm_markdown"

        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

出力イメージ

マージ可能と判断された場合、Claude Code は LGTMeow MCP Server から取得した Markdown 形式の LGTM 画像を含むコメントを自動で PR に投稿します。

Claude Code による自動レビューとLGTM画像投稿の例

Codex Action を使った例

PR が作成 or 更新された際に Codex Action がレビューを実行し、マージ可能と判断した場合に LGTMeow MCP Server から LGTM 画像を取得して自動でコメントするワークフロー例です。

フォルダ構成

Codex Action は MCP サーバー設定を codex-args で直接指定できるため、.github/mcp-servers.json は不要です。

.github
└── workflows
    └── codex-auto-review.yml    # PR を自動レビューする GitHub Actions

GitHub Actions ワークフロー

name: Codex Auto Review on PR Open

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  codex:
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
      cancel-in-progress: false
    permissions:
      contents: read
    outputs:
      final_message: ${{ steps.run_codex.outputs.final-message }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@v6
        with:
          ref: refs/pull/${{ github.event.pull_request.number }}/merge

      - name: Pre-fetch base and head refs for the PR
        run: |
          git fetch --no-tags origin \
            ${{ github.event.pull_request.base.ref }} \
            +refs/pull/${{ github.event.pull_request.number }}/head

      - name: Install mcp-proxy for SSE bridge
        run: pip install mcp-proxy

      - name: Run Codex
        id: run_codex
        uses: openai/codex-action@v1
        with:
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          codex-args: |
            --config mcp_servers={"lgtmeow"={"command"="mcp-proxy","args"=["https://api.lgtmeow.com/sse"]}}
          prompt: |
            リポジトリ: ${{ github.repository }}
            PR番号: ${{ github.event.pull_request.number }}

            このPRの変更内容をレビューしてください。

            マージ可能な品質と判断した場合は、lgtmeow MCPサーバーの get_random_lgtm_markdown でLGTM画像を取得し、レビュー結果に含めてください。
            問題がある場合は、改善点を具体的に指摘してください。

            PRタイトルと本文:
            ----
            ${{ github.event.pull_request.title }}
            ${{ github.event.pull_request.body }}

  post_feedback:
    runs-on: ubuntu-latest
    needs: codex
    if: needs.codex.outputs.final_message != ''
    permissions:
      issues: write
      pull-requests: write

    steps:
      - name: Post review comment to PR
        uses: actions/github-script@v7
        env:
          CODEX_FINAL_MESSAGE: ${{ needs.codex.outputs.final_message }}
        with:
          github-token: ${{ github.token }}
          script: |
            await github.rest.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: context.payload.pull_request.number,
              body: process.env.CODEX_FINAL_MESSAGE,
            });

出力イメージ

マージ可能と判断された場合、Codex Action は LGTMeow MCP Server から取得した Markdown 形式の LGTM 画像を含むコメントを自動で PR に投稿します。

Codex による自動レビューとLGTM画像投稿の例