esa文档管理
STDIO用于与esa API交互的文档管理服务器
用于与esa API交互的文档管理服务器
Read this in Japanese
This server is an interface that uses the Model Context Protocol (MCP) to enable Claude AI to interact with the esa API.
With this MCP server, Claude AI can perform operations such as searching, creating, and updating esa documents.
This repository provides a standalone implementation of the esa MCP server. It integrates Claude AI with esa to streamline document management.
# Install globally npm install -g @kajirita2002/esa-mcp-server # Or use directly with npx npx @kajirita2002/esa-mcp-server
# Set environment variables export ESA_ACCESS_TOKEN="your_esa_access_token" export ESA_TEAM="your_team_name"
If you're using this MCP server, 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" } }
# Start the server npm start
This MCP server provides the following tools:
esa_list_posts
q
(string, optional): Search queryinclude
(string, optional): Related data to include in the response (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 retrieveesa_get_post
post_number
(number, required): Post number to retrieveinclude
(string, optional): Related data to include in the response (e.g. 'comments,stargazers')esa_create_post
name
(string, required): Post titlebody_md
(string, optional): Post body (Markdown format)tags
(array of string, optional): List of tags for the postcategory
(string, optional): Post categorywip
(boolean, optional, default: true): Whether to mark as WIP (Work In Progress)message
(string, optional): Change messageuser
(string, optional): Poster's screen_name (only team owners can specify)template_post_id
(number, optional): ID of the post to use as a templateesa_update_post
post_number
(number, required): Post number to updatename
(string, optional): New title for the postbody_md
(string, optional): New body for the post (Markdown format)tags
(array of string, optional): New list of tags for the postcategory
(string, optional): New category for the postwip
(boolean, optional): Whether to mark as WIP (Work In Progress)message
(string, optional): Change messagecreated_by
(string, optional): Poster's screen_name (only team owners can specify)original_revision
(string, optional): Revision to base the update onesa_list_comments
post_number
(number, required): Post number to get comments forpage
(number, optional): Page number to retrieveper_page
(number, optional): Number of results per page (max: 100)esa_get_comment
comment_id
(number, required): ID of the comment to retrieveinclude
(string, optional): Related data to include in the response (e.g. 'stargazers')esa_create_comment
post_number
(number, required): Post number to comment onbody_md
(string, required): Comment body (Markdown format)user
(string, optional): Poster's screen_name (only team owners can specify)esa_get_members
page
(number, optional): Page number to retrieveper_page
(number, optional): Number of results per page (max: 100)esa_get_member
screen_name_or_email
(string, required): Screen name or email of the member to retrieveHere's an example of Claude using this MCP server to create an esa post:
[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
Error: Request failed with status code 401
If you see this error, your esa access token may be invalid or expired. Generate a new access token from the esa settings screen and update your environment variable.
Error: Request failed with status code 403
If you see this error, 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.
Provided under the MIT License.