Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Submit a bug report to notify our team
title: '🐛 bug(component): brief description'
labels: 'bug, help wanted'

---

### 🐛 What happened?

**Expected:** [What should happen]
**Actual:** [What actually happened]

### 🔄 Steps to Reproduce

1. [First step to reproduce]
2. [Second step to reproduce]
3. [Third step where error occurs]

Walkthrough recording: [Loom link or video]

### 🌍 Environment

- OS: [e.g. macOS 14.0]
- Browser: [e.g. Chrome 120] (if applicable)
- Version: [e.g. v1.0.0]
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest a new feature or enhancement
title: '✨ feat(component): brief description'
labels: 'enhancement, help wanted'

---

### 🎯 Problem

[Description of the problem or limitation this addresses]

### 💡 Proposed Solution

[Description of the desired feature or enhancement]

### 🤔 Alternatives Considered

[Other approaches considered, if any] (optional)
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Pull Request
about: Submit a pull request for review
title: '🔄 type(scope): brief description'

---

[Brief description of changes and purpose]

Closes #[issue-number]

> [!WARNING]
>
> [Any merge requirements or dependencies]

### 🎯 Key Features

- **[Feature name]:** [Description of functionality or change]

### 💼 Business Impact

- **[Impact area]:** [How this benefits users or business]

### 🔧 Technical Highlights

- **[Technical aspect]:** [Implementation details or improvements]

---
72 changes: 72 additions & 0 deletions .github/workflows/auto-update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Update Documentation

on:
workflow_call: {}
workflow_dispatch: {} # Manual trigger for testing

concurrency:
group: update-docs
cancel-in-progress: true

jobs:
update-docs:
name: Update ${{ matrix.manager }} docs
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
max-parallel: 1 # Prevent commit conflicts
matrix:
include:
- manager: pip
repo: pypa/pip
docs_path: docs
target_dir: src/assets/pip
- manager: poetry
repo: python-poetry/poetry
docs_path: docs
target_dir: src/assets/poetry
- manager: uv
repo: astral-sh/uv
docs_path: docs
target_dir: src/assets/uv
- manager: conda
repo: conda/conda
docs_path: docs
target_dir: src/assets/conda

steps:
- name: Checkout main repo
uses: actions/checkout@v4

- name: Checkout ${{ matrix.manager }} docs
uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
sparse-checkout: |
${{ matrix.docs_path }}
path: temp-docs

- name: Copy documentation files
run: |
# Create target directory if not exist
mkdir -p ${{ matrix.target_dir }}

