MCP HubMCP Hub
roychri

mcp-server-asana

by: roychri

mcp server asana

55created 04/12/2024
Visit
asana

📌Overview

Purpose: This framework serves as a Model Context Protocol (MCP) server for Asana, facilitating seamless communication with the Asana API through MCP Clients like Anthropic's Claude Desktop Application.

Overview: The MCP Server for Asana enables users to access and manipulate Asana tasks, projects, and workspaces via a range of API calls. It enhances interaction with Asana by allowing comprehensive management of tasks and projects directly from compatible AI tools, thus streamlining project management workflows.

Key Features:

  • Comprehensive Task Management: Supports creating, updating, searching, and retrieving detailed information about tasks, including comments and dependencies, thereby enhancing productivity and task oversight.

  • Project Operations: Allows users to manage projects by getting detailed information, creating status updates, and listing sections within a project, which simplifies project tracking and updates.

  • Workspace Interaction: Users can retrieve lists of workspaces and associated resources, facilitating seamless integration and organization across different Asana environments.


MCP Server for Asana

This Model Context Protocol server implementation of Asana allows you to communicate with the Asana API from MCP Client such as Anthropic's Claude Desktop Application and others.

More details on MCP can be found at:

Usage

In the AI tool of your choice (e.g., Claude Desktop), ask something about Asana tasks, projects, workspaces, and comments. Mentioning the word "asana" will increase the chance of having the LLM pick the right tool.

Example:

How many unfinished asana tasks do we have in our Sprint 30 project?

Tools

  1. asana_list_workspaces
    List all available workspaces in Asana
    Optional input: opt_fields (string)
    Returns: List of workspaces

  2. asana_search_projects
    Search for projects by name pattern
    Required: workspace (string), name_pattern (string)
    Optional: archived (boolean), opt_fields (string)
    Returns: List of matching projects

  3. asana_search_tasks
    Search tasks in workspace with advanced filtering
    Required: workspace (string)
    Optional: filters such as text, resource_subtype, completed, assignee, sort_by, custom_fields, etc.
    Returns: List of matching tasks

  4. asana_get_task
    Get detailed info about a specific task
    Required: task_id (string)
    Optional: opt_fields (string)
    Returns: Task details

  5. asana_create_task
    Create a new task in a project
    Required: project_id (string), name (string)
    Optional: notes, due_on, assignee, custom_fields, etc.
    Returns: Created task info

  6. asana_get_task_stories
    Get comments and stories for a task
    Required: task_id (string)
    Optional: opt_fields (string)
    Returns: List of stories/comments

  7. asana_update_task
    Update task details
    Required: task_id (string)
    Optional: name, notes, due_on, assignee, completed, custom_fields, etc.
    Returns: Updated task info

  8. asana_get_project
    Get details about a project
    Required: project_id (string)
    Optional: opt_fields (string)
    Returns: Project details

  9. asana_get_project_task_counts
    Get number of tasks in a project
    Required: project_id (string)
    Optional: opt_fields (string)
    Returns: Task count info

  10. asana_get_project_sections
    Get sections in a project
    Required: project_id (string)
    Optional: opt_fields (string)
    Returns: List of project sections

  11. asana_create_task_story
    Create a comment/story on a task
    Required: task_id (string), text (string)
    Optional: opt_fields (string)
    Returns: Created story info

  12. asana_add_task_dependencies
    Set dependencies for a task
    Required: task_id (string), dependencies (array of strings)
    Returns: Updated dependencies

  13. asana_add_task_dependents
    Set dependents for a task
    Required: task_id (string), dependents (array of strings)
    Returns: Updated dependents

  14. asana_create_subtask
    Create a subtask under an existing task
    Required: parent_task_id (string), name (string)
    Optional: notes, due_on, assignee, opt_fields
    Returns: Created subtask info

  15. asana_get_multiple_tasks_by_gid
    Get details about multiple tasks (max 25)
    Required: task_ids (array or comma-separated string)
    Optional: opt_fields (string)
    Returns: List of task info

  16. asana_get_project_status
    Get a project status update
    Required: project_status_gid (string)
    Optional: opt_fields (string)
    Returns: Status info

  17. asana_get_project_statuses
    Get all status updates for a project
    Required: project_gid (string)
    Optional: limit, offset, opt_fields
    Returns: List of status updates

  18. asana_create_project_status
    Create a status update for a project
    Required: project_gid (string), text (string)
    Optional: color, title, html_text, opt_fields
    Returns: Created status

  19. asana_delete_project_status
    Delete a project status update
    Required: project_status_gid (string)
    Returns: Deletion confirmation

  20. asana_set_parent_for_task
    Set parent of task and position subtask
    Required: task_id (string), data (object with parent)
    Optional: insert_after, insert_before, opt_fields
    Returns: Updated task info

  21. asana_get_tasks_for_tag
    Get tasks for a tag
    Required: tag_gid (string)
    Optional: opt_fields, opt_pretty, limit, offset
    Returns: List of tasks

  22. asana_get_tags_for_workspace
    Get tags in a workspace
    Required: workspace_gid (string)
    Optional: limit, offset, opt_fields
    Returns: List of tags

Prompts

  1. task-summary
    Get summary and status update for a task based on notes, fields, and comments
    Required: task_id (string)
    Returns: Detailed prompt for generating task summary

  2. task-completeness
    Analyze if a task has all necessary details
    Required: task_id (string) or URL
    Returns: Detailed prompt for analyzing completeness

  3. create-task
    Create a new task with details
    Required: project_name (string), title (string)
    Optional: notes, due_date
    Returns: Detailed prompt for task creation

Resources

  1. Workspaces - asana://workspace/{workspace_gid}
    Representation of Asana workspaces as separate resources
    Returns JSON with details like name, id, type, organization status, email domains

  2. Projects - asana://project/{project_gid}
    Template resource for project info by GID
    Returns JSON with project details such as name, id, archived status, notes, color, workspace, team, sections, custom fields

Setup

  1. Create an Asana account

    • Visit the Asana website
    • Click "Sign up"
  2. Retrieve the Asana Access Token

  3. Configure Claude Desktop
    Add the following to claude_desktop_config.json:

{
  "mcpServers": {
    "asana": {
      "command": "npx",
      "args": ["-y", "@roychri/mcp-server-asana"],
      "env": {
        "ASANA_ACCESS_TOKEN": "your-asana-access-token"
      }
    }
  }
}

For beta versions (if available), you can use the following package tag:
@roychri/mcp-server-asana@beta

Check for current beta releases at https://www.npmjs.com/package/@roychri/mcp-server-asana?activeTab=versions or with npm dist-tag ls @roychri/mcp-server-asana

Troubleshooting

If you encounter permission errors:

  1. Ensure your Asana plan allows API access
  2. Confirm the access token and configuration are correctly set in claude_desktop_config.json

Contributing

Clone this repository and start hacking.

Test Locally with MCP Inspector

To test changes, run:

npm run inspector

This exposes the client on port 5173 and the server on port 3000.
If these ports are in use, you can set different ports:

CLIENT_PORT=5009 SERVER_PORT=3009 npm run inspector

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute it under the terms of the MIT License. See the LICENSE file in the repository for details.