dpr-mcp
DPR Git-Backed MCP Collaboration Server
一个独立的 Model Context Protocol 服务器, 在本地 Git 仓库之上提供安全的多智能体、人在环协作接口。
Git 仍然是文件、提交、分支、差异和合并历史的唯一事实来源。该服务器在其 之上增加了协作控制平面:身份、授权、隔离工作区、变更请求、评审、审批策略、 冲突工作流、回滚和溯源。
这是第一阶段:一个独立服务器,可被 Claude Code、VS Code 代理或任何 其他兼容 MCP 的客户端独立使用。它不依赖 DPR 多智能体推理项目。
快速开始
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Optional: configure who this server instance acts as. Defaults to
# human:$USER driving agent:claude-code.
export DPR_PRINCIPAL_ID=charan
export DPR_ACTOR_ID=claude-code
# Optional: where projects/workspaces/the collaboration DB live.
export DPR_REPOSITORY_ROOT=./data/projects
export DPR_WORKSPACE_ROOT=./data/workspaces
export DPR_DATABASE_URL=sqlite:///./data/dpr_mcp.db
dpr-mcp服务器通过 stdio 使用 MCP 协议通信。将任何兼容 MCP 的客户端(Claude
Code、MCP Inspector、自定义客户端)指向 dpr-mcp 命令即可。
Related MCP server: MCP Server
示例流程
create_project(project_id="demo", name="Demo Project")
create_workspace(project_id="demo") -> workspace_id
create_file(workspace_id, "notes.md", "# Hi")
create_change(workspace_id, rationale="Add notes") -> change_id
review_change(change_id, decision="APPROVED") # as a human reviewer
merge_change(change_id)
get_provenance(change_id)参见 examples/ 获取可运行脚本,包括多智能体冲突场景
(examples/multi_agent_demo.py、examples/conflict_demo.py)。
架构
完整说明参见 docs/architecture.md。简而言之:
MCP Client
|
v
DPR MCP Server (identity, authz, workspaces, changes, reviews, policy,
| conflicts, provenance)
v
Git Repository (commits, branches, diffs, merge)Git 从未被重新发明:分支、提交、差异和合并全部通过单一的 GitRepository
抽象(src/dpr_mcp/git/repository.py)委托给真正的 git CLI。Git 无法
建模的协作状态(变更请求、评审、审批、工作区、策略)存储在一个小型
SQLite 数据库(src/dpr_mcp/persistence/)中。
安全
文件访问被沙箱限制在配置的项目根目录内:路径遍历、绝对路径和符号链接
逃逸均被拒绝(src/dpr_mcp/files/security.py)。敏感文件名(.env、
.pem、.key、*credentials*)默认被阻止。完整的威胁模型及其实施测试
参见 docs/security.md 和 tests/security/。
开发
pytest # unit + integration + security + mcp tests
ruff check src tests
mypy src第二阶段
第二阶段(此处未实现)将使现有的 DPR 多智能体编排器
(https://github.com/Skanda-P-R/Multi-Agent-Reasoning)成为该服务器的
MCP 客户端,从而使 DPR 的内部智能体能够通过完全相同的接口检查、创建、
修改、评审并协作集成项目工件,Git 仍然持有版本控制的真实来源,而 DPR
负责推理/编排。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables Large Language Models to interact with Git repositories through a robust API, supporting operations like repository initialization, cloning, file staging, committing, and branch management.283,703232Apache 2.0
- FlicenseNot gradedqualityNot gradedmaintenanceProvides remote filesystem operations, git repository management, and process execution capabilities for AI agents through the Model Context Protocol.
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides Git version control operations as structured tools for AI coding agents. It enables LLMs to programmatically manage repositories through actions like committing changes, rolling back code, and comparing diffs.10Apache 2.0
- AlicenseCqualityDmaintenanceA Model Context Protocol server that provides 29 Git operations and advanced workflows, enabling AI assistants and developers to safely manage version control.304521ISC
Related MCP Connectors
Git-backed platform for skills, tools, and context for AI agents
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Shared, permission-aware company context for AI agents, with provenance, approvals and audit.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Charan-Sharan/dpr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server