[project]
name = "foreman-mcp-server"
version = "0.1.0"
description = "A Model Context Protocol (MCP) server implementation that enables LLMs to interact with a Foreman instance using Foreman's API."
readme = "README.md"
authors = [
{ name = "Oleh Fedorenko", email = "ofedoren@redhat.com" },
{ name = "Adam Růžička", email = "aruzicka@redhat.com" }
]
requires-python = ">=3.12"
dependencies = [
"aiofiles>=24.1.0",
"apypie>=0.7.1",
"fastmcp>=2.13.2",
"rpds-py==0.24.0",
]
[dependency-groups]
dev = [
"ruff>=0.6.0",
"pytest>=8.0.0",
]
[project.scripts]
foreman-mcp-server = "foreman_mcp_server.__main__:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.12
target-version = "py312"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E4", # pycodestyle errors
"E7", # pycodestyle errors
"E9", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"T20", # flake8-print
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
]
ignore = [
"E501", # Line too long, handled by formatter
"T201", # Allow print statements
"T203", # Allow pprint statements
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
docstring-code-line-length = "dynamic"