--- title: "past.dev for GitHub Copilot" description: "Your GitHub Copilot sessions become memory, and each prompt reaches the model with what past.dev recalls for it." canonical: https://past.dev/docs/plugins/github-copilot last-updated: 2026-11-18 --- # past.dev for GitHub Copilot > Your GitHub Copilot sessions become memory, and each prompt reaches the model with what past.dev recalls for it. Product: past.dev Plugins. Source: https://past.dev/docs/plugins/github-copilot There are two ways to connect GitHub Copilot. The plugin is for Copilot CLI and the GitHub Copilot app on your machine. The remote server is for Copilot's cloud agent and code review on GitHub, which read a project's memory over the past.dev MCP server with a project key. ### Install the GitHub Copilot plugin You need Copilot CLI or the GitHub Copilot app, and Node.js 16 or later. ```terminal copilot plugin marketplace add pastdotdev/copilot-plugin copilot plugin install past@past ``` In the GitHub Copilot app, add the marketplace `pastdotdev/copilot-plugin` under **Customize** and install **past** from it. ### Connect GitHub Copilot to a project Start a session, then run the connect command with your project API key and your identity. ```copilot /past-connect ``` The project API key starts with `past_sk_`. Create it on the API keys screen of the console at https://app.past.dev. Do not use the project id or the organization's `past_mk_` management key: a plugin cannot ingest or recall with them. The identity is the email or id that every memory from your sessions is attributed to. Recall answers as this identity, so recall stays off until you set one. A machine that another past.dev plugin already connected skips this step, because every past.dev plugin reads the same `~/.past/config.json`. `/past-status` shows the project the plugin talks to and what it has sent. Sessions are read from your next prompt on. ### What the GitHub Copilot plugin does - When a session starts, it recalls what past.dev knows about the project and puts it in front of the session. - On every prompt, it recalls what past.dev knows about that prompt and puts it beside the prompt. A recall that has not answered within 4 seconds is dropped, and a prompt shorter than 12 characters recalls nothing. - It keeps each prompt and each reply on your machine, in `~/.past/copilot/`, and sends the session when it ends. A session that was quiet for 30 minutes without an end is sent the same way. - The agent calls the `past_recall` tool when a question is about history. ### GitHub Copilot plugin commands | Command | What it does | | --- | --- | | `/past-connect ` | Connects this machine. `--audience ` sets who sees what you send. | | `/past-status` | Shows what the plugin is connected to, what it has sent, and the last send that failed. | | `/past-cut [session]` | Prints exactly what would be sent from a session, sitting by sitting. By default it takes the latest session here. | | `/past-ingest [session]` | Sends one session now. | Without an audience, every reader in the project can see what you send. Add `--audience ` to `/past-connect` to narrow it to one audience from the console. `--audience project` widens it again. ### Copilot's cloud agent and code review Copilot's cloud agent and its code review run on GitHub. They take a remote MCP server with a header, and they cannot sign in with OAuth. The past.dev MCP server accepts a project key in that header and then offers the memory of the key's project: `recall_memory`, `ingest_memory`, `delete_memory` and `get_memory_deletion`. Code review calls only read-only tools, and `recall_memory` is one. 1. In the repository's **Settings › Secrets and variables › Agents**, add two secrets: `COPILOT_MCP_PAST_API_KEY`, the project key, and `COPILOT_MCP_PAST_IDENTITY`, the identity the agent reads as. 2. In **Settings › Copilot › Cloud agent › MCP configuration**, paste the configuration below. 3. Assign an issue to Copilot, and check the **Start MCP Servers** step of its session log for `recall_memory`. ```mcpconfiguration { "mcpServers": { "past": { "type": "http", "url": "https://api.past.dev/mcp", "headers": { "Authorization": "Bearer $COPILOT_MCP_PAST_API_KEY", "X-Past-Identity": "$COPILOT_MCP_PAST_IDENTITY" }, "tools": ["recall_memory"] } } } ``` This configuration allows `recall_memory` only. Add `ingest_memory` to `tools` if the agent should also write. [Connect with a project key](/docs/mcp/quickstart) describes the header and its refusals. Source code and issues: [pastdotdev/copilot-plugin](https://github.com/pastdotdev/copilot-plugin).