-
Notifications
You must be signed in to change notification settings - Fork 7
Copilot Integration
Connect memory-journal-mcp to GitHub Copilot so IDE agents and Copilot share context through journal entries. Two agents, one shared memory.
IDE Agent (AntiGravity/Cursor) ←→ memory-journal-mcp ←→ Copilot (GitHub)
reads reviews via API shared memory reads context via MCP
The IDE agent reads Copilot's PR review findings with get_copilot_reviews, creates copilot-finding journal entries, and suggests rule updates.
// 1. Fetch Copilot's review for a PR
const review = await get_copilot_reviews({ pr_number: 42 });
// 2. Create journal entry from findings
create_entry({
content: "Copilot flagged missing null checks in src/utils.ts (line 15) and missing error handling in src/api.ts (line 42)",
entry_type: "code_review",
tags: ["copilot-finding", "null-safety", "error-handling"],
pr_number: 42,
});Before writing code, the IDE agent searches past copilot-finding entries and applies those patterns proactively — avoiding the same review feedback.
// Before starting work on a file, check what Copilot has flagged before
const findings = await search_entries({
query: "copilot-finding error-handling",
tags: ["copilot-finding"],
});
// Agent applies discovered patterns to new codeCopilot uses memory-journal-mcp as an MCP server during PR review, gaining access to project history, architectural decisions, and past review patterns.
Instead of waiting for a remote PR review, agents can run local, pre-push evaluations using the GitHub Copilot CLI by leveraging the bundled github-copilot-cli skill.
By executing the copilot-audit workflow via GitHub Commander, the IDE agent will pipe your uncommitted diffs to Copilot, log its critique into memory-journal-mcp (as an audit_finding or triage entry), and pause for a required "Human-in-the-Loop" gateway, giving you the chance to fix the code before you push and invalidate continuous integration tests.
Add to your workspace .vscode/mcp.json:
{
"servers": {
"memory-journal": {
"command": "npx",
"args": ["-y", "memory-journal-mcp"],
"env": {
"DB_PATH": "./memory-journal.db",
"GITHUB_TOKEN": "${env:GITHUB_TOKEN}",
"PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\".\",\"project_number\":1}}"
}
}
}
}For Copilot Code Review or remote agents, deploy in HTTP mode:
npx memory-journal-mcp --transport http --port 3100Then configure as a remote MCP server in your GitHub Copilot settings.
See HTTP Transport for full deployment options including Docker, OAuth, and stateless mode.
Set the environment variable:
BRIEFING_COPILOT_REVIEWS=true
Or use the CLI flag:
--briefing-copilot
This aggregates Copilot review state across recent PRs into the memory://briefing resource, so agents are immediately aware of review patterns at session start.
Use get_copilot_reviews(pr_number) to fetch Copilot's findings:
get_copilot_reviews({ pr_number: 42 });Output:
{
prNumber: 42,
state: "changes_requested",
commentCount: 2,
comments: [
{ body: "Consider adding null check here", path: "src/utils.ts", line: 15 },
{ body: "Missing error handling for async call", path: "src/api.ts", line: 42 }
]
}See Tools Reference — get_copilot_reviews for full parameter documentation.
-
Enable briefing integration — Set
BRIEFING_COPILOT_REVIEWS=trueso every session starts with Copilot review awareness -
After each PR review — IDE agent fetches
get_copilot_reviewsand createscopilot-findingentries for recurring patterns -
Before starting work — Agent searches past
copilot-findingentries and applies patterns proactively - Periodic rule updates — When patterns repeat 3+ times, agent suggests codifying them as rules or skills
When connecting memory-journal-mcp to Copilot:
- Use read-only OAuth scopes (e.g., a
read-level scope) and follow the principle of least privilege if OAuth is enabled - The journal database may contain project decisions, architecture notes, and code patterns — share only what's appropriate
- Copilot's access follows your GitHub repository permissions
- Git Integration — GitHub Issues, PRs, Actions integration
-
Tools Reference — Complete tool documentation including
get_copilot_reviews -
Configuration —
BRIEFING_COPILOT_REVIEWSand other env vars - HTTP Transport — Remote deployment for Copilot Code Review
Next: Explore Git Integration or Tool Filtering.