Skip to main content
Glama

mcp-esa-server-python

esa.io API と連携するための Model Context Protocol Server (mcp server)です。Pythonで実装しています。

できること

現在は以下の機能を提供しています。

  • ユーザー情報取得(user_get_info)

  • 記事一覧取得(posts_get_list)

  • 記事詳細取得(posts_get_detail)

  • 記事作成 (posts_create)

  • 記事更新 (posts_update)

  • 記事削除 (posts_delete)

Related MCP server: lyxamour-mcp

セットアップ手順

前提条件

  • esa.ioのAPIトークンを発行済であること

  • uv が使えること

  • インターネット接続

  • esa.ioのAPIトークンの発行方法

    • あなたの esa.io チームのページにアクセスします (例: https://<your-team-name>.esa.io/)。

    • 左カラムのSETTINGSをクリックし、「ユーザー設定」>「外部アプリ連携」を選択します。

    • 「Personal access tokens」セクションで、「Generate new token」をクリックします。

    • トークン名 (例: mcp-server) を入力し、必要な権限スコープを選択します。この MCP サーバーには少なくとも以下の権限が必要です:

      • read (記事の読み取り)

      • write (記事の作成・更新・削除)

      • read_user (ユーザー情報の取得) (この項目は自動的に有効になるため、表示されない可能性があります)

    • 「Save」をクリックします。

    • 表示されたトークンを必ずコピーして安全な場所に保管してください。このトークンは一度しか表示されません。

    • コピーしたトークンは、後述の .env ファイルの ESA_TOKEN の値として貼り付けます。

  • esa.io では、サインアップから2ヶ月間の無料トライアル期間が提供されています。この期間を利用して、テスト用のチーム名とAPIトークンを取得することができます。

  • セキュリティのため、トークンは直接公開しないようご注意ください。

プロジェクトの初期化

uv sync

開発(ローカルでの使い方)

開発に参加する場合や、MCPInspectorを利用する場合は、以下の手順で環境を構築します。

  1. 環境変数の設定 .env.example を参考にして、.env をサーバーを実行したいディレクトリ(.env.exampleと同じ場所)を作成します。

    ESA_TEAM_NAME="YOUR_ESA_TEAM_NAME" # Replace with your esa.io team name (e.g., "myteam")
    ESA_TOKEN="YOUR_ESA_API_TOKEN"     # Replace with your esa.io API access token
  2. 実行方法 下記コマンドを実行後に、指示のあるURLからブラウザを開くことで、MCP Inspectorを使って、各コマンド(記事作成など)を実行することができます。

    uv run mcp run main.py

MCPServerとしてCursorエディタで使う方法

  1. mcp.jsonの作成例

プロジェクトルートまたは ~/.cursor/mcp.json に以下のような設定ファイルを用意します。

{
  "mcpServers": {
    "mcp-esa-server": {
      "command": "uv",
      "args": [
        "--directory",
        "<プロジェクトの絶対パス>",
        "run",
        "main.py"
      ],
      "env": {
        "ESA_TEAM_NAME": "<your-team-name>",
        "ESA_TOKEN": "<your-esa-token>"
      }
    }
  }
}
  • <your-team-name> と <your-esa-token> は各自のesa.ioチーム名・APIトークンに置き換えてください。

  • env: 環境変数を 直接 設定します。この方法を使用する場合、.cursor/mcp.json のコミットは絶対に避けてください。

  1. CursorエディタでMCPサーバーを起動

  • CursorエディタのコマンドパレットやUIから「MCPサーバーを起動」または「AIツールを有効化」します。

  • mcp.jsonの設定に従い、uv run main.py でサーバーが起動します。

  • .env ファイルや環境変数も自動的に読み込まれます。

  1. AIチャットやツールパネルからAPIを呼び出し

  • AIチャット上で user_get_info や posts_get_list などのMCPツールを呼び出すことで、esa.io APIと連携した操作が可能です。

  • mcp-esa-serverを使って記事の作成をお願いします などとチャット上で書き込むことで利用できます。

ライセンス (License)

このプロジェクトは MIT License の下で公開されています。

使用している外部コード / Dependencies

このプロジェクトの一部では、以下のMIT Licenseで公開されているコードを参照しています。

その他 (Misc)

生成元 (Generated by)

generated by Cursor (gemini-2.5-pro-exp-03-25)

Available Tools

6 tools
posts_createB

Create a new post on esa.io

Args: name: Post title body_md: Post body in Markdown format tags: List of tags for the post category: Category path (e.g., 'foo/bar') wip: Whether the post is Work In Progress (default: true) message: Commit message for the post

Inputs: name (required), body_md (required), tags, category, +2 more.

posts_deleteC

Delete a post on esa.io

Args: post_number: The number of the post to delete

Inputs: post_number (required).

posts_get_detailC

Get details of a specific post from esa.io

Args: post_number: The number of the post to retrieve

Inputs: post_number (required).

posts_get_listC

Get a list of posts from esa.io

Args: q: Search query page: Page number per_page: Number of posts per page (max 100)

Inputs: q, page, per_page.

posts_updateC

Update an existing post on esa.io

Args: post_number: The number of the post to update name: New post title body_md: New post body in Markdown format tags: New list of tags category: New category path wip: New WIP status message: Commit message for the update

Inputs: post_number (required), name, body_md, tags, +3 more.

user_get_infoB

Get current esa.io user information

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. The five post-related tools cover different CRUD operations (create, delete, get_detail, get_list, update), and the user_get_info tool handles a completely separate user information domain. An agent can easily distinguish between these tools based on their names and descriptions.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with perfect uniformity. Post-related tools use 'posts_' prefix followed by action verbs (create, delete, get_detail, get_list, update), and the user tool follows the same structure with 'user_get_info'. There are no deviations in naming conventions throughout the set.

    Tool Count5/5

    Six tools is well-scoped and appropriate for this esa.io content management server. The set provides complete CRUD operations for posts plus user information retrieval, with each tool earning its place. This is neither too sparse nor bloated for the domain of managing posts and user data on esa.io.

    Completeness5/5

    The tool surface provides complete coverage for the esa.io post management domain with full CRUD operations (create, read, update, delete) plus listing/search functionality. The addition of user information retrieval rounds out the surface nicely. There are no obvious gaps or dead ends for agents working with posts on esa.io.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A simple MCP server built with FastMCP for experimentation and learning purposes. Includes basic web tools like article fetching and serves as a human-readable template for building custom MCP servers.
      AGPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Python MCP server with built-in knowledge base (SQLite + FTS5), web management interface, and flexible tool grouping system. Supports multiple transport protocols (stdio, SSE, HTTP Stream) with zero external dependencies.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Python-based MCP server that enables document-based question answering by processing PDF, TXT, and Markdown files through OpenAI's API. It provides hallucination-free responses based strictly on document content using semantic search and includes a web interface for management.
      MIT