> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ticket-rs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Copilot

> Set up tk with GitHub Copilot agent mode for AI-powered issue tracking

Use tk with [GitHub Copilot](https://github.com/features/copilot) in VS Code agent mode to manage issues directly from your editor.

***

## What is GitHub Copilot Agent Mode?

[GitHub Copilot](https://github.com/features/copilot) agent mode turns Copilot into an autonomous coding agent inside VS Code. It can execute terminal commands, edit files, and — with MCP servers — interact with external tools like tk. Agent mode is available to all VS Code users with a Copilot subscription.

***

## MCP Integration

Install the [`ticket-mcp`](https://pypi.org/project/ticket-mcp/) MCP server to give Copilot agent mode direct access to your issues.

### Workspace Configuration

Create `.vscode/mcp.json` in your project root:

```json theme={null}
{
  "servers": {
    "ticket-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["ticket-mcp"]
    }
  }
}
```

### User-Level Configuration

To make tk available across all projects, open the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`) and run **MCP: Open User Configuration**, then add the same server entry.

<Accordion title="Requirements">
  **uv** installed via: `curl -LsSf https://astral.sh/uv/install.sh | sh`

  **Python** version 3.10 or higher (installed automatically by uv)

  **VS Code** with GitHub Copilot extension installed
</Accordion>

### Verify Installation

1. Open `.vscode/mcp.json` in VS Code — you should see inline **Start** / **Stop** controls above the server entry
2. Click **Start** to launch the MCP server
3. Open Copilot Chat and select **Agent** mode from the dropdown
4. Click the **Tools** icon in the chat input to confirm `ticket-mcp` tools are listed

***

## Enabling Agent Mode

Agent mode must be active for Copilot to use MCP tools:

1. Open Copilot Chat (click the Copilot icon in the title bar)
2. Select **Agent** from the mode dropdown at the top of the chat panel
3. MCP tools are automatically available — no extra configuration needed

<Tip>
  In agent mode, Copilot will automatically discover and invoke tk tools based on your prompts. You don't need to manually select tools for each interaction.
</Tip>

***

## Project Context

For better results, add a `.github/copilot-instructions.md` file to give Copilot context about your issue tracking workflow:

```markdown theme={null}
# Issue Tracking

This project uses **tk (ticket-rs)** for dependency-aware issue tracking.
Issues are stored as Markdown files in `.tickets/`.

## Quick Commands

- `tk triage` - AI-powered recommendations and project health
- `tk ready` - Find issues with no blockers
- `tk create "Title" -t task -p 2` - Create issue
- `tk show <id>` - View issue details
- `tk close <id>` - Complete work
- `tk dep add <blocked> <blocker>` - Add dependency

## Status Values

- `open` - Ready to be worked on
- `in_progress` - Currently being worked on
- `blocked` - Waiting on dependencies
- `closed` - Completed

## Priority Levels

- P0 - Critical
- P1 - High
- P2 - Medium (default)
- P3 - Low
- P4 - Lowest
```

***

## Workflow Tips

### Starting a Session

Ask Copilot: *"Run tk triage and show me what I should work on today"*

### Creating Issues

Ask Copilot: *"Create a high-priority bug for the login timeout issue"*

### Closing Work

Ask Copilot: *"Resolve tk-abc123, I just fixed it"*

### Dependency Management

Ask Copilot: *"Show me the dependency tree for tk-xyz789"*

### Project Health

Ask Copilot: *"Run tk insights and explain the bottlenecks"*

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="MCP tools not appearing in agent mode">
    Ensure `.vscode/mcp.json` exists with the correct format. Open the file in VS Code and click the **Start** button above the server entry. Check that `uvx` is in your PATH.
  </Accordion>

  <Accordion title="Agent mode not available">
    Agent mode requires a GitHub Copilot subscription. Verify Copilot is active in VS Code and update to the latest version. Agent mode is enabled by default in VS Code 1.99+.
  </Accordion>

  <Accordion title="Copilot doesn't use tk tools">
    Make sure you're in **Agent** mode (not Ask or Edit mode). Click the Tools icon in the chat input and verify ticket-mcp tools are enabled (checked).
  </Accordion>

  <Accordion title="Slow tk commands">
    Enable caching with `tk cache info` to verify the analytics cache is working. Cached responses return in under 10ms.
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="CLI Reference" icon="terminal" href="/cli-reference/commands">
    Complete tk command documentation
  </Card>

  <Card title="MCP Server" icon="plug" href="/integrations/mcp">
    Deep dive into MCP server capabilities
  </Card>

  <Card title="Graph Analytics" icon="chart-network" href="/concepts/graph-analytics">
    Learn about PageRank and dependency analysis
  </Card>

  <Card title="Copilot Docs" icon="book" href="https://docs.github.com/copilot">
    Official GitHub Copilot documentation
  </Card>
</CardGroup>

***

## Sources

* [GitHub Copilot Documentation](https://docs.github.com/copilot)
* [VS Code MCP Server Configuration](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)
* [Agent Mode in VS Code](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode)
* [MCP Documentation](https://modelcontextprotocol.io)
