CLI and APIs
See live cards in your agent
You ask your agent about a pull request, then switch to the browser to see whether CI passed, what the reviewers said or whether it can merge. In an MCP client that shows MCP Apps, the agent's answer is a live card instead: a pull request with its merge box, checks, review threads and stack, a CI run with its log, or an agent's run, updated as they change. From the card, you hand a failure or the review threads back to your agent, and you start a merge.
6 min read
The cards come with the MCP server. There is nothing to install.

1. Use a client that shows MCP Apps
The cards show in clients that support MCP Apps, for example Claude, Claude Desktop, VS Code with GitHub Copilot and Goose. Connect the client over MCP as usual.
A card takes the client's colors, fonts and theme, light or dark, and the client draws its frame, so the card looks like a part of the chat.
A client without MCP Apps still gets the same answers as text, so nothing changes for it.
2. Ask about a pull request, a CI run or an agent run
Ask your agent something like "How is pull request 1214 doing?" or "Why did the last CI run fail?". The client shows a card under the answer of these tools:
| Tool | Card |
|---|---|
get_pull_request, get_issue | The pull request or the issue |
get_ci_run | The CI run |
get_factory_run, get_agent_run | The run of a factory agent, or of an agent workflow |
A pull request card has the cards of the side of the pull request page:
- The merge box: "Ready to merge" or "Not ready to merge", with a line for each reason: a required check that failed or still runs, approvals, requested changes, code owners, conflicts, a draft. It also says when merge when ready is on, or where the pull request is in the merge queue. A merged pull request shows its merge commit.
- Checks: the latest run of each workflow on the head commit, the most urgent first, with how long each took. Select a run to see its jobs, and View run to open it on the forge.
- Open review threads: the file and the line of each thread that is not resolved, with its last comment. Select a thread to open it on the page.
- Stack: when the pull request is in a stack, each pull request of it from the bottom, with what holds it: a draft, a conflict, or a link that is cut.
An issue card shows its assignees, its labels and the pull requests that fix it.
A CI run card shows the run's jobs, and the end of the log of its failed job, or of its running job while it writes. Select a job to see its log instead.
An agent run card shows the run's state, its model, tokens and cost, its verdict or why it failed, and the end of its log. An agent workflow run shows its jobs: select one to see its steps and its log.
3. Hand work back to your agent
The card sends a message to the chat for you, so your agent picks the work up:
- Fix this, on a failed CI job: your agent reads the job's log and fixes the cause on the pull request's branch.
- Ask your agent to address these, under the open review threads: your agent reads the threads, changes the code and replies to each one.
The card says Sent to your agent when the client took the message.
4. Merge from the card
The merge box of an open pull request has its actions:
- Merge when ready: the pull request merges by itself, as you, once its checks pass.
- Add to merge queue: the forge updates it, waits for its checks and merges it at its turn.
- Update branch, when the branch is behind its base: a merge of the base into the branch.
- Turn off merge when ready and Remove from queue, while one of them is on.
Each action asks you to confirm first, and merge when ready and the merge queue ask for the merge method. A base branch that keeps a linear history offers only squash and rebase. The button shows a spinner until the card shows the result. When the forge refuses, the card says why.
The card calls the same tools that your agent has, with your connection, so the rules of your token hold: an agent token never merges into the default branch, for example. Some clients ask you to approve each tool call that a card makes.
5. Watch it change
The cards follow what they show through your own connection. A pull request or an issue card and a CI run card wait with wait_for_events: when CI ends, a review comes in, the head branch moves or the item changes state, the card reads it again. An agent run card has no events to wait for, so it reads the run again every 5 seconds while it runs. The footer says Live and when the card last changed.
- A card stops following a pull request once it merges, and a run once it ends.
- After 30 minutes, the card pauses, so an old chat does not keep asking. Select Resume live updates to follow it again.
- After several failed reads in a row, the card pauses and says why.
- When the state changes, the card tells the agent, so its next answer knows what you see.
Done
Your agent's answers about pull requests, issues, CI runs and agent runs show their live state, and you hand failures and review threads back to your agent from them. Select Open on TanStack Source to open the page of what a card shows.
What the cards can reach
A card is a page that the client shows in a sandboxed frame. It has no token and reaches no network itself. It reads and acts only through the client, with the tools and the permissions of your connection, so it shows only what you may read and does only what you may do:
- To read:
get_pull_request,get_pull_request_checks,list_ci_runs,get_ci_run,list_pull_request_comments,get_pull_stack,get_issue,read_ci_job_log,get_factory_run,get_agent_run,get_agent_job_logandwait_for_events. - To act, after your confirm click:
enable_pull_request_auto_merge,disable_pull_request_auto_merge,add_to_merge_queue,remove_from_merge_queueandupdate_pull_branch.
Clients find the cards as the resources ui://tanstack-source/item.html, ui://tanstack-source/ci-run.html and ui://tanstack-source/agent-run.html, which the tools above name in their _meta.ui.resourceUri.