portfolio-drift-mcp
Enables auditing of GitHub repositories to detect drift between portfolio records and actual repository state.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@portfolio-drift-mcp audit my portfolio for drift"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
portfolio-drift-mcp
MCP server that wraps portfolio-drift-agent — lets LLM clients (Claude Desktop, Claude Code, custom agents) audit a portfolio of projects against GitHub conversationally instead of round-tripping through a terminal.
Why this exists
If you maintain a portfolio of projects (a resume, a profile site, an internal project tracker) the source records drift the moment the underlying repos evolve. portfolio-drift-agent audits that drift via CLI. This server exposes the same audit as MCP tools so an LLM agent can call it mid-conversation:
"Before I push this PR, audit Beacon's own record on my portfolio. If the tech stack is missing anything that just shipped, propose patches and dry-run them."
The model can call audit_single_project, read the response, then call apply_drift_patches with dry_run=true — all without a human typing a command.
Related MCP server: repogate
Tools
Tool | Args | Purpose |
|
| Full audit. Use |
|
| Single project, ~10 seconds. |
|
| HITL apply. Dry-run prints intent; pass |
Every tool returns a structured envelope:
{ "ok": true, ...payload }
// or
{ "ok": false, "error_kind": "config|network|not_found|upstream", "error": "..." }error_kind lets the calling LLM branch deterministically (re-prompt for missing config vs. retry on network vs. give up on not-found) without parsing tracebacks.
Install
pip install git+https://github.com/odanree/portfolio-drift-mcpThen register in your MCP client (Claude Code example):
claude mcp add portfolio-drift python -m drift_mcp.server \
--env ANTHROPIC_API_KEY=sk-ant-... \
--env BEACON_JWT=... \
--env BEACON_API_URL=https://beacon.danhle.net \
--env GITHUB_TOKEN=ghp_...Claude Desktop config (in ~/Library/Application Support/Claude/claude_desktop_config.json or the Windows equivalent):
{
"mcpServers": {
"portfolio-drift": {
"command": "python",
"args": ["-m", "drift_mcp.server"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"BEACON_JWT": "...",
"BEACON_API_URL": "https://beacon.danhle.net",
"GITHUB_TOKEN": "ghp_..."
}
}
}
}Environment
Var | Default | When required |
|
| Always |
| — | Audit with |
| — | All audit tools |
| (unauth) | Optional. Raises GitHub rate limit 60/hr → 5000/hr — strongly recommended for non-trivial portfolios. |
|
| Anthropic model id used by the analyzer |
|
| Project is flagged stale if its last commit is older than this |
Env is read on tool invocation, not at server start — missing config returns a structured config error rather than crashing the server.
Tests
pip install -e .[dev]
pytest13 tests cover: missing env → structured config error, unknown adapter rejection, full audit happy path with mocked Anthropic + Beacon + GitHub via respx, drift counting, single-project not_found path, dry-run vs apply branching, and patch validation. No network calls in CI.
License
MIT — see LICENSE.
Available Tools
3 toolsapply_drift_patchesA
Apply curated drift suggestions to Beacon (HITL).
Inputs: patches (required), dry_run. Returns: object
audit_portfolio_driftB
Audit every project in the portfolio against its GitHub repo.
Inputs: adapter, limit, model. Returns: object
audit_single_projectA
Audit one project by id. Faster than the full audit (~10 seconds).
Inputs: project_id (required), adapter, model. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: full audit, single project audit, and applying patches. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern with snake_case (audit_portfolio_drift, audit_single_project, apply_drift_patches), making them predictable.
With only 3 tools, the server is tightly scoped to its purpose—auditing drift and applying fixes—without unnecessary bloat or deficiency.
The tool surface covers the full lifecycle: comprehensive audit, targeted audit, and patching. No obvious gaps for the stated domain.
Maintenance
Related MCP Connectors
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Statically audits MCP tool surfaces for token cost, schema quality, and design issues.
Verified component catalog over remote MCP: agents pick component ids and get a stamped project repo that builds. Connect at https://www.botkelp.com/mcp. Auth: MCP OAuth 2.1, or a Bearer bk_live_ API key; initialize and tools/list are open.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides MCP tools that give LLM agents a full QA engineer workflow: scanning projects, generating deterministic test suites, executing them across browser/API/mobile, diagnosing failures, and proposing fixes that require human approval.-
- AlicenseNot gradedqualityBmaintenanceMCP server that wraps the GitHub REST API into tools for repo queries, issue/PR management, code review, search, and authentication, letting coding agents operate GitHub directly in conversations.5 npmMIT
- FlicenseNot gradedqualityBmaintenanceProvides MCP tools for GitHub code search, Jira sprint status, pull request risk analysis, and project metrics, enabling agentic workflows for developer productivity.-
- FlicenseNot gradedqualityCmaintenanceEnables natural-language analysis of GitHub repositories by exposing repository metadata, source code retrieval, search, and file reading as MCP tools, with answers grounded in the actual repository content.-