Skip to content

Commit 4111413

Browse files
committed
core: add pytool management assets
1 parent 2d11817 commit 4111413

File tree

13 files changed

+691
-0
lines changed

13 files changed

+691
-0
lines changed

.gitignore

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
wheelhouse/
23+
24+
# Virtual environments
25+
.env
26+
.venv
27+
ENV/
28+
env/
29+
venv/
30+
31+
# PyInstaller
32+
*.spec
33+
34+
# Unit test / coverage reports
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
.hypothesis/
45+
46+
# Jupyter Notebook
47+
.ipynb_checkpoints
48+
49+
# pyenv
50+
.python-version
51+
52+
# mypy
53+
.mypy_cache/
54+
55+
# Ruff
56+
.ruff_cache/
57+
58+
# macOS
59+
.DS_Store
60+
61+
# IDEs
62+
.vscode/
63+
.idea/

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.6.9
4+
hooks:
5+
- id: ruff
6+
name: ruff (lint)
7+
args: [--fix, --show-fixes]
8+
- id: ruff-format
9+
name: ruff (format)
10+
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: v4.6.0
13+
hooks:
14+
- id: check-yaml
15+
- id: end-of-file-fixer
16+
- id: trailing-whitespace
17+
- id: check-merge-conflict

CODE_OF_CONDUCT.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
fairuse@nyu.edu.
64+
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations
134+

CONTRIBUTING.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# How to add new stuff to MCPStack-Tool?
2+
3+
Hey there! Appreciated your venue here! Want to build stuff on top of MCPStack-Tool?
4+
5+
## Prerequisites
6+
7+
- Python 3.9+
8+
- [uv](https://docs.astral.sh/uv/) (preferred package/dependency manager)
9+
- `pre-commit` and `ruff`
10+
- Git (with your GitHub SSH set up if you push to a fork)
11+
12+
## Setup
13+
14+
Clone the repository and sync dependencies:
15+
16+
```bash
17+
git clone git@github.com:<you>/mcpstack-tool.git
18+
cd mcpstack-tool
19+
uv sync --all-extras
20+
pre-commit install
21+
22+
# uv automatically installs in editable mode.
23+
# To manage dependencies:
24+
25+
uv add <package> # add a package
26+
uv remove <package> # remove a package
27+
uv lock # update lockfile
28+
```
29+
30+
See the uv documentation for installation instructions.
31+
32+
Branches & Commits
33+
* Branch from main: feat/<slug>, fix/<slug>, chore/<slug>.
34+
* Keep commits focused and descriptive. Conventional commits are welcome: feat:, fix:, chore:, docs:.
35+
36+
Code Style
37+
* Ruff is the source of truth for linting and formatting (ruff + ruff format).
38+
* Line length: 100 (pyproject.toml).
39+
* Prefer readable code over clever code. Add comments if intent isn’t obvious.
40+
41+
Tests
42+
* Add tests for behavior changes. Minimal repro-style tests are acceptable.
43+
* Keep test data lightweight and local.
44+
45+
Running Checks
46+
47+
```bash
48+
pre-commit run --all-files
49+
python -m mcpstack_tool.cli --health
50+
```
51+
52+
PR Expectations
53+
* Fill out the PR template (if present).
54+
* Link to the issue you’re fixing.
55+
* Include logs or minimal repros when relevant.
56+
* Keep diffs reviewable. Split large changes into smaller PRs.
57+
58+
Security
59+
* Never commit secrets or datasets.
60+
* Do not upload datasets to GitHub issues or pull requests. Use synthetic or anonymized examples when reporting bugs.
61+
* Report vulnerabilities privately first when possible.
62+
63+
Thanks for contributing!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Simon Provost
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.

SECURITY.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Security Policy
2+
3+
We take security seriously and encourage responsible disclosure.
4+
5+
If you believe you’ve found a security vulnerability in **MCPStack-Tool**, please report it to us privately rather than opening a public issue.
6+
7+
## Reporting a Vulnerability
8+
9+
Include the following information in your report:
10+
11+
- **Project**: <Repository URL> (e.g., From `https://github.com/MCP-Pipeline/MCPStack-Tool`)
12+
- **Public**: Has this issue already been disclosed elsewhere?
13+
- **Description**: A clear explanation of the vulnerability, with reproduction steps if possible.
14+
- **Environment**: Operating system, Python version, MCP client, and any relevant setup details.
15+
16+
Send reports to: **simon.gilbert.provost@gmail.com**
17+
18+
We will acknowledge receipt within 7 days and aim to provide a resolution or mitigation timeline within 30 days. Please do not share vulnerabilities publicly until a fix has been released.
19+
20+
## Scope and Considerations
21+
22+
- **Tool Combinations**: MCPStack-Tool is designed to compose with other MCP tools. Unexpected or unsafe interactions between tools cannot be predicted or prevented at the MCPStack-Tool level. The responsibility for safe orchestration rests with the user.
23+
- **Data Breach Risks**: MCPStack-Tool runs locally and does not send data to external services. There are no cloud communications by default, so conventional remote data breaches do not apply.
24+
- **GitHub Issues and Pull Requests**: Do not upload sensitive data (such as private datasets, logs, or credentials) when filing issues or submitting pull requests. Use synthetic or anonymized examples instead.
25+
26+
## Good Practices
27+
28+
- Keep dependencies updated.
29+
- Test tool compositions in a controlled environment.
30+
- Sanitize any shared examples when discussing issues publicly.

pyproject.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["pdm-backend"]
3+
build-backend = "pdm.backend"
4+
5+
[project]
6+
name = "mcpstack-your-tool-name"
7+
version = "0.1.0"
8+
description = "Create your MCPStack tool with this template repository!"
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
license = "MIT"
12+
authors = [{ name = "Provost Simon", email = "s.g.provost@kent.ac.uk" }]
13+
keywords = ["mcp", "mcpstack", "mcpPipeline", "tool", "template"]
14+
dependencies = [
15+
"typer>=0.9.0",
16+
"beartype>=0.21.0",
17+
"rich>=13.0.0",
18+
"rich-argparse>=1.4.0",
19+
"mcpstack",
20+
"rich-pyfiglet>=1.0.0",
21+
"click>=8.1.8",
22+
]
23+
24+
[project.optional-dependencies]
25+
dev = [
26+
"pytest>=7.4",
27+
"ruff>=0.4.0",
28+
"pre-commit>=3.0.0"
29+
]
30+
31+
# Let MCPStack discover external tools via entry points
32+
[project.entry-points."mcpstack.tools"]
33+
your_tool_name = "mcpstack_your_tool_name.tool:YourTool"
34+
35+
[tool.ruff]
36+
line-length = 88
37+
target-version = "py310"
38+
src = ["src"]
39+
40+
[tool.ruff.lint]
41+
select = ["E","W","F","I","UP","RUF","B","C4"]
42+
ignore = ["E501"]
43+
44+
[tool.pytest.ini_options]
45+
testpaths = ["tests"]
46+
python_files = ["test_*.py"]
47+
48+
[tool.uv.sources]
49+
mcpstack = { path = "../../MCPStack" }

0 commit comments

Comments
 (0)