DPR MCP Server
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., "@DPR MCP Server Create a change request to add a draft section to the manual and wait for my approval."
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.
DPR MCP AI Document Collaboration Platform
This project is a local, Git-backed document collaboration platform where humans and AI agents can work on shared documents safely.
It combines:
Model Context Protocol server
real MCP stdio client
React dashboard
LangGraph-based agents
Git-backed versioning
isolated workspaces
Change Requests
human review and merge
conflict detection
conflict-resolution proposals
provenance tracking
The core idea:
AI agents can write and review documents, but they cannot silently overwrite main.
Every edit becomes a versioned, reviewable, traceable Change Request.Why This Project Exists
Normal AI document editing is risky because an agent may directly overwrite a file, lose history, mix multiple users' edits, or make it unclear who changed what and why.
This project solves that by placing AI agents behind a controlled collaboration protocol:
Agent -> MCP Client -> MCP Server -> Controlled Tools -> Git + SQLiteThe agent does not directly mutate the canonical document repository. It creates an isolated workspace, edits files there, opens a Change Request, and waits for human review.
Related MCP server: dpr-mcp
Architecture
Full project architecture:

Phase 2 agent architecture:

High-level flow:
React Dashboard / External MCP Client
|
v
Dashboard API
|
v
LangGraph Agents
|
v
DPRMCPClient
|
v
MCP stdio
|
v
DPR MCP Server
|
v
MCP Tools
|
v
DPR Services
|
v
Git Repositories + Isolated Workspaces + SQLite MetadataMain Components
MCP Server
The MCP server is the controlled backend interface. It exposes safe tools for document collaboration.
Entry point:
src/dpr_mcp/server.pyImportant tools:
create_projectcreate_workspaceread_project_fileread_change_filecreate_fileedit_filecreate_changereview_changeapprove_changemerge_changeget_diffget_file_patchget_conflictspropose_conflict_resolutionapply_conflict_resolutionrollback_changeget_provenance
Run directly:
python -m dpr_mcp.serverThe server speaks MCP over stdio. Usually a client communicates with it; you do not manually type into the process.
Real MCP Client
The reusable MCP client lives here:
src/dpr_mcp/mcp/client.pyIt starts/connects to the DPR MCP server over stdio and calls tools by name. This is the same idea used by external MCP clients such as Claude Code.
Run the real client demo:
python examples\real_mcp_client.pyExpected output:
Connected to DPR MCP server. 35 tools available.
Project: client-demo
Workspace: ws-...
Change request: CR-...
Open changes: 1React Dashboard
The dashboard is the human-facing UI.
It lets a user:
choose the local DPR root folder
create projects
view documents
run agents
inspect Change Requests
review diffs
merge approved changes
inspect conflicts
view history and provenance
Backend:
src/dpr_mcp/dashboard.pyFrontend:
frontend/LangGraph Agents
The agent workflow layer lives here:
src/dpr_mcp/agents/workflows.pyThe live dashboard agent actions create a real DPRMCPClient, connect to the
MCP server over stdio, and call MCP tools. So the agent path is now:
Dashboard -> LangGraph Agent -> DPRMCPClient -> MCP Server -> MCP ToolsCurrent agents:
Draft Agent
Reviewer Agent
Compliance Agent
Conflict Resolver Agent
LLM integration lives here:
src/dpr_mcp/agents/llm.pySupported modes:
Groq
OpenAI
fallback mode if no key is configured
Agent Workflow
Draft Agent
The Draft Agent creates or improves a document.
Example prompt:
Write a detailed report about smart waste segregation for a college campus.Internal flow:
Dashboard
-> LangGraph Draft Agent
-> DPRMCPClient
-> MCP server
-> list_files
-> read_project_file if the file exists
-> create_workspace
-> create_file or edit_file
-> create_changeResult:
A new Change Request is created.
The file is not directly merged into main.Reviewer Agent
The Reviewer Agent checks:
clarity
structure
completeness
technical usefulness
whether the change matches the user's intent
Internal flow:
Reviewer Agent
-> DPRMCPClient
-> get_change
-> get_diff
-> get_file_patch
-> review_changeResult:
A review comment is added to the Change Request.The Reviewer Agent does not replace human approval. It provides feedback before a human decides whether to merge.
Compliance Agent
The Compliance Agent checks whether a change is safe and policy-friendly.
It looks for:
unsupported file types
secrets or credentials
placeholder text
invented evidence
unsafe claims
missing report sections
Internal flow:
Compliance Agent
-> DPRMCPClient
-> get_change
-> get_diff
-> get_file_patch
-> review_changeResult:
The Change Request receives a compliance review.
If there is a blocking issue, the review requests changes.Conflict Resolver Agent
The Conflict Resolver Agent is used when Git detects a real merge conflict.
Internal flow:
Resolver Agent
-> DPRMCPClient
-> get_change
-> get_conflicts
-> create_workspace
-> read_project_file
-> read_change_file
-> edit_file
-> propose_conflict_resolutionResult:
A new resolution Change Request is created.
The human still reviews and merges the resolution.The resolver does not bypass review. It only proposes a fix.
How a Real Conflict Happens
A conflict happens when two changes edit the same part of the same file from the same old base.
Example:
main has report.mdThen:
Agent A creates CR-1 editing report.md
Agent B creates CR-2 editing the same paragraph in report.md
Human merges CR-1 first
Human tries to merge CR-2
Git detects that CR-2 was based on old main and touched the same lines
CR-2 becomes conflictedThen:
Conflict Resolver Agent reads current main and incoming CR-2
Resolver writes a combined version in a new workspace
Resolver opens a resolution CR
Human reviews and merges the resolution CRThis is a real Git conflict flow, not a fake UI-only conflict.
Where Files Are Created
The dashboard asks for a root folder.
If the root is:
C:\Users\janan\dpr-mcp\datathen the system uses:
data\projects -> canonical Git repositories
data\workspaces -> isolated Git worktrees
data\dpr_mcp.db -> SQLite metadata databaseImportant:
Documents are local files inside Git-backed project repositories.
Workspaces are temporary isolated edit areas.
SQLite stores metadata such as workspaces, changes, reviews, conflicts, and roles.Why Git Is Used
Git handles:
commits
branches
worktrees
diffs
mergeability checks
merge conflicts
merge history
rollback through forward commits
The project does not reinvent version control. It uses Git as the source of truth and adds collaboration workflow above it.
Why SQLite Is Used
Git is good for file history, but it does not naturally store collaboration metadata such as:
Change Request status
reviewer comments
approvals
conflict-resolution records
workspace ownership
role bindings
event logs
That metadata is stored in SQLite.
Human Governance
The system is intentionally human-in-the-loop.
Agents can:
draft documents
review changes
check compliance
propose conflict resolutions
Humans control:
final approval
merge
rollback
project access/root selection
This is important because the project is about safe AI-assisted collaboration, not uncontrolled autonomous editing.
Security Model
File operations are restricted to the configured repository and workspace roots.
The file security layer rejects:
absolute paths
path traversal
symlink escapes
null bytes
control characters
sensitive filenames such as
.env, private keys, and credentials
Relevant files:
src/dpr_mcp/files/security.py
src/dpr_mcp/files/service.py
tests/security/Setup
From CMD on Windows:
cd /d C:\Users\janan\dpr-mcp
python -m venv .venv
.venv\Scripts\activate
pip install -e ".[dev]"
cd frontend
npm install
cd ..If the environment already exists:
cd /d C:\Users\janan\dpr-mcp
.venv\Scripts\activateEnvironment Variables
Create a .env file in the project root if using real LLMs.
For Groq:
DPR_LLM_PROVIDER=groq
GROQ_API_KEY=your_key_here
DPR_LLM_MODEL=llama-3.3-70b-versatileFor OpenAI:
DPR_LLM_PROVIDER=openai
OPENAI_API_KEY=your_key_here
DPR_LLM_MODEL=gpt-5If no key is configured, the agents still run in fallback mode, but the content will be basic.
Run the Dashboard
Backend:
cd /d C:\Users\janan\dpr-mcp
.venv\Scripts\activate
python -m dotenv run -- python -m dpr_mcp.dashboard --host 127.0.0.1 --port 8787 --root dataFrontend:
cd /d C:\Users\janan\dpr-mcp\frontend
npm run devOpen the Vite URL shown in the terminal, usually:
http://127.0.0.1:5173The dashboard backend API runs at:
http://127.0.0.1:8787Run the MCP Server Directly
cd /d C:\Users\janan\dpr-mcp
.venv\Scripts\activate
python -m dpr_mcp.serverThis starts the MCP server over stdio.
Run the Real MCP Client Demo
cd /d C:\Users\janan\dpr-mcp
.venv\Scripts\activate
python examples\real_mcp_client.pyThis proves:
Python client
-> MCP stdio server
-> MCP tools
-> project/workspace/file/change createdRepository Map
src/dpr_mcp/server.py MCP server entry point
src/dpr_mcp/dashboard.py local dashboard HTTP API
src/dpr_mcp/mcp/tools.py MCP tool definitions
src/dpr_mcp/mcp/client.py real MCP stdio client
src/dpr_mcp/mcp/gateway.py in-process MCP-shaped gateway
src/dpr_mcp/agents/workflows.py LangGraph agent workflows
src/dpr_mcp/agents/llm.py Groq/OpenAI/fallback generation
src/dpr_mcp/projects/ project repository management
src/dpr_mcp/workspace/ isolated worktree management
src/dpr_mcp/collaboration/ changes, reviews, approvals, conflicts
src/dpr_mcp/files/ safe local file access
src/dpr_mcp/git/ Git CLI wrapper
src/dpr_mcp/persistence/ SQLite models and repositories
src/dpr_mcp/provenance/ provenance reconstruction
frontend/ React dashboard
examples/ runnable MCP and conflict demos
tests/ unit, integration, security, MCP tests
docs/ architecture and technical docsCurrent Status
Implemented:
MCP server
real MCP stdio client
React dashboard
LangGraph agents
LLM integration
local Git project repositories
isolated workspaces
Change Requests
reviews
compliance checks
merge flow
conflict detection
conflict-resolution proposals
rollback
provenance
architecture diagrams
tests
Available Tools
35 toolsabandon_changeC
Abandon a Change Request.
Inputs: change_id (required).
apply_conflict_resolutionB
Apply (merge) a previously proposed and reviewed conflict resolution. Subject to the same approval policy as any other merge.
Inputs: conflict_id (required).
approve_changeC
Convenience wrapper: approve a Change Request.
Inputs: change_id (required), comment.
check_mergeabilityB
Check whether a Change Request can merge cleanly into the project's default branch.
Inputs: change_id (required).
create_changeB
Create a Change Request from the commits in a workspace.
Inputs: rationale (required), workspace_id (required).
create_fileB
Create a new file within an active workspace.
Inputs: path (required), content (required), workspace_id (required).
create_projectC
Create a new Git-backed project.
Inputs: name (required), project_id (required).
create_workspaceA
Create an isolated Git worktree workspace for making changes to a project.
Inputs: project_id (required).
delete_fileB
Delete a file within an active workspace.
Inputs: path (required), workspace_id (required).
delete_workspaceB
Delete (remove) a workspace you own.
Inputs: workspace_id (required).
edit_fileC
Edit (overwrite) an existing file within an active workspace.
Inputs: path (required), content (required), workspace_id (required).
get_changeC
Get a Change Request by id.
Inputs: change_id (required).
get_conflictsA
Get structured conflict information for a conflicted Change Request.
Inputs: change_id (required).
get_diffC
Get a structured diff between two revisions in a project.
Inputs: project_id (required), base_revision (required), head_revision (required).
get_file_patchC
Get a textual patch for one file between two project revisions.
Inputs: path (required), project_id (required), base_revision (required), head_revision (required).
get_historyA
Get commit history for a project, optionally scoped to a path.
Inputs: project_id (required), path, limit, revision. Returns: result
get_project_statusA
Get a summary status (branches, open changes, active workspaces) for a project.
Inputs: project_id (required).
get_provenanceB
Get the complete provenance record for a Change Request.
Inputs: change_id (required).
get_revisionC
Get details for a single commit revision.
Inputs: revision (required), project_id (required).
get_workspaceB
Get details of a workspace by id.
Inputs: workspace_id (required).
list_changesA
List Change Requests for a project, optionally filtered by status.
Inputs: project_id (required), status. Returns: result
list_filesA
List files within a project (optionally under a subpath) at HEAD.
Inputs: project_id (required), subpath. Returns: result
list_projectsA
List all projects known to this server.
Inputs: no named parameters. Returns: result
list_workspacesA
List active workspaces for a project.
Inputs: project_id (required). Returns: result
merge_changeA
Merge an approved, conflict-free Change Request into the project's default branch.
Inputs: change_id (required).
propose_conflict_resolutionA
Propose a resolution to a conflicted Change Request, using commits already made in a separate resolver workspace. This creates a new, independently reviewable Change Request linked to the original conflict.
Inputs: change_id (required), rationale (required), resolver_workspace_id (required).
read_change_fileA
Read a file as it exists in a Change Request head revision.
Inputs: path (required), change_id (required).
read_fileC
Read a file's content from within an active workspace.
Inputs: path (required), workspace_id (required).
read_project_fileB
Read a file from a project revision, defaulting to the default branch.
Inputs: path (required), project_id (required), revision.
rebase_changeB
Rebase a Change Request's workspace branch onto the current default branch.
Inputs: change_id (required).
request_changesC
Convenience wrapper: request changes on a Change Request.
Inputs: comment (required), change_id (required).
review_changeC
Record a review (APPROVED, CHANGES_REQUESTED, or COMMENTED) on a Change Request.
Inputs: decision (required), change_id (required), comment.
rollback_changeA
Roll back a previously merged commit on the project's default branch by creating a new forward commit that restores the prior state (never rewrites history).
Inputs: commit_sha (required), project_id (required), rationale.
search_filesA
Search file contents within a project's default branch checkout.
Inputs: query (required), project_id (required).
update_changeA
Update a Change Request's rationale and refresh its head revision.
Inputs: change_id (required), rationale.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Read_file, read_project_file, and read_change_file all fetch file content from different contexts, and approve_change/request_changes are convenience wrappers over review_change. Descriptions help, but the boundaries are easy to mix up in a set of this size.
Snake_case imperative verb_noun naming is used consistently throughout, with no mixed casing styles. Minor deviations exist in get_/read_/ list_ patterns and the pluralized request_changes, but overall the naming is predictable.
At 35 tools, the set clearly exceeds the 25+ threshold and feels heavy for an agent to navigate. Many operations are needed, but convenience wrappers and several file-read/diff variants add avoidable bulk.
The domain is broadly covered: workspaces and files, change creation/update/review/merge/rebase/rollback, conflict handling, and provenance. Missing project update/delete operations are a minor gap, but core workflows have no dead ends.
Maintenance
Related MCP Connectors
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Shared project docs, task planning and GitHub evidence for people and their AI agents.
A separate workspace for your AI agents: documents, tickets, canvases and memory.
Linked team workspace: AI agents read and write docs, wikis, sheets, diagrams, boards and reviews.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables multiple AI coding agents to collaborate on the same Git repository without conflicts through isolated worktrees, file locking, automated test verification, and a serialized merge queue.8MIT
- AlicenseBqualityDmaintenanceProvides a Model Context Protocol interface for secure, multi-agent collaboration on Git repositories, offering isolated workspaces, change requests, reviews, and approval workflows with Git as the source of truth.32MIT
- AlicenseAqualityDmaintenanceEnables AI agents to perform safe, semantic edits on Markdown and DOCX documents through a normalized model with staging, diff review, and stale-edit protection.13MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run structured preflight checks and identity-scoped Git operations, committing, pushing and opening GitHub PRs with the correct Git name, email, SSH key and signature for each repository. Persistent changes require exact proposals, human approval by default and recoverable, idempotent apply.77 PyPIMIT