mcp-metsuke-crunchtools 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. mcp_metsuke_crunchtools-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +67 -0
  2. mcp_metsuke_crunchtools-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. mcp_metsuke_crunchtools-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +50 -0
  4. mcp_metsuke_crunchtools-0.1.0/.github/workflows/ci.yml +62 -0
  5. mcp_metsuke_crunchtools-0.1.0/.github/workflows/container.yml +101 -0
  6. mcp_metsuke_crunchtools-0.1.0/.github/workflows/publish.yml +24 -0
  7. mcp_metsuke_crunchtools-0.1.0/.github/workflows/security.yml +94 -0
  8. mcp_metsuke_crunchtools-0.1.0/.gitignore +98 -0
  9. mcp_metsuke_crunchtools-0.1.0/.pre-commit-config.yaml +19 -0
  10. mcp_metsuke_crunchtools-0.1.0/.specify/memory/constitution.md +233 -0
  11. mcp_metsuke_crunchtools-0.1.0/.specify/specs/000-baseline/spec.md +64 -0
  12. mcp_metsuke_crunchtools-0.1.0/.specify/templates/plan-template.md +117 -0
  13. mcp_metsuke_crunchtools-0.1.0/.specify/templates/spec-template.md +91 -0
  14. mcp_metsuke_crunchtools-0.1.0/CLAUDE.md +54 -0
  15. mcp_metsuke_crunchtools-0.1.0/Containerfile +48 -0
  16. mcp_metsuke_crunchtools-0.1.0/LICENSE +661 -0
  17. mcp_metsuke_crunchtools-0.1.0/PKG-INFO +108 -0
  18. mcp_metsuke_crunchtools-0.1.0/README.md +84 -0
  19. mcp_metsuke_crunchtools-0.1.0/SECURITY.md +116 -0
  20. mcp_metsuke_crunchtools-0.1.0/gourmand-exceptions.toml +129 -0
  21. mcp_metsuke_crunchtools-0.1.0/gourmand.toml +22 -0
  22. mcp_metsuke_crunchtools-0.1.0/pyproject.toml +82 -0
  23. mcp_metsuke_crunchtools-0.1.0/server.json +21 -0
  24. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/__init__.py +52 -0
  25. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/__main__.py +5 -0
  26. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/config.py +55 -0
  27. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/database.py +189 -0
  28. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/errors.py +24 -0
  29. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/models.py +48 -0
  30. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/server.py +159 -0
  31. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/tools/__init__.py +16 -0
  32. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/tools/definitions.py +36 -0
  33. mcp_metsuke_crunchtools-0.1.0/src/mcp_metsuke_crunchtools/tools/outputs.py +54 -0
  34. mcp_metsuke_crunchtools-0.1.0/tests/__init__.py +1 -0
  35. mcp_metsuke_crunchtools-0.1.0/tests/conftest.py +32 -0
  36. mcp_metsuke_crunchtools-0.1.0/tests/test_tools.py +137 -0
  37. mcp_metsuke_crunchtools-0.1.0/tests/test_validation.py +84 -0