# Copy docs and preserve structure with metadata
cp -a temp-docs/${{ matrix.docs_path }}/* ${{ matrix.target_dir }}/

# Add metadata file with source info
echo "source_repo: ${{ matrix.repo }}" > ${{ matrix.target_dir }}/_metadata.yml
echo "docs_path: ${{ matrix.docs_path }}" >> ${{ matrix.target_dir }}/_metadata.yml
echo "updated_at: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> ${{ matrix.target_dir }}/_metadata.yml
echo "commit_sha: $(cd temp-docs && git rev-parse HEAD)" >> ${{ matrix.target_dir }}/_metadata.yml

- name: Auto commit changes to main
# Pin 3rd-party action to v6.0.1 commit hash released on 2025-06-11 to prevent supply chain attacks
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0
with:
commit_message: 'docs(src/assets/): update ${{ matrix.manager }} official documentation'
commit_options: '--signoff'
file_pattern: 'src/assets/${{ matrix.manager }}/*'
disable_globbing: true
status_options: '--untracked-files=no'
23 changes: 23 additions & 0 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Auto Update Orchestrator

on:
schedule:
# Tuesday 6pm ET (22:00 UTC, accounting for EST/EDT)
- cron: '0 22 * * 2'
workflow_dispatch: {} # Manual trigger for testing

jobs:
update-docs:
name: Update Documentation
uses: ./.github/workflows/auto-update-docs.yml

# TODO: Add when implemented
# update-index:
# name: Update Search Index
# needs: update-docs
# uses: ./.github/workflows/auto-update-index.yml

# build-deploy:
# name: Build and Deploy
# needs: update-index
# uses: ./.github/workflows/auto-build-and-deploy.yml
55 changes: 53 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ nosetests.xml
coverage.xml
*.cover
*.py.cover
*.lcov
.hypothesis/
.pytest_cache/
.nyc_output
cover/

# Translations
Expand Down Expand Up @@ -137,6 +139,10 @@ celerybeat.pid
# Environments
.env
.envrc
.env.development.local
.env.test.local
.env.production.local
.env.local
.venv
env/
venv/
Expand Down Expand Up @@ -173,7 +179,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
Expand All @@ -186,7 +192,11 @@ cython_debug/
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/
.vscode/*
!.vscode/extensions.json

# Sublime Text
*.sublime-workspace

# Ruff stuff:
.ruff_cache/
Expand All @@ -205,3 +215,44 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/

# OS and System Files
# macOS - System files that store metadata, icons, and settings
.DS_Store
.DS_Store?
._*
.AppleDouble
.LSOverride
Icon?
.Spotlight-V100
.Trashes

# Windows - System-generated files and folders
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
[Dd]esktop.ini
$RECYCLE.BIN/
*.lnk

# Linux - System and folder-specific files
.directory
.Trash-*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Additional logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Cache directories
.parcel-cache
92 changes: 90 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,90 @@
# python-dep-manager-companion-mcp-server
A local Model Context Protocol (MCP) server that unifies the latest documentation for all Python dependency managers, making it instantly searchable from your agentic IDE.
# Python Dependency Manager MCP Server

> Updated on 2025-07-15 by @KemingHe

Local MCP server providing unified search across Python dependency manager documentation.

## 📋 Overview

Unified search for pip, poetry, uv, and conda docs via Docker with weekly auto-updates. Built with FastMCP and Tantivy.

## 🚀 Getting Started

### Step 1: Pull Docker Image

```shell
docker pull keminghe/py-dep-man-companion:latest
```

### Step 2: Configure Your IDE

Add to VSCode User Settings (JSON):

```json
{
"mcp": {
"servers": {
"python-deps": {
"command": "docker",
"args": ["run", "-i", "--rm", "keminghe/py-dep-man-companion:latest"]
}
}
}
}
```

### Step 3: Start Searching

Query latest and unified documentation across all supported Python dependency managers directly from your AI assistant.

## 📁 Project Structure

```plaintext
python-dep-manager-companion-mcp-server/
├── .github/workflows/
│ ├── auto-update.yml # Orchestrator: Tuesday 6pm ET
│ └── auto-update-docs.yml # Modular: Doc fetching workflow
├── docs/ # Project documentation
├── src/
│ ├── server.py # FastMCP server implementation
│ ├── index.py # Tantivy search engine
│ └── assets/ # Local documentation files
│ ├── pip/ # Pip documentation .md files
│ ├── poetry/ # Poetry documentation .md files
│ ├── uv/ # UV documentation .md files
│ └── conda/ # Conda documentation .md files
├── Dockerfile # Container build configuration
└── pyproject.toml # Project dependencies and metadata
```

## 🛠️ Development

**Transport Support**: Stdio (default) and HTTP modes following MCP standards.

**Environment Variables**:

- `TRANSPORT_MODE`: `stdio` or `http` (default: `stdio`)
- `TRANSPORT_PORT`: HTTP server port (default: `8080`)
- `TRANSPORT_HOST`: Host binding (default: `127.0.0.1`)

**Local Development**:

```shell
# Clone and setup
git clone <repo-url>
cd python-dep-manager-companion-mcp-server
uv sync

# Run server
uv run python src/server.py stdio
```

**Roadmap**: Adding support for pipenv, pdm, pixi, and additional Python package managers.

## 📄 License

This project is licensed under the [MIT License](./LICENSE) - a permissive license that allows free use, modification, and distribution with attribution.

## 📞 Support

Open GitHub issues for bug reports and feature requests. Weekly documentation updates run automatically every Tuesday at 6pm ET with signed commits by `github-actions[bot]`.
Loading