yamcps 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.
- yamcps-0.1.0/.github/workflows/workflow.yaml +63 -0
- yamcps-0.1.0/.gitignore +228 -0
- yamcps-0.1.0/AGENTS.md +116 -0
- yamcps-0.1.0/LICENSE +21 -0
- yamcps-0.1.0/PKG-INFO +67 -0
- yamcps-0.1.0/README.md +46 -0
- yamcps-0.1.0/contributing.md +153 -0
- yamcps-0.1.0/docs/design.md +300 -0
- yamcps-0.1.0/docs/user-manual.md +380 -0
- yamcps-0.1.0/plugins/yamcps-demo/README.md +4 -0
- yamcps-0.1.0/plugins/yamcps-demo/pyproject.toml +18 -0
- yamcps-0.1.0/plugins/yamcps-demo/src/yamcps_demo/__init__.py +19 -0
- yamcps-0.1.0/plugins/yamcps-demo/src/yamcps_demo/skills/demo-echo/SKILL.md +7 -0
- yamcps-0.1.0/plugins/yamcps-demo-secrets/README.md +41 -0
- yamcps-0.1.0/plugins/yamcps-demo-secrets/pyproject.toml +18 -0
- yamcps-0.1.0/plugins/yamcps-demo-secrets/src/yamcps_demo_secrets/__init__.py +73 -0
- yamcps-0.1.0/plugins/yamcps-demo-secrets/src/yamcps_demo_secrets/skills/demo-secrets-check/SKILL.md +10 -0
- yamcps-0.1.0/plugins/yamcps-prowlarr/README.md +71 -0
- yamcps-0.1.0/plugins/yamcps-prowlarr/pyproject.toml +18 -0
- yamcps-0.1.0/plugins/yamcps-prowlarr/src/yamcps_prowlarr/__init__.py +88 -0
- yamcps-0.1.0/plugins/yamcps-prowlarr/src/yamcps_prowlarr/client.py +153 -0
- yamcps-0.1.0/plugins/yamcps-prowlarr/src/yamcps_prowlarr/service.py +229 -0
- yamcps-0.1.0/plugins/yamcps-prowlarr/src/yamcps_prowlarr/skills/prowlarr-search/SKILL.md +24 -0
- yamcps-0.1.0/plugins/yamcps-radarr/README.md +73 -0
- yamcps-0.1.0/plugins/yamcps-radarr/pyproject.toml +18 -0
- yamcps-0.1.0/plugins/yamcps-radarr/src/yamcps_radarr/__init__.py +87 -0
- yamcps-0.1.0/plugins/yamcps-radarr/src/yamcps_radarr/client.py +168 -0
- yamcps-0.1.0/plugins/yamcps-radarr/src/yamcps_radarr/service.py +258 -0
- yamcps-0.1.0/plugins/yamcps-radarr/src/yamcps_radarr/skills/radarr-manage/SKILL.md +29 -0
- yamcps-0.1.0/plugins/yamcps-sonarr/README.md +72 -0
- yamcps-0.1.0/plugins/yamcps-sonarr/pyproject.toml +18 -0
- yamcps-0.1.0/plugins/yamcps-sonarr/src/yamcps_sonarr/__init__.py +88 -0
- yamcps-0.1.0/plugins/yamcps-sonarr/src/yamcps_sonarr/client.py +168 -0
- yamcps-0.1.0/plugins/yamcps-sonarr/src/yamcps_sonarr/service.py +317 -0
- yamcps-0.1.0/plugins/yamcps-sonarr/src/yamcps_sonarr/skills/sonarr-manage/SKILL.md +29 -0
- yamcps-0.1.0/pyproject.toml +40 -0
- yamcps-0.1.0/scripts/verify_release.py +69 -0
- yamcps-0.1.0/src/yamcps/__init__.py +16 -0
- yamcps-0.1.0/src/yamcps/__main__.py +3 -0
- yamcps-0.1.0/src/yamcps/cli.py +82 -0
- yamcps-0.1.0/src/yamcps/connectors.py +99 -0
- yamcps-0.1.0/src/yamcps/onboarding.py +182 -0
- yamcps-0.1.0/src/yamcps/py.typed +0 -0
- yamcps-0.1.0/src/yamcps/registry.py +37 -0
- yamcps-0.1.0/src/yamcps/secrets.py +167 -0
- yamcps-0.1.0/src/yamcps/server.py +72 -0
- yamcps-0.1.0/src/yamcps/skills.py +110 -0
- yamcps-0.1.0/src/yamcps/vault.py +184 -0
- yamcps-0.1.0/tests/test_connectors.py +71 -0
- yamcps-0.1.0/tests/test_demo_secrets.py +99 -0
- yamcps-0.1.0/tests/test_integration.py +99 -0
- yamcps-0.1.0/tests/test_onboarding.py +252 -0
- yamcps-0.1.0/tests/test_plugin_selection.py +107 -0
- yamcps-0.1.0/tests/test_prowlarr.py +435 -0
- yamcps-0.1.0/tests/test_radarr.py +409 -0
- yamcps-0.1.0/tests/test_release.py +70 -0
- yamcps-0.1.0/tests/test_secrets.py +277 -0
- yamcps-0.1.0/tests/test_skills.py +78 -0
- yamcps-0.1.0/tests/test_sonarr.py +388 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Publish yamcps to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: pypi-${{ github.event.release.tag_name }}
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Build base distribution
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
ref: ${{ github.event.release.tag_name }}
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
- uses: actions/setup-python@v6
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.12'
|
|
27
|
+
- name: Verify release is based on main
|
|
28
|
+
run: git merge-base --is-ancestor HEAD origin/main
|
|
29
|
+
- name: Install build tools
|
|
30
|
+
run: python -m pip install build twine
|
|
31
|
+
- name: Build only the base package
|
|
32
|
+
run: python -m build --outdir dist/base .
|
|
33
|
+
- name: Validate distribution identity and release version
|
|
34
|
+
env:
|
|
35
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
36
|
+
run: python scripts/verify_release.py dist/base --tag "$RELEASE_TAG"
|
|
37
|
+
- name: Check PyPI metadata
|
|
38
|
+
run: python -m twine check --strict dist/base/*
|
|
39
|
+
- uses: actions/upload-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: yamcps-distributions
|
|
42
|
+
path: dist/base/*
|
|
43
|
+
if-no-files-found: error
|
|
44
|
+
retention-days: 7
|
|
45
|
+
|
|
46
|
+
publish:
|
|
47
|
+
name: Publish base distribution
|
|
48
|
+
needs: build
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
environment:
|
|
51
|
+
name: pypi
|
|
52
|
+
url: https://pypi.org/p/yamcps
|
|
53
|
+
permissions:
|
|
54
|
+
id-token: write
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/download-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: yamcps-distributions
|
|
59
|
+
path: dist/base
|
|
60
|
+
- name: Publish yamcps only
|
|
61
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
62
|
+
with:
|
|
63
|
+
packages-dir: dist/base/
|
yamcps-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
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
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# Local WebUI secret
|
|
223
|
+
/.webui_secret_key
|
|
224
|
+
|
|
225
|
+
# Local yamcps encrypted vaults and master keys
|
|
226
|
+
*.yamcps-vault
|
|
227
|
+
*.yamcps-key
|
|
228
|
+
*.yamcps-vault.lock
|
yamcps-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Consignes du dépôt yamcps
|
|
2
|
+
|
|
3
|
+
## Projet et repères
|
|
4
|
+
|
|
5
|
+
yamcps (Yet Another Model Context Protocole Server) est un serveur MCP Python ≥ 3.12 distribué avec Hatchling.
|
|
6
|
+
Les connecteurs sont des packages indépendants nommés `yamcps-<nom>`.
|
|
7
|
+
Lire `docs/design.md` avant de modifier l’architecture ou le contrat des plugins,
|
|
8
|
+
`docs/user-manual.md` pour le comportement utilisateur et `contributing.md` pour
|
|
9
|
+
le workflow détaillé de contribution.
|
|
10
|
+
|
|
11
|
+
- `src/yamcps` : cœur, CLI, découverte des plugins, registre et catalogue de skills.
|
|
12
|
+
- `plugins/yamcps-demo` : exemple de distribution autonome et skill embarqué.
|
|
13
|
+
- `plugins/yamcps-demo-secrets` : démo du coffre interactif, token et Basic Auth sans API externe.
|
|
14
|
+
- `plugins/yamcps-sonarr` : connecteur API Sonarr, sans appel réseau à l’import/configuration.
|
|
15
|
+
- `plugins/yamcps-radarr` : connecteur indépendant pour les films et l’API Radarr.
|
|
16
|
+
- `plugins/yamcps-prowlarr` : indexeurs et recherche en lecture seule, sans grab ni configuration.
|
|
17
|
+
- `tests` : tests du cœur et intégrations MCP.
|
|
18
|
+
- `pyproject.toml` : versions Python, dépendances et configuration des outils.
|
|
19
|
+
|
|
20
|
+
## Règles d’implémentation
|
|
21
|
+
|
|
22
|
+
- Suivre PEP 8 et utiliser Ruff pour le formatage et le lint. Respecter la
|
|
23
|
+
configuration du dépôt, notamment la longueur de ligne de 100 caractères.
|
|
24
|
+
- Fonctions et variables : `snake_case` ; classes : `PascalCase` ; constantes :
|
|
25
|
+
`UPPER_CASE` ; modules : minuscules, avec underscores si nécessaire.
|
|
26
|
+
- Annoter les interfaces publiques et conserver la compatibilité avec mypy strict.
|
|
27
|
+
- Documenter chaque fonction et méthode publique avec une docstring au format
|
|
28
|
+
Google. Décrire arguments, retour et exceptions lorsque pertinents ; ajouter
|
|
29
|
+
des exemples quand utiles. Les docstrings du code sont en anglais ; les guides
|
|
30
|
+
du projet sont en français.
|
|
31
|
+
- Utiliser Radon pour analyser la complexité et Bandit pour les contrôles de sécurité.
|
|
32
|
+
Examiner les résultats et
|
|
33
|
+
justifier toute exception ; ne pas masquer un diagnostic pour faire passer un contrôle.
|
|
34
|
+
- Ne pas introduire de dépendance sans nécessité et ne pas modifier le contrat
|
|
35
|
+
public sans mettre à jour sa documentation et sa stratégie de compatibilité.
|
|
36
|
+
|
|
37
|
+
## Invariants du serveur
|
|
38
|
+
|
|
39
|
+
- Contrat minimal : `id: str`, `register(server: MCPServer) -> None` synchrone ;
|
|
40
|
+
handlers synchrones ou asynchrones. `skill_roots()` et
|
|
41
|
+
`configure(secrets: ConnectorSecrets)` sont facultatifs. Les connecteurs qui
|
|
42
|
+
utilisent l’assistant déclarent `required_secrets() -> Iterable[SecretSpec]`.
|
|
43
|
+
- Sans `--connector`, charger tous les plugins installés par ordre alphabétique.
|
|
44
|
+
Répéter `--connector` pour sélectionner plusieurs plugins.
|
|
45
|
+
- Découvrir via `yamcps.connectors` sans importer les plugins non sélectionnés.
|
|
46
|
+
Une factory n’a pas d’argument ; son entry point et son identifiant correspondent.
|
|
47
|
+
- Convention : `yamcps-github` / `yamcps_github` / `github`, outils et prompts préfixés
|
|
48
|
+
`github_`. Signaler explicitement doublons et erreurs de plugin.
|
|
49
|
+
- Préserver stdout pour le protocole stdio ; envoyer les logs sur stderr.
|
|
50
|
+
- Garder HTTP sur loopback par défaut. L’accès distant et l’authentification
|
|
51
|
+
nécessitent un changement de périmètre explicite.
|
|
52
|
+
- Les skills sont des fichiers servis, pas des scripts à exécuter. Préserver
|
|
53
|
+
l’indexation au démarrage, les empreintes, le refus des symlinks et des lectures
|
|
54
|
+
hors racine. Inclure les fichiers des skills dans les distributions.
|
|
55
|
+
- Demander uniquement les secrets manquants au démarrage interactif. Sans terminal,
|
|
56
|
+
échouer avec une commande de configuration, sans lire le flux MCP. Conserver
|
|
57
|
+
les chemins par défaut et la commande `yamcps secrets set --connector <nom>`.
|
|
58
|
+
- Préserver le coffre AES-256-GCM, sa clé aléatoire séparée et les saisies masquées.
|
|
59
|
+
Ne jamais exposer les secrets dans les outils MCP, arguments CLI ou logs.
|
|
60
|
+
Ne pas présenter yamcps comme un produit qualifié ou certifié ANSSI.
|
|
61
|
+
- Les plugins sont du code de confiance ; ne pas ajouter d’appels réseau à l’import.
|
|
62
|
+
Ne jamais afficher ou committer de secrets.
|
|
63
|
+
|
|
64
|
+
## Tests
|
|
65
|
+
|
|
66
|
+
- Écrire des tests pour toute nouvelle fonctionnalité et des tests de régression
|
|
67
|
+
pour les corrections.
|
|
68
|
+
- Utiliser `unittest.TestCase` et `unittest.IsolatedAsyncioTestCase` pour les nouveaux
|
|
69
|
+
tests, avec des fichiers `test_*.py` exécutables par le runner standard.
|
|
70
|
+
- La suite historique utilise pytest/pytest-asyncio : la conserver et l’exécuter
|
|
71
|
+
pendant la transition. Ne pas prétendre que `unittest discover` couvre ses
|
|
72
|
+
fonctions pytest. Ne pas convertir toute la suite sans demande liée à ce travail.
|
|
73
|
+
- Maintenir une couverture de lignes strictement supérieure à 80 % pour `yamcps`,
|
|
74
|
+
`yamcps_demo`, `yamcps_demo_secrets`, `yamcps_sonarr`, `yamcps_radarr` et `yamcps_prowlarr` ; contrôler avec Coverage et `--fail-under=81`.
|
|
75
|
+
- Pour les changements de protocole, plugins ou packaging, vérifier les intégrations
|
|
76
|
+
pertinentes : mémoire, stdio, HTTP local et installation du wheel hors du dépôt.
|
|
77
|
+
|
|
78
|
+
## Commandes de validation
|
|
79
|
+
|
|
80
|
+
Après installation selon `contributing.md` :
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
ruff format --check src plugins scripts tests
|
|
84
|
+
ruff check src plugins scripts tests
|
|
85
|
+
mypy src plugins/*/src scripts
|
|
86
|
+
radon cc src plugins/*/src scripts -s -a
|
|
87
|
+
bandit -r src plugins/*/src scripts
|
|
88
|
+
coverage run --source=yamcps,yamcps_demo,yamcps_demo_secrets,yamcps_sonarr,yamcps_radarr,yamcps_prowlarr -m pytest -q
|
|
89
|
+
coverage report --show-missing --fail-under=81
|
|
90
|
+
python -m unittest discover -s tests -p 'test_*.py'
|
|
91
|
+
python -m build
|
|
92
|
+
python -m build plugins/yamcps-demo --outdir plugins/yamcps-demo/dist
|
|
93
|
+
python -m build plugins/yamcps-demo-secrets --outdir plugins/yamcps-demo-secrets/dist
|
|
94
|
+
python -m build plugins/yamcps-sonarr --outdir plugins/yamcps-sonarr/dist
|
|
95
|
+
python -m build plugins/yamcps-radarr --outdir plugins/yamcps-radarr/dist
|
|
96
|
+
python -m build plugins/yamcps-prowlarr --outdir plugins/yamcps-prowlarr/dist
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Adapter les vérifications au changement ; une modification documentaire seule
|
|
100
|
+
requiert surtout la validation des liens et des exemples. Signaler les contrôles
|
|
101
|
+
non exécutés, leurs raisons et les échecs restants. Radon, Bandit et
|
|
102
|
+
Coverage sont des exigences de validation locale et doivent être installés
|
|
103
|
+
séparément de l’extra `dev`. Le workflow `.github/workflows/workflow.yaml` publie uniquement le package de base
|
|
104
|
+
`yamcps` à la publication d’une release. Exécuter les contrôles de développement
|
|
105
|
+
en local ; ne pas ajouter de publication automatique des plugins.
|
|
106
|
+
|
|
107
|
+
## Documentation et livraison
|
|
108
|
+
|
|
109
|
+
Garder le README bref : description, fonctionnalités, démarrage et liens.
|
|
110
|
+
Mettre les détails d’utilisation dans `docs/user-manual.md`, l’architecture et les
|
|
111
|
+
contrats dans `docs/design.md`, les règles de contribution dans `contributing.md`.
|
|
112
|
+
Mettre à jour les documents concernés lorsqu’un comportement change.
|
|
113
|
+
|
|
114
|
+
Avant livraison, relire le diff et résumer les changements, vérifications et
|
|
115
|
+
limites. Ne pas publier sur PyPI sans instruction explicite. Le nom `yamcps` est réservé pour le projet. Ne jamais déclencher de release
|
|
116
|
+
ou publier une version sans instruction explicite.
|
yamcps-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JoReci
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
yamcps-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: yamcps
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Yet Another Model Context Protocole Server: a plugin-based MCP server with skills
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Requires-Dist: cryptography<51,>=46
|
|
9
|
+
Requires-Dist: mcp<3,>=2.3
|
|
10
|
+
Requires-Dist: pydantic<3,>=2
|
|
11
|
+
Requires-Dist: pyyaml<7,>=6
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: build; extra == 'dev'
|
|
14
|
+
Requires-Dist: hatchling; extra == 'dev'
|
|
15
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
16
|
+
Requires-Dist: pytest-asyncio>=1; extra == 'dev'
|
|
17
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
18
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
19
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# yamcps — Yet Another Model Context Protocole Server
|
|
23
|
+
|
|
24
|
+
**yamcps** est un serveur MCP Python extensible qui expose les fonctionnalités de
|
|
25
|
+
connecteurs à des assistants compatibles avec le Model Context Protocol.
|
|
26
|
+
Python 3.12 ou supérieur est requis.
|
|
27
|
+
|
|
28
|
+
## Fonctionnalités
|
|
29
|
+
|
|
30
|
+
- Connecteurs indépendants distribuables sur PyPI sous le nom `yamcps-<nom>`.
|
|
31
|
+
- Chargement de tous les plugins installés par défaut, ou sélection avec `--connector`.
|
|
32
|
+
- Outils, ressources et prompts MCP fournis par les connecteurs.
|
|
33
|
+
- Plugins `yamcps-sonarr` et `yamcps-radarr` : bibliothèques de séries/films, calendriers,
|
|
34
|
+
téléchargements, recherche et ajout.
|
|
35
|
+
- Plugin `yamcps-prowlarr` : indexeurs, recherche de releases et diagnostics en lecture seule.
|
|
36
|
+
- Skills `SKILL.md` et fichiers associés consultables via MCP.
|
|
37
|
+
- Coffre local chiffré et configuration interactive des secrets requis par les connecteurs.
|
|
38
|
+
- Transports stdio et Streamable HTTP local.
|
|
39
|
+
- Plugins `yamcps-demo` et `yamcps-demo-secrets` pour tester les outils et la configuration des secrets.
|
|
40
|
+
|
|
41
|
+
## Démarrage depuis le dépôt
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
python -m venv .venv
|
|
45
|
+
source .venv/bin/activate
|
|
46
|
+
python -m pip install -e . -e plugins/yamcps-demo
|
|
47
|
+
yamcps connectors list
|
|
48
|
+
yamcps serve --connector demo
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Pour charger tous les plugins installés : `yamcps serve`. Pour en sélectionner plusieurs :
|
|
52
|
+
`yamcps serve --connector demo --connector demo-secrets`.
|
|
53
|
+
|
|
54
|
+
Pour HTTP : `yamcps serve --connector demo --transport http --port 8000`.
|
|
55
|
+
Le serveur écoute sur `http://127.0.0.1:8000/mcp`.
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
- [Manuel utilisateur](docs/user-manual.md) : installation, clients et utilisation.
|
|
60
|
+
- [Architecture](docs/design.md) : contrats des connecteurs et gestion des skills.
|
|
61
|
+
- [Contribution](contributing.md) : conventions, tests et contrôles qualité.
|
|
62
|
+
- [Consignes pour les agents](AGENTS.md) : règles de travail dans le dépôt.
|
|
63
|
+
|
|
64
|
+
Le nom PyPI `yamcps` est réservé pour ce projet. Seule la distribution de base
|
|
65
|
+
est publiée par le [workflow de release](.github/workflows/workflow.yaml).
|
|
66
|
+
Les plugins restent installables depuis le dépôt. Voir le guide de contribution
|
|
67
|
+
pour configurer Trusted Publishing et publier une version.
|
yamcps-0.1.0/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# yamcps — Yet Another Model Context Protocole Server
|
|
2
|
+
|
|
3
|
+
**yamcps** est un serveur MCP Python extensible qui expose les fonctionnalités de
|
|
4
|
+
connecteurs à des assistants compatibles avec le Model Context Protocol.
|
|
5
|
+
Python 3.12 ou supérieur est requis.
|
|
6
|
+
|
|
7
|
+
## Fonctionnalités
|
|
8
|
+
|
|
9
|
+
- Connecteurs indépendants distribuables sur PyPI sous le nom `yamcps-<nom>`.
|
|
10
|
+
- Chargement de tous les plugins installés par défaut, ou sélection avec `--connector`.
|
|
11
|
+
- Outils, ressources et prompts MCP fournis par les connecteurs.
|
|
12
|
+
- Plugins `yamcps-sonarr` et `yamcps-radarr` : bibliothèques de séries/films, calendriers,
|
|
13
|
+
téléchargements, recherche et ajout.
|
|
14
|
+
- Plugin `yamcps-prowlarr` : indexeurs, recherche de releases et diagnostics en lecture seule.
|
|
15
|
+
- Skills `SKILL.md` et fichiers associés consultables via MCP.
|
|
16
|
+
- Coffre local chiffré et configuration interactive des secrets requis par les connecteurs.
|
|
17
|
+
- Transports stdio et Streamable HTTP local.
|
|
18
|
+
- Plugins `yamcps-demo` et `yamcps-demo-secrets` pour tester les outils et la configuration des secrets.
|
|
19
|
+
|
|
20
|
+
## Démarrage depuis le dépôt
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
python -m venv .venv
|
|
24
|
+
source .venv/bin/activate
|
|
25
|
+
python -m pip install -e . -e plugins/yamcps-demo
|
|
26
|
+
yamcps connectors list
|
|
27
|
+
yamcps serve --connector demo
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Pour charger tous les plugins installés : `yamcps serve`. Pour en sélectionner plusieurs :
|
|
31
|
+
`yamcps serve --connector demo --connector demo-secrets`.
|
|
32
|
+
|
|
33
|
+
Pour HTTP : `yamcps serve --connector demo --transport http --port 8000`.
|
|
34
|
+
Le serveur écoute sur `http://127.0.0.1:8000/mcp`.
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
- [Manuel utilisateur](docs/user-manual.md) : installation, clients et utilisation.
|
|
39
|
+
- [Architecture](docs/design.md) : contrats des connecteurs et gestion des skills.
|
|
40
|
+
- [Contribution](contributing.md) : conventions, tests et contrôles qualité.
|
|
41
|
+
- [Consignes pour les agents](AGENTS.md) : règles de travail dans le dépôt.
|
|
42
|
+
|
|
43
|
+
Le nom PyPI `yamcps` est réservé pour ce projet. Seule la distribution de base
|
|
44
|
+
est publiée par le [workflow de release](.github/workflows/workflow.yaml).
|
|
45
|
+
Les plugins restent installables depuis le dépôt. Voir le guide de contribution
|
|
46
|
+
pour configurer Trusted Publishing et publier une version.
|