@@ -0,0 +1,67 @@
1
+ name: Bug Report
2
+ description: Report a bug or unexpected behavior
3
+ title: "[Bug]: "
4
+ labels: ["bug", "triage"]
5
+ body:
6
+ - type: textarea
7
+ id: description
8
+ attributes:
9
+ label: Bug Description
10
+ description: A clear description of the bug
11
+ placeholder: What happened?
12
+ validations:
13
+ required: true
14
+
15
+ - type: textarea
16
+ id: steps
17
+ attributes:
18
+ label: Steps to Reproduce
19
+ description: How can we reproduce this bug?
20
+ placeholder: |
21
+ 1. Call tool '...' with args '...'
22
+ 2. Observe error '...'
23
+ validations:
24
+ required: true
25
+
26
+ - type: textarea
27
+ id: expected
28
+ attributes:
29
+ label: Expected Behavior
30
+ description: What did you expect to happen?
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: actual
36
+ attributes:
37
+ label: Actual Behavior
38
+ description: What actually happened? Include error messages if available.
39
+ validations:
40
+ required: true
41
+
42
+ - type: dropdown
43
+ id: transport
44
+ attributes:
45
+ label: Transport
46
+ description: How are you running the MCP server?
47
+ options:
48
+ - stdio (uvx / pip)
49
+ - streamable-http (container / systemd)
50
+ - SSE
51
+ validations:
52
+ required: true
53
+
54
+ - type: input
55
+ id: version
56
+ attributes:
57
+ label: Server Version
58
+ description: Output of `mcp-metsuke-crunchtools --version` or pip show
59
+ placeholder: "0.1.0"
60
+ validations:
61
+ required: true
62
+
63
+ - type: textarea
64
+ id: additional
65
+ attributes:
66
+ label: Additional Context
67
+ description: Any other relevant information (logs, config, environment)
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: fastembed Documentation
4
+ url: https://qdrant.github.io/fastembed/
5
+ about: Check fastembed docs for embedding model questions
@@ -0,0 +1,50 @@
1
+ name: Feature Request
2
+ description: Suggest a new tool or enhancement
3
+ title: "[Feature]: "
4
+ labels: ["enhancement", "triage"]
5
+ body:
6
+ - type: textarea
7
+ id: problem
8
+ attributes:
9
+ label: Problem Statement
10
+ description: What problem does this feature solve?
11
+ placeholder: I need to...
12
+ validations:
13
+ required: true
14
+
15
+ - type: textarea
16
+ id: solution
17
+ attributes:
18
+ label: Proposed Solution
19
+ description: Describe the tool or change you'd like
20
+ placeholder: |
21
+ Tool name: `metsuke_something`
22
+ Parameters: ...
23
+ validations:
24
+ required: true
25
+
26
+ - type: textarea
27
+ id: alternatives
28
+ attributes:
29
+ label: Alternatives Considered
30
+ description: What alternatives have you considered?
31
+
32
+ - type: dropdown
33
+ id: scope
34
+ attributes:
35
+ label: Tool Category
36
+ description: Which area does this feature belong to?
37
+ options:
38
+ - Search
39
+ - Index Management
40
+ - Status
41
+ - File Extraction
42
+ - New Category
43
+ validations:
44
+ required: true
45
+
46
+ - type: textarea
47
+ id: additional
48
+ attributes:
49
+ label: Additional Context
50
+ description: Any other relevant information or examples
@@ -0,0 +1,62 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v4
20
+ with:
21
+ version: "latest"
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ run: uv python install ${{ matrix.python-version }}
24
+ - name: Install dependencies
25
+ run: uv sync --all-extras
26
+ - name: Run linter
27
+ run: uv run ruff check src tests
28
+ - name: Run type checker
29
+ run: uv run mypy src
30
+ - name: Run tests
31
+ run: uv run pytest -v
32
+
33
+ gourmand:
34
+ name: Code Quality (Gourmand)
35
+ runs-on: ubuntu-latest
36
+ container:
37
+ image: quay.io/crunchtools/gourmand:latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - name: Run Gourmand
41
+ run: gourmand --full .
42
+
43
+ build-container:
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ - name: Build container image
48
+ run: docker build -f Containerfile -t mcp-metsuke:test .
49
+ - name: Verify container
50
+ run: timeout 5 docker run --rm mcp-metsuke:test || true
51
+
52
+ validate-constitution:
53
+ name: Constitution Validation
54
+ runs-on: ubuntu-latest
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - uses: actions/checkout@v4
58
+ with:
59
+ repository: crunchtools/constitution
60
+ path: .constitution
61
+ - name: Validate constitution
62
+ run: python3 .constitution/validate-constitution.py .specify/memory/constitution.md --verbose
@@ -0,0 +1,101 @@
1
+ name: Container Build & Push
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+
11
+ env:
12
+ QUAY_IMAGE: quay.io/crunchtools/mcp-metsuke
13
+ GHCR_IMAGE: ghcr.io/crunchtools/mcp-metsuke
14
+
15
+ jobs:
16
+ build-and-push-quay:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@v4
23
+ - name: Set up Docker Buildx
24
+ uses: docker/setup-buildx-action@v3
25
+ - name: Log in to Quay.io
26
+ if: github.event_name != 'pull_request'
27
+ uses: docker/login-action@v3
28
+ with:
29
+ registry: quay.io
30
+ username: ${{ secrets.QUAY_USERNAME }}
31
+ password: ${{ secrets.QUAY_PASSWORD }}
32
+ - name: Extract metadata
33
+ id: meta
34
+ uses: docker/metadata-action@v5
35
+ with:
36
+ images: ${{ env.QUAY_IMAGE }}
37
+ tags: |
38
+ type=ref,event=branch
39
+ type=ref,event=pr
40
+ type=semver,pattern={{version}}
41
+ type=semver,pattern={{major}}.{{minor}}
42
+ type=raw,value=latest,enable={{is_default_branch}}
43
+ - name: Build and push
44
+ uses: docker/build-push-action@v6
45
+ with:
46
+ context: .
47
+ file: ./Containerfile
48
+ push: ${{ github.event_name != 'pull_request' }}
49
+ tags: ${{ steps.meta.outputs.tags }}
50
+ labels: ${{ steps.meta.outputs.labels }}
51
+ cache-from: type=gha
52
+ cache-to: type=gha,mode=max
53
+ - name: Run Trivy vulnerability scanner
54
+ continue-on-error: true
55
+ if: github.event_name != 'pull_request'
56
+ uses: aquasecurity/trivy-action@0.35.0
57
+ with:
58
+ image-ref: ${{ env.QUAY_IMAGE }}:latest
59
+ format: "table"
60
+ exit-code: "0"
61
+ severity: "CRITICAL,HIGH"
62
+ version: "v0.68.2"
63
+
64
+ build-and-push-ghcr:
65
+ runs-on: ubuntu-latest
66
+ needs: build-and-push-quay
67
+ if: github.event_name != 'pull_request'
68
+ permissions:
69
+ contents: read
70
+ packages: write
71
+ steps:
72
+ - name: Checkout repository
73
+ uses: actions/checkout@v4
74
+ - name: Set up Docker Buildx
75
+ uses: docker/setup-buildx-action@v3
76
+ - name: Log in to GitHub Container Registry
77
+ uses: docker/login-action@v3
78
+ with:
79
+ registry: ghcr.io
80
+ username: ${{ github.repository_owner }}
81
+ password: ${{ github.token }}
82
+ - name: Extract metadata
83
+ id: meta
84
+ uses: docker/metadata-action@v5
85
+ with:
86
+ images: ${{ env.GHCR_IMAGE }}
87
+ tags: |
88
+ type=ref,event=branch
89
+ type=ref,event=pr
90
+ type=semver,pattern={{version}}
91
+ type=semver,pattern={{major}}.{{minor}}
92
+ type=raw,value=latest,enable={{is_default_branch}}
93
+ - name: Build and push
94
+ uses: docker/build-push-action@v6
95
+ with:
96
+ context: .
97
+ file: ./Containerfile
98
+ push: true
99
+ tags: ${{ steps.meta.outputs.tags }}
100
+ labels: ${{ steps.meta.outputs.labels }}
101
+ cache-from: type=gha
@@ -0,0 +1,24 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v4
17
+ with:
18
+ version: "latest"
19
+ - name: Set up Python
20
+ run: uv python install 3.12
21
+ - name: Build package
22
+ run: uv build
23
+ - name: Publish to PyPI
24
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,94 @@
1
+ name: Security Scan
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 9 * * 1"
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ issues: write
15
+ pull-requests: write
16
+ security-events: write
17
+
18
+ jobs:
19
+ dependency-audit:
20
+ name: Dependency CVE Scan
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v4
26
+ with:
27
+ version: "latest"
28
+ - name: Set up Python
29
+ run: uv python install 3.12
30
+ - name: Install dependencies
31
+ run: uv sync
32
+ - name: Install pip-audit
33
+ run: uv pip install pip-audit
34
+ - name: Run pip-audit
35
+ id: audit
36
+ continue-on-error: true
37
+ run: |
38
+ uv run pip-audit --format=json --output=audit-results.json || true
39
+ uv run pip-audit --format=markdown --output=audit-results.md || true
40
+ if [ -f audit-results.json ]; then
41
+ VULN_COUNT=$(cat audit-results.json | python -c "import sys,json; data=json.load(sys.stdin); print(len([d for d in data if d.get('vulns', [])]))" 2>/dev/null || echo "0")
42
+ echo "vuln_count=$VULN_COUNT" >> $GITHUB_OUTPUT
43
+ else
44
+ echo "vuln_count=0" >> $GITHUB_OUTPUT
45
+ fi
46
+ - name: Upload audit results
47
+ if: always()
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: security-audit-results
51
+ path: |
52
+ audit-results.json
53
+ audit-results.md
54
+ retention-days: 30
55
+ - name: Fail on vulnerabilities (PRs only)
56
+ if: steps.audit.outputs.vuln_count != '0' && github.event_name == 'pull_request'
57
+ run: |
58
+ echo "::error::Security vulnerabilities found in dependencies."
59
+ exit 1
60
+
61
+ container-scan:
62
+ name: Container Security Scan
63
+ runs-on: ubuntu-latest
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - name: Build container image
67
+ run: docker build -f Containerfile -t mcp-metsuke:scan .
68
+ - name: Run Trivy vulnerability scanner
69
+ uses: aquasecurity/trivy-action@master
70
+ with:
71
+ image-ref: "mcp-metsuke:scan"
72
+ format: "sarif"
73
+ output: "trivy-results.sarif"
74
+ severity: "CRITICAL,HIGH"
75
+ - name: Upload Trivy scan results
76
+ uses: github/codeql-action/upload-sarif@v3
77
+ if: always()
78
+ with:
79
+ sarif_file: "trivy-results.sarif"
80
+
81
+ codeql:
82
+ name: CodeQL Analysis
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: actions/checkout@v4
86
+ - name: Initialize CodeQL
87
+ uses: github/codeql-action/init@v3
88
+ with:
89
+ languages: python
90
+ queries: security-extended
91
+ - name: Perform CodeQL Analysis
92
+ uses: github/codeql-action/analyze@v3
93
+ with:
94
+ category: "/language:python"
@@ -0,0 +1,98 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Unit test / coverage reports
34
+ htmlcov/
35
+ .tox/
36
+ .nox/
37
+ .coverage
38
+ .coverage.*
39
+ .cache
40
+ nosetests.xml
41
+ coverage.xml
42
+ *.cover
43
+ *.py,cover
44
+ .hypothesis/
45
+ .pytest_cache/
46
+ cover/
47
+
48
+ # Translations
49
+ *.mo
50
+ *.pot
51
+
52
+ # Environments
53
+ .env
54
+ .venv
55
+ env/
56
+ venv/
57
+ ENV/
58
+ env.bak/
59
+ venv.bak/
60
+
61
+ # IDE
62
+ .idea/
63
+ .vscode/
64
+ *.swp
65
+ *.swo
66
+ *~
67
+
68
+ # mypy
69
+ .mypy_cache/
70
+ .dmypy.json
71
+ dmypy.json
72
+
73
+ # ruff
74
+ .ruff_cache/
75
+
76
+ # uv
77
+ .uv/
78
+ uv.lock
79
+
80
+ # Local development
81
+ .envrc
82
+ .direnv/
83
+
84
+ # Gourmand
85
+ .gourmand-cache/
86
+
87
+ # Claude Code
88
+ .claude/
89
+
90
+ # OS files
91
+ .DS_Store
92
+ Thumbs.db
93
+
94
+ # MCP Registry auth tokens
95
+ .mcpregistry_*
96
+
97
+ # fastembed model cache
98
+ .fastembed_cache/
@@ -0,0 +1,19 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: ruff-check
5
+ name: ruff check
6
+ entry: uv run ruff check --fix
7
+ language: system
8
+ types: [python]
9
+ stages: [pre-commit, pre-merge-commit]
10
+ - id: ruff-format
11
+ name: ruff format
12
+ entry: uv run ruff format
13
+ language: system
14
+ types: [python]
15
+ stages: [pre-commit, pre-merge-commit]
16
+ - repo: https://github.com/crunchtools/constitution
17
+ rev: v1.6.0
18
+ hooks:
19
+ - id: validate-constitution