Skip to main content
Glama

get_project

Retrieve JIRA project details by providing the project key to access essential information for project management and tracking.

Instructions

获取JIRA项目详情

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYes

Implementation Reference

  • The handler implementation for the 'get_project' tool. This function is decorated with @mcp.tool, takes a project_key parameter, retrieves the JIRA client, fetches the project details, and returns them as a dictionary or an error message.
    @mcp.tool( description="获取JIRA项目详情", ) def get_project( project_key: str ) -> Dict[str, Any]: """获取项目详情. Args: project_key: 项目键 Returns: Dict[str, Any]: 项目详情 """ logger.info(f"获取项目: {project_key}") try: client = get_jira_client() project = client.project(project_key) return { "id": project.id, "key": project.key, "name": project.name, "lead": getattr(project, "lead", {}).get("displayName", ""), "description": getattr(project, "description", ""), "url": project.self, } except Exception as e: logger.error(f"获取项目 {project_key} 失败: {str(e)}") return {"error": str(e)}
  • Helper function that creates and caches a JIRA client instance using settings from config. Called within the get_project handler.
    def get_jira_client() -> JIRA: """获取JIRA客户端实例.""" global jira_client if jira_client is None: auth = get_jira_auth() jira_client = JIRA(server=jira_settings.server_url, basic_auth=auth) return jira_client
  • The mcp.run() call in main() that starts the MCP server and registers all @mcp.tool decorated functions, including get_project.
    mcp.run(transport=args.transport)
  • Initialization of the FastMCP server instance which handles tool registration via decorators.
    mcp = FastMCP("JIRA MCP Server", port=int(os.getenv("MCP_SERVER_PORT", "8000")))

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/yuezheng2006/mcp-server-jira'

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