Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

get_boards

Retrieve all Trello boards for the authenticated user to view and manage project workspaces.

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 that executes the get_boards tool logic by calling the BoardService.get_boards() method.
    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
  • Pydantic model used for output validation of TrelloBoard objects returned by get_boards.
    class TrelloBoard(BaseModel): """Model representing a Trello board.""" id: str name: str desc: str | None = None closed: bool = False idOrganization: str | None = None url: str
  • Registration of the get_boards tool with the MCP server.
    mcp.add_tool(board.get_boards)
  • Supporting service method that fetches boards from the Trello API using the TrelloClient.
    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