ato-mcp 0.2.3__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.
Files changed (83) hide show
  1. ato_mcp-0.2.3/.github/ISSUE_TEMPLATE/bug_report.yml +72 -0
  2. ato_mcp-0.2.3/.github/ISSUE_TEMPLATE/config.yml +11 -0
  3. ato_mcp-0.2.3/.github/ISSUE_TEMPLATE/feature_request.yml +46 -0
  4. ato_mcp-0.2.3/.github/PULL_REQUEST_TEMPLATE.md +26 -0
  5. ato_mcp-0.2.3/.github/dependabot.yml +39 -0
  6. ato_mcp-0.2.3/.github/workflows/codeql.yml +40 -0
  7. ato_mcp-0.2.3/.github/workflows/release.yml +57 -0
  8. ato_mcp-0.2.3/.github/workflows/test.yml +60 -0
  9. ato_mcp-0.2.3/.gitignore +17 -0
  10. ato_mcp-0.2.3/CHANGELOG.md +370 -0
  11. ato_mcp-0.2.3/CODE_OF_CONDUCT.md +33 -0
  12. ato_mcp-0.2.3/CONTRIBUTING.md +86 -0
  13. ato_mcp-0.2.3/LICENSE +21 -0
  14. ato_mcp-0.2.3/PKG-INFO +202 -0
  15. ato_mcp-0.2.3/README.md +167 -0
  16. ato_mcp-0.2.3/SECURITY.md +41 -0
  17. ato_mcp-0.2.3/examples/claude_desktop_config_all_three.json +17 -0
  18. ato_mcp-0.2.3/examples/claude_desktop_config_local.json +14 -0
  19. ato_mcp-0.2.3/examples/demo_prompts.md +157 -0
  20. ato_mcp-0.2.3/glama.json +4 -0
  21. ato_mcp-0.2.3/llms.txt +90 -0
  22. ato_mcp-0.2.3/pyproject.toml +77 -0
  23. ato_mcp-0.2.3/src/ato_mcp/__init__.py +8 -0
  24. ato_mcp-0.2.3/src/ato_mcp/cache.py +134 -0
  25. ato_mcp-0.2.3/src/ato_mcp/catalog.py +57 -0
  26. ato_mcp-0.2.3/src/ato_mcp/client.py +124 -0
  27. ato_mcp-0.2.3/src/ato_mcp/curated.py +318 -0
  28. ato_mcp-0.2.3/src/ato_mcp/data/curated/ACNC_REGISTER.yaml +166 -0
  29. ato_mcp-0.2.3/src/ato_mcp/data/curated/ATO_OCCUPATION.yaml +98 -0
  30. ato_mcp-0.2.3/src/ato_mcp/data/curated/COMPANY_INDUSTRY.yaml +90 -0
  31. ato_mcp-0.2.3/src/ato_mcp/data/curated/CORP_TRANSPARENCY.yaml +67 -0
  32. ato_mcp-0.2.3/src/ato_mcp/data/curated/GST_MONTHLY.yaml +60 -0
  33. ato_mcp-0.2.3/src/ato_mcp/data/curated/HELP_DEBT.yaml +89 -0
  34. ato_mcp-0.2.3/src/ato_mcp/data/curated/IND_POSTCODE.yaml +105 -0
  35. ato_mcp-0.2.3/src/ato_mcp/data/curated/IND_POSTCODE_MEDIAN.yaml +159 -0
  36. ato_mcp-0.2.3/src/ato_mcp/data/curated/RND_INCENTIVE.yaml +63 -0
  37. ato_mcp-0.2.3/src/ato_mcp/data/curated/SBB_BENCHMARKS.yaml +122 -0
  38. ato_mcp-0.2.3/src/ato_mcp/data/curated/SMSF_FUNDS.yaml +46 -0
  39. ato_mcp-0.2.3/src/ato_mcp/data/curated/SUPER_CONTRIB_AGE.yaml +92 -0
  40. ato_mcp-0.2.3/src/ato_mcp/data/curated/TAX_GAPS.yaml +86 -0
  41. ato_mcp-0.2.3/src/ato_mcp/discovery.py +241 -0
  42. ato_mcp-0.2.3/src/ato_mcp/models.py +100 -0
  43. ato_mcp-0.2.3/src/ato_mcp/parsing.py +146 -0
  44. ato_mcp-0.2.3/src/ato_mcp/py.typed +0 -0
  45. ato_mcp-0.2.3/src/ato_mcp/server.py +905 -0
  46. ato_mcp-0.2.3/src/ato_mcp/shaping.py +521 -0
  47. ato_mcp-0.2.3/tests/__init__.py +0 -0
  48. ato_mcp-0.2.3/tests/conftest.py +97 -0
  49. ato_mcp-0.2.3/tests/fixtures/acnc_register_head.csv +130 -0
  50. ato_mcp-0.2.3/tests/fixtures/ato_occupation.xlsx +0 -0
  51. ato_mcp-0.2.3/tests/fixtures/company_industry.xlsx +0 -0
  52. ato_mcp-0.2.3/tests/fixtures/corp_transparency_2023_24.xlsx +0 -0
  53. ato_mcp-0.2.3/tests/fixtures/gst_monthly.xlsx +0 -0
  54. ato_mcp-0.2.3/tests/fixtures/help_debt.xlsx +0 -0
  55. ato_mcp-0.2.3/tests/fixtures/ind_postcode_median.xlsx +0 -0
  56. ato_mcp-0.2.3/tests/fixtures/rnd_incentive.xlsx +0 -0
  57. ato_mcp-0.2.3/tests/fixtures/sbb_benchmarks.xlsx +0 -0
  58. ato_mcp-0.2.3/tests/fixtures/smsf_annual_overview.xlsx +0 -0
  59. ato_mcp-0.2.3/tests/fixtures/super_contrib_age.xlsx +0 -0
  60. ato_mcp-0.2.3/tests/fixtures/tax_gaps.xlsx +0 -0
  61. ato_mcp-0.2.3/tests/test_cache.py +162 -0
  62. ato_mcp-0.2.3/tests/test_concurrency.py +118 -0
  63. ato_mcp-0.2.3/tests/test_curated.py +126 -0
  64. ato_mcp-0.2.3/tests/test_customer_flows.py +265 -0
  65. ato_mcp-0.2.3/tests/test_df_cache.py +192 -0
  66. ato_mcp-0.2.3/tests/test_discovery.py +469 -0
  67. ato_mcp-0.2.3/tests/test_edge_data.py +237 -0
  68. ato_mcp-0.2.3/tests/test_edge_inputs.py +335 -0
  69. ato_mcp-0.2.3/tests/test_help.py +93 -0
  70. ato_mcp-0.2.3/tests/test_integration.py +53 -0
  71. ato_mcp-0.2.3/tests/test_occupation.py +122 -0
  72. ato_mcp-0.2.3/tests/test_parsing.py +90 -0
  73. ato_mcp-0.2.3/tests/test_resilience.py +147 -0
  74. ato_mcp-0.2.3/tests/test_rnd.py +87 -0
  75. ato_mcp-0.2.3/tests/test_sbb.py +104 -0
  76. ato_mcp-0.2.3/tests/test_server_validation.py +106 -0
  77. ato_mcp-0.2.3/tests/test_shaping.py +280 -0
  78. ato_mcp-0.2.3/tests/test_smsf.py +104 -0
  79. ato_mcp-0.2.3/tests/test_stats.py +277 -0
  80. ato_mcp-0.2.3/tests/test_tax_gaps.py +110 -0
  81. ato_mcp-0.2.3/tests/test_top_n.py +179 -0
  82. ato_mcp-0.2.3/tests/test_transposed.py +234 -0
  83. ato_mcp-0.2.3/uv.lock +1775 -0
@@ -0,0 +1,72 @@
1
+ name: Bug report
2
+ description: Something works wrong, returns wrong data, or crashes.
3
+ title: "[bug] "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for filing! Please give us enough to reproduce. The fastest path to a fix is a minimal reproducer + the version you're running.
10
+
11
+ - type: input
12
+ id: version
13
+ attributes:
14
+ label: ato-mcp version
15
+ description: Run `python -c "import ato_mcp; print(ato_mcp.__version__)"`
16
+ placeholder: 0.1.1
17
+ validations:
18
+ required: true
19
+
20
+ - type: dropdown
21
+ id: client
22
+ attributes:
23
+ label: MCP client
24
+ options:
25
+ - Claude Desktop
26
+ - Cursor
27
+ - Windsurf
28
+ - Cline
29
+ - Direct Python (no MCP client)
30
+ - Other
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: reproducer
36
+ attributes:
37
+ label: Reproducer
38
+ description: |
39
+ The exact tool call(s) that trigger the bug. Either the MCP request payload or the equivalent Python:
40
+ ```python
41
+ from ato_mcp import server
42
+ await server.latest("F1.1", series="cash_rate_target")
43
+ ```
44
+ render: python
45
+ validations:
46
+ required: true
47
+
48
+ - type: textarea
49
+ id: actual
50
+ attributes:
51
+ label: What actually happened
52
+ description: Error message, wrong value, surprising response shape, etc.
53
+ validations:
54
+ required: true
55
+
56
+ - type: textarea
57
+ id: expected
58
+ attributes:
59
+ label: What you expected
60
+ validations:
61
+ required: true
62
+
63
+ - type: textarea
64
+ id: env
65
+ attributes:
66
+ label: Environment
67
+ description: |
68
+ - Python version (`python --version`)
69
+ - OS (macOS / Linux / Windows + version)
70
+ - How you installed (`uvx ato-mcp`, `uv pip install -e .`, etc.)
71
+ placeholder: |
72
+ Python 3.12.3, macOS 15, installed via uvx
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Question or how-to
4
+ url: https://github.com/Bigred97/ato-mcp/discussions/new?category=q-a
5
+ about: For "how do I" or "is it possible to" — start a Discussion instead of an issue.
6
+ - name: Show & tell — share what you built
7
+ url: https://github.com/Bigred97/ato-mcp/discussions/new?category=show-and-tell
8
+ about: Built something cool with ato-mcp? We'd love to see it.
9
+ - name: Security vulnerability
10
+ url: https://github.com/Bigred97/ato-mcp/security/advisories/new
11
+ about: Use the private security advisory flow — do NOT open a public issue.
@@ -0,0 +1,46 @@
1
+ name: Feature request
2
+ description: Suggest a new tool, F-table, or behaviour.
3
+ title: "[feat] "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for the suggestion. Higher chance of merge if you frame it around a real use case ("I want to ask Claude X and currently I have to do Y").
10
+
11
+ - type: textarea
12
+ id: use_case
13
+ attributes:
14
+ label: What are you trying to do?
15
+ placeholder: I want to ask Claude about ATO government bond yields and currently ato-mcp doesn't curate F2.
16
+ validations:
17
+ required: true
18
+
19
+ - type: textarea
20
+ id: proposal
21
+ attributes:
22
+ label: Proposed change
23
+ description: |
24
+ Concrete: which file would change, what would the new tool/curated YAML look like, what does the user-visible API become?
25
+ validations:
26
+ required: true
27
+
28
+ - type: textarea
29
+ id: alternatives
30
+ attributes:
31
+ label: Alternatives considered
32
+ description: e.g. "I could just pass raw ATO series IDs to get_data, but..."
33
+
34
+ - type: dropdown
35
+ id: scope
36
+ attributes:
37
+ label: Scope
38
+ options:
39
+ - Add a curated F-table YAML
40
+ - New MCP tool
41
+ - Change to existing tool's signature
42
+ - Change to default behaviour
43
+ - Documentation
44
+ - Other
45
+ validations:
46
+ required: true
@@ -0,0 +1,26 @@
1
+ ## What & why
2
+
3
+ <!-- One paragraph: what does this PR do, and what's the motivating use case or bug? -->
4
+
5
+ ## How
6
+
7
+ <!-- Brief: which files changed and why? -->
8
+
9
+ ## Tests
10
+
11
+ - [ ] All existing tests still pass (`uv run pytest -m "not live"`)
12
+ - [ ] New behaviour has a test
13
+ - [ ] If this touches the live-API surface, `uv run pytest -m live` is green
14
+
15
+ ## Compatibility
16
+
17
+ - [ ] No breaking changes to the public MCP tool signatures
18
+ - [ ] No breaking changes to the `DataResponse` / `TableDetail` JSON shape
19
+ - [ ] CC-BY 4.0 attribution still surfaces in `DataResponse.attribution`
20
+ - [ ] If any of the above is broken, this is justified in the PR body
21
+
22
+ ## Other
23
+
24
+ - [ ] CHANGELOG.md updated
25
+ - [ ] README updated if user-visible behaviour changed
26
+ - [ ] No new dependencies (or new dep is justified above)
@@ -0,0 +1,39 @@
1
+ version: 2
2
+
3
+ updates:
4
+ # Python dependencies (pyproject.toml + uv.lock)
5
+ - package-ecosystem: pip
6
+ directory: "/"
7
+ schedule:
8
+ interval: weekly
9
+ day: monday
10
+ time: "10:00"
11
+ timezone: Australia/Sydney
12
+ open-pull-requests-limit: 5
13
+ groups:
14
+ # Group all minor + patch updates into one PR per week.
15
+ python-runtime-minor-patch:
16
+ applies-to: version-updates
17
+ update-types: [minor, patch]
18
+ labels: [dependencies]
19
+ commit-message:
20
+ prefix: deps
21
+ include: scope
22
+
23
+ # GitHub Actions used in workflows
24
+ - package-ecosystem: github-actions
25
+ directory: "/"
26
+ schedule:
27
+ interval: weekly
28
+ day: monday
29
+ time: "10:00"
30
+ timezone: Australia/Sydney
31
+ open-pull-requests-limit: 3
32
+ groups:
33
+ gha-minor-patch:
34
+ applies-to: version-updates
35
+ update-types: [minor, patch]
36
+ labels: [dependencies, github-actions]
37
+ commit-message:
38
+ prefix: ci
39
+ include: scope
@@ -0,0 +1,40 @@
1
+ name: codeql
2
+
3
+ # GitHub's free SAST scanning. Runs on push to main, on PRs, and weekly.
4
+ # Findings appear under the repo's Security tab.
5
+
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+ branches: [main]
11
+ schedule:
12
+ - cron: "47 6 * * 1" # Mondays 06:47 UTC — off-peak, offset 10min from rba-mcp
13
+
14
+ jobs:
15
+ analyze:
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ actions: read
19
+ contents: read
20
+ security-events: write
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ language: [python]
25
+ steps:
26
+ - uses: actions/checkout@v6
27
+
28
+ - name: Initialise CodeQL
29
+ uses: github/codeql-action/init@v4
30
+ with:
31
+ languages: ${{ matrix.language }}
32
+ queries: security-extended
33
+
34
+ - name: Autobuild
35
+ uses: github/codeql-action/autobuild@v4
36
+
37
+ - name: Analyze
38
+ uses: github/codeql-action/analyze@v4
39
+ with:
40
+ category: "/language:${{ matrix.language }}"
@@ -0,0 +1,57 @@
1
+ name: release
2
+
3
+ # Push a tag like v0.3.0 → wheel is built and published to PyPI via
4
+ # Trusted Publishing (OIDC, no API token in repo secrets). One-time setup:
5
+ # 1. https://pypi.org/manage/account/publishing/
6
+ # 2. Add a "pending publisher":
7
+ # PyPI project = ato-mcp
8
+ # owner = Bigred97
9
+ # repository = ato-mcp
10
+ # workflow = release.yml
11
+ # environment = pypi
12
+ # 3. Create a `pypi` environment in repo Settings → Environments
13
+ # (no secrets needed; the environment scopes the OIDC token).
14
+ # Optionally add a required-reviewers rule so a tag push waits for
15
+ # your manual approval before publishing.
16
+ # Then any `git push origin vX.Y.Z` triggers this job.
17
+
18
+ on:
19
+ push:
20
+ tags:
21
+ - "v*"
22
+
23
+ jobs:
24
+ release:
25
+ runs-on: ubuntu-latest
26
+ environment:
27
+ name: pypi
28
+ url: https://pypi.org/project/ato-mcp/
29
+ permissions:
30
+ id-token: write # required for Trusted Publishing OIDC
31
+ contents: read
32
+ steps:
33
+ - uses: actions/checkout@v6
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v7
37
+
38
+ - name: Sanity-check the tag matches pyproject.toml
39
+ run: |
40
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
41
+ PYPROJECT_VERSION=$(uv run python -c "import tomllib,sys; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
42
+ if [ "$TAG_VERSION" != "$PYPROJECT_VERSION" ]; then
43
+ echo "::error::Tag $GITHUB_REF_NAME does not match pyproject version $PYPROJECT_VERSION"
44
+ exit 1
45
+ fi
46
+ echo "Releasing version $PYPROJECT_VERSION"
47
+
48
+ - name: Build wheel + sdist
49
+ run: uv build
50
+
51
+ - name: Publish to PyPI (Trusted Publishing)
52
+ uses: pypa/gh-action-pypi-publish@release/v1
53
+
54
+ - uses: actions/upload-artifact@v4
55
+ with:
56
+ name: dist
57
+ path: dist/
@@ -0,0 +1,60 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v7
16
+ - name: Run ruff check
17
+ # `uvx` runs ruff in an isolated managed env; avoids PEP 668
18
+ # "externally-managed environment" failure on Ubuntu 23.04+ runners
19
+ # that the previous `uv pip install --system` hit.
20
+ run: uvx "ruff>=0.5" check src/ tests/
21
+
22
+ test:
23
+ runs-on: ubuntu-latest
24
+ needs: lint
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ python-version: ["3.11", "3.12", "3.13"]
29
+ steps:
30
+ - uses: actions/checkout@v6
31
+ - name: Install uv
32
+ uses: astral-sh/setup-uv@v7
33
+ with:
34
+ enable-cache: true
35
+ - name: Set up Python ${{ matrix.python-version }}
36
+ run: uv python install ${{ matrix.python-version }}
37
+ - name: Sync dependencies
38
+ run: uv sync --extra dev
39
+ - name: Install package
40
+ run: uv pip install -e .
41
+ - name: Run unit tests
42
+ run: uv run pytest -q
43
+
44
+ build:
45
+ runs-on: ubuntu-latest
46
+ needs: test
47
+ steps:
48
+ - uses: actions/checkout@v6
49
+ - name: Install uv
50
+ uses: astral-sh/setup-uv@v7
51
+ - name: Build wheel + sdist
52
+ run: uv build
53
+ - name: Verify wheel installs cleanly
54
+ run: |
55
+ uv run --isolated --with ./dist/*.whl python -c \
56
+ "import ato_mcp.server as s; n = len(s.list_curated()); assert n >= 8, f'expected >=8 curated, got {n}'; print(f'OK ({n} curated datasets)')"
57
+ - uses: actions/upload-artifact@v4
58
+ with:
59
+ name: dist
60
+ path: dist/
@@ -0,0 +1,17 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .pytest_cache/
5
+ .venv/
6
+ venv/
7
+ dist/
8
+ build/
9
+ .coverage
10
+ .coverage.*
11
+ htmlcov/
12
+ .DS_Store
13
+ *.swp
14
+ *.swo
15
+ .idea/
16
+ .vscode/
17
+ .ato-mcp-cache/