Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

get_boards

Retrieve all Trello boards for the authenticated user to manage and organize projects.

Instructions

Retrieves all boards for the authenticated user.

Returns:
    List[TrelloBoard]: A list of board objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function for 'get_boards' that retrieves all Trello boards for the user via the BoardService, logs the operation, and handles errors by notifying the context.
    async def get_boards(ctx: Context) -> List[TrelloBoard]:
        """Retrieves all boards for the authenticated user.
    
        Returns:
            List[TrelloBoard]: A list of board objects.
        """
        try:
            logger.info("Getting all boards")
            result = await service.get_boards()
            logger.info(f"Successfully retrieved {len(result)} boards")
            return result
        except Exception as e:
            error_msg = f"Failed to get boards: {str(e)}"
            logger.error(error_msg)
            await ctx.error(error_msg)
            raise
  • Registration of the 'get_boards' tool using mcp.add_tool(board.get_boards) within the register_tools function.
    mcp.add_tool(board.get_boards)
  • The BoardService.get_boards method, which performs the actual API call to fetch boards from Trello and parses them into TrelloBoard models. Called by the tool handler.
    async def get_boards(self, member_id: str = "me") -> List[TrelloBoard]:
        """Retrieves all boards for a given member.
    
        Args:
            member_id (str): The ID of the member whose boards to retrieve. Defaults to "me" for the authenticated user.
    
        Returns:
            List[TrelloBoard]: A list of board objects.
        """
        response = await self.client.GET(f"/members/{member_id}/boards")
        return [TrelloBoard(**board) for board in response]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/m0xai/trello-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server