[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "kalshi-mcp-server" version = "0.3.3" description = "Model Context Protocol server for Kalshi prediction markets — native RSA-PSS auth, token-bucket rate limiting, demo/prod safety controls." readme = "README.md" requires-python = ">=3.11" license = "MIT" authors = [ { name = "cejor6" }, ] keywords = ["mcp", "model-context-protocol", "kalshi", "prediction-markets", "trading"] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Office/Business :: Financial", ] dependencies = [ "fastmcp>=2.0.0", "cryptography>=42.0.0", "httpx>=0.27.0", "websockets>=12.0", "pydantic>=2.6.0", "python-dotenv>=1.0.0", # Used by tools/exchange.py to decode the session-JWT expiry (issue #80). # It resolves transitively via `mcp` today, but declaring it explicitly # keeps that read from silently going inert if the transitive pull ever # changes (the import is swallowed by a fail-open except). "pyjwt>=2.10.1", ] [project.optional-dependencies] # OAuth proxy support for remote-MCP deployments (e.g. claude.ai custom # connector). Not needed for stdio or for HTTP behind your own reverse # proxy. Install with `uv sync --extra oauth` or # `pip install kalshi-mcp-server[oauth]`. oauth = [ "redis>=5.0.0", "py-key-value-aio[redis]>=0.4.4", ] dev = [ "pytest>=8.0.0", "pytest-asyncio>=0.23.0", "pytest-cov>=5.0.0", "ruff>=0.5.0", "pre-commit>=3.6.0", "detect-secrets>=1.5.0", # Dev includes oauth so contributors can run the full test suite. "redis>=5.0.0", "py-key-value-aio[redis]>=0.4.4", ] [project.urls] Homepage = "https://github.com/cejor6/kalshi-mcp-server" Issues = "https://github.com/cejor6/kalshi-mcp-server/issues" Source = "https://github.com/cejor6/kalshi-mcp-server" [project.scripts] kalshi-mcp = "kalshi_mcp_server.cli:main" kalshi-mcp-server = "kalshi_mcp_server.cli:main" [tool.hatch.build.targets.wheel] packages = ["src/kalshi_mcp_server"] # -- Ruff ----------------------------------------------------------------- [tool.ruff] line-length = 100 target-version = "py311" src = ["src", "tests"] [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade "RUF", # ruff-specific "S", # bandit (security) "ASYNC", ] ignore = [ "E501", # line length — handled by formatter "S101", # asserts are fine in tests ] [tool.ruff.lint.per-file-ignores] "tests/**" = ["S101", "S106"] [tool.ruff.format] quote-style = "double" indent-style = "space" # -- Pytest --------------------------------------------------------------- [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" addopts = [ "-ra", "--strict-markers", "--strict-config", ] filterwarnings = [ "error", # cryptography sometimes warns about deprecated APIs in transitive deps; # we can tighten this once we depend on a newer release. "ignore::DeprecationWarning", ] [tool.coverage.run] source = ["src/kalshi_mcp_server"] branch = true [tool.coverage.report] exclude_lines = [ "pragma: no cover", "raise NotImplementedError", "if TYPE_CHECKING:", ]