esa MCP server

Provides a bridge to esa's API for document management, enabling search, creation, updates, and deletion of posts and comments with member management and categorization capabilities
Back to servers
Provider
kajirita2002
Release date
Mar 25, 2025
Language
TypeScript
Package
Stats
409 downloads
7 stars

The esa MCP Server allows Claude AI to interact with the esa API, enabling operations like searching, creating, and updating esa documents through the Model Context Protocol (MCP).

Installation

Prerequisites

  • Node.js 18 or higher
  • esa API access token
  • esa team name

Installing the Package

You can install the package globally:

# Install globally
npm install -g @kajirita2002/esa-mcp-server

Or use it directly with npx:

# Use directly with npx
npx @kajirita2002/esa-mcp-server

Environment Configuration

Set up the required environment variables:

# Set environment variables
export ESA_ACCESS_TOKEN="your_esa_access_token"
export ESA_TEAM="your_team_name"

MCP Configuration

Add the following configuration to your mcp_config.json file:

"esa": {
  "command": "npx",
  "args": ["-y", "@kajirita2002/esa-mcp-server"],
  "env": {
    "ESA_ACCESS_TOKEN": "your_esa_access_token",
    "ESA_TEAM": "your_team_name"
  }
}

Starting the Server

# Start the server
npm start

Available Tools

Post Management

Listing Posts

The esa_list_posts tool retrieves a list of posts from your team.

Parameters:

  • q (string, optional): Search query
  • include (string, optional): Related data to include (e.g. 'comments,stargazers')
  • sort (string, optional): Sort method (updated, created, number, stars, watches, comments, best_match)
  • order (string, optional): Sort order (desc, asc)
  • per_page (number, optional): Number of results per page (max: 100)
  • page (number, optional): Page number to retrieve

Getting Post Details

The esa_get_post tool retrieves detailed information about a specific post.

Parameters:

  • post_number (number, required): Post number to retrieve
  • include (string, optional): Related data to include (e.g. 'comments,stargazers')

Creating Posts

The esa_create_post tool creates a new post.

Parameters:

  • name (string, required): Post title
  • body_md (string, optional): Post body (Markdown format)
  • tags (array of string, optional): List of tags for the post
  • category (string, optional): Post category
  • wip (boolean, optional, default: true): Whether to mark as WIP (Work In Progress)
  • message (string, optional): Change message
  • user (string, optional): Poster's screen_name (only team owners can specify)
  • template_post_id (number, optional): ID of the post to use as a template

Updating Posts

The esa_update_post tool updates an existing post.

Parameters:

  • post_number (number, required): Post number to update
  • name (string, optional): New title for the post
  • body_md (string, optional): New body for the post (Markdown format)
  • tags (array of string, optional): New list of tags for the post
  • category (string, optional): New category for the post
  • wip (boolean, optional): Whether to mark as WIP (Work In Progress)
  • message (string, optional): Change message
  • created_by (string, optional): Poster's screen_name (only team owners can specify)
  • original_revision (string, optional): Revision to base the update on

Comment Management

Listing Comments

The esa_list_comments tool retrieves comments for a specific post.

Parameters:

  • post_number (number, required): Post number to get comments for
  • page (number, optional): Page number to retrieve
  • per_page (number, optional): Number of results per page (max: 100)

Getting Comment Details

The esa_get_comment tool retrieves details for a specific comment.

Parameters:

  • comment_id (number, required): ID of the comment to retrieve
  • include (string, optional): Related data to include (e.g. 'stargazers')

Creating Comments

The esa_create_comment tool posts a comment to an article.

Parameters:

  • post_number (number, required): Post number to comment on
  • body_md (string, required): Comment body (Markdown format)
  • user (string, optional): Poster's screen_name (only team owners can specify)

Member Management

Listing Members

The esa_get_members tool retrieves a list of team members.

Parameters:

  • page (number, optional): Page number to retrieve
  • per_page (number, optional): Number of results per page (max: 100)

Getting Member Details

The esa_get_member tool retrieves information about a specific team member.

Parameters:

  • screen_name_or_email (string, required): Screen name or email of the member to retrieve

Usage Example

Here's an example of creating a new post in esa:

[Claude] Please create a new post in esa. The title should be "Project X Progress Report" and the body should include "# This Week's Progress\n\n- Implementation of Feature A completed\n- Testing of Feature B started\n\n## Next Week's Plan\n\n- Start implementation of Feature C".

[MCP Server] Using the esa_create_post tool to create a new post.

[Result]
{
  "number": 123,
  "name": "Project X Progress Report",
  "body_md": "# This Week's Progress\n\n- Implementation of Feature A completed\n- Testing of Feature B started\n\n## Next Week's Plan\n\n- Start implementation of Feature C",
  "wip": false,
  "created_at": "2023-06-01T12:34:56+09:00",
  "updated_at": "2023-06-01T12:34:56+09:00",
  "url": "https://your-team.esa.io/posts/123"
}

[Claude] The post has been created successfully. The post number is 123, and you can access it at the following URL:
https://your-team.esa.io/posts/123

Troubleshooting

Authentication Problems

If you encounter this error:

Error: Request failed with status code 401

Your esa access token may be invalid or expired. Generate a new access token from the esa settings screen and update your environment variable.

Permission Issues

If you encounter this error:

Error: Request failed with status code 403

The current access token doesn't have the necessary permissions. Check the permissions for your access token in the esa settings screen and issue a new token if needed.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later