# TeamGantt

> Read TeamGantt projects and tasks, create new tasks, update due dates.

Lets an agent read your TeamGantt workspace, list project tasks, create
new tasks, and update existing ones via the TeamGantt REST API and a
Personal Access Token.

## What it can do

| Method | What it does |
| --- | --- |
| `teamgantt_get_projects` | List projects available to the connected account. |
| `teamgantt_get_project` | Fetch one project by id with full metadata. |
| `teamgantt_get_tasks` | List tasks across one or more projects (`project_ids[]=…`). |
| `teamgantt_create_task` | Create a task; requires `project_id`, `parent_group_id`, and `name`. `start_date` / `end_date` optional. |
| `teamgantt_update_task` | PATCH a task by id — update name, dates, status, assignee. |
| `teamgantt_get_current_user` | Identity of the user the token belongs to. |

## How to get credentials

Use a TeamGantt **Personal Access Token** (Bearer auth).

1. Sign in at https://teamgantt.com.
2. Open **My Profile** (top-right avatar) → **Personal access tokens**.
3. **Generate token**, give it a memorable name like `flymyai-mcp`.
4. Copy the token immediately — it's shown once.

The token inherits your account's permissions, so anything you can see
in TeamGantt the agent can read; anything you can edit, the agent can
write.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `TEAMGANTT_API_TOKEN` | Profile → Personal access tokens (shown once) |

## Troubleshooting

- **`401 Unauthorized`** — token revoked or copied with a trailing space.
  Generate a fresh one.
- **`teamgantt_get_tasks` returns empty** — the action calls
  `GET /tasks?project_ids[]=…` (not `GET /projects/{id}/tasks`). Pass
  `project_id` values from `teamgantt_get_projects`.

## Links

- [TeamGantt API docs](https://api-docs.teamgantt.com/)
- [Personal Access Tokens](https://help.teamgantt.com/en/articles/9320770-personal-access-tokens)
