Add a `familiar serve` subcommand that runs the FastMCP streamable-HTTP transport for use as a remote MCP server (e.g. a Mistral custom connector), while stdio stays the default and is completely unchanged. - config: FAMILIAR_HTTP_HOST/PORT/PATH (default 127.0.0.1:8080/mcp) and a live http_token() reader for FAMILIAR_HTTP_TOKEN. - server: configure_http()/serve_http() attach a StaticTokenVerifier so a missing/wrong bearer token gets 401 + WWW-Authenticate: Bearer and a valid one passes the handshake. Refuses to start (SystemExit) without a token. - writes: in HTTP mode the write default flips to disabled unless FAMILIAR_ENABLE_WRITES is explicitly truthy; guard() logic is untouched. - auth: manual_login() + parse_callback() power `login --no-browser`, printing the SSO URL and reading the pasted callback from stdin (no local browser). - bump fastmcp pin to >=3.0.0 for the streamable-HTTP + verifier API.
47 lines
974 B
TOML
47 lines
974 B
TOML
[project]
|
|
name = "familiar"
|
|
version = "0.0.2"
|
|
description = "Your familiar across New Eden — a read-only EVE Online MCP server."
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { file = "LICENSE" }
|
|
dependencies = [
|
|
"fastmcp>=3.0.0", # streamable-HTTP transport + StaticTokenVerifier bearer auth
|
|
"httpx>=0.27.0",
|
|
"cryptography>=42.0.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
familiar = "familiar.__main__:main"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/familiar"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-cov>=5.0.0",
|
|
"ruff>=0.6.0",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "--cov=familiar --cov-report=term-missing --cov-fail-under=80"
|
|
|
|
[tool.coverage.run]
|
|
source = ["familiar"]
|
|
omit = ["*/__main__.py"]
|
|
|
|
[tool.coverage.report]
|
|
exclude_also = [
|
|
"if __name__ == .__main__.:",
|
|
]
|