# Leiga — how to use (mcp.ai)

Connect your Leiga account and use 10 tools for project management straight from your AI agent. Connect with your own API key. Leiga is an AI-powered project management tool that automates tasks and enhances team collaboration.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_leiga?ms=1787295900000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `leiga_create_project`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/leiga`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/leiga/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/leiga/create/project` — Tool to create a new project in Leiga. Use after gathering project details and authenticating.
  - body: { name: string, contact?: string, type_id?: integer, end_time?: string, start_time?: string, description?: string, contact_phone?: string }
- `POST https://api.mcp.ai/api/leiga/get/file/list` — Tool to retrieve a paginated list of files in a specified directory. Use after obtaining the directory ID to view files.
  - body: { pageNo: integer, keyword?: string, fileType?: string, pageSize: integer, catalogId: string }
- `POST https://api.mcp.ai/api/leiga/get/issue/detail/by/issue/number` — Tool to fetch detailed information about a specific issue using its issue number. Use when you have an issue number and need complete issue details.
  - body: { issueNumber: string }
- `POST https://api.mcp.ai/api/leiga/get/issue/schema` — Tool to retrieve the issue custom-field schema. Use when you need the full list of field configurations after selecting an issue type.
- `POST https://api.mcp.ai/api/leiga/get/project/information` — Tool to fetch detailed information about a specific project by its ID. Use when you need complete project metadata, including owner and members.
  - body: { projectId: string }
- `POST https://api.mcp.ai/api/leiga/get/project/overview/template` — Tool to retrieve the project overview template. Use when you need the structured overview template for a project after confirming its ID.
  - body: { projectId: string }
- `POST https://api.mcp.ai/api/leiga/get/project/template/list` — Tool to retrieve a list of project templates. Use when browsing available templates before creating a new project.
  - body: { name?: string, pageNum: integer, pageSize: integer }
- `POST https://api.mcp.ai/api/leiga/get/version/list` — Tool to fetch list of versions for a specific platform. Use when you need to view all available versions before deployment.
  - body: { pageNo?: integer, pageSize?: integer, platform: string }
- `POST https://api.mcp.ai/api/leiga/get/webhook/type/list` — Tool to retrieve the list of available webhook types. Use when configuring webhooks and you need to know valid event types.
- `POST https://api.mcp.ai/api/leiga/list/projects` — Tool to list all projects available to the authenticated user. Use when you need to retrieve your projects in paginated form (e.g., page 1 with 10 per page).
  - body: { pageNo: integer, pageSize: integer }

## Example prompts
- "What can I do in Leiga?"
- "Show me a summary of my Leiga account"

## More
- Page: https://mcp.ai/leiga
- Agent spec (llms.txt): https://mcp.ai/leiga/llms.txt
- Postman collection: https://mcp.ai/leiga/postman.json
