ato-mcp 1.1.0
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.
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/bin/ato-mcp.js +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/onboard.d.ts +6 -0
- package/dist/lib/onboard.d.ts.map +1 -0
- package/dist/lib/onboard.js +17 -0
- package/dist/lib/onboard.js.map +1 -0
- package/dist/lib/remote-tools.d.ts +12 -0
- package/dist/lib/remote-tools.d.ts.map +1 -0
- package/dist/lib/remote-tools.js +61 -0
- package/dist/lib/remote-tools.js.map +1 -0
- package/dist/server.d.ts +13 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +176 -0
- package/dist/server.js.map +1 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 William Laverty
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# ato-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for the Australian Taxation Office corpus — cited retrieval over 29k+ ATO
|
|
4
|
+
documents, ITAA 1997, and public rulings, plus personal-context and tax workflow tools
|
|
5
|
+
(`deduction_discovery`, `depreciation_helper`, `bas_prep_checklist`, `audit_risk_check`).
|
|
6
|
+
|
|
7
|
+
Get your token at **https://ato-mcp.com.au/onboard**, then add to your MCP client config:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"ato-mcp": {
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": ["-y", "ato-mcp"],
|
|
15
|
+
"env": { "ATO_MCP_TOKEN": "<your-token>" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The client forwards every tool call to `api.ato-mcp.com.au` over TLS. There is no
|
|
22
|
+
local corpus to download.
|
|
23
|
+
|
|
24
|
+
## The 13 tools
|
|
25
|
+
|
|
26
|
+
**Retrieval** — `search`, `get_chunks`, `get_doc`, `get_doc_anchors`, `get_definition`,
|
|
27
|
+
`get_threshold`, `fetch`, `stats`.
|
|
28
|
+
|
|
29
|
+
**Personal context** — `get_user_facts`: 25 facts captured once at onboarding so the
|
|
30
|
+
agent never re-asks.
|
|
31
|
+
|
|
32
|
+
**Workflows** — `deduction_discovery`, `depreciation_helper`, `bas_prep_checklist`,
|
|
33
|
+
`audit_risk_check`.
|
|
34
|
+
|
|
35
|
+
Full tool reference: https://github.com/william-laverty/ato-mcp/blob/main/docs/tools.md
|
|
36
|
+
|
|
37
|
+
Not tax advice: tools return structured data + ATO citations for an agent to reason over.
|
|
38
|
+
MIT © William Laverty
|
package/bin/ato-mcp.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function main() {
|
|
3
|
+
// Default action is to start the server, so `npx -y ato-mcp` just works.
|
|
4
|
+
const cmd = process.argv[2] ?? "mcp";
|
|
5
|
+
if (cmd === "help" || cmd === "--help" || cmd === "-h") {
|
|
6
|
+
process.stdout.write(`ato-mcp - hosted MCP server for the Australian Taxation Office corpus
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
ato-mcp # start the MCP stdio server (default; reads ATO_MCP_TOKEN)
|
|
10
|
+
ato-mcp mcp # same as above, explicit
|
|
11
|
+
ato-mcp onboard # open the browser to get your token + config snippet
|
|
12
|
+
ato-mcp help # this message
|
|
13
|
+
|
|
14
|
+
Set ATO_MCP_TOKEN in your MCP client config.
|
|
15
|
+
Get a token at https://ato-mcp.com.au/onboard
|
|
16
|
+
`);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (cmd === "mcp") {
|
|
20
|
+
return import("./server.js").then((m) => m.runMcp());
|
|
21
|
+
}
|
|
22
|
+
if (cmd === "onboard") {
|
|
23
|
+
return import("./lib/onboard.js").then((m) => m.runOnboard());
|
|
24
|
+
}
|
|
25
|
+
process.stderr.write(`Unknown command: ${cmd}\n`);
|
|
26
|
+
process.exit(2);
|
|
27
|
+
}
|
|
28
|
+
Promise.resolve(main()).catch((err) => {
|
|
29
|
+
process.stderr.write(`fatal: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
30
|
+
process.exit(1);
|
|
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B,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/lib/onboard.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAYhD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const BASE_URL = process.env.ATO_MCP_WEB_URL ?? "https://ato-mcp.com.au";
|
|
2
|
+
/**
|
|
3
|
+
* runOnboard — opens the browser to the onboarding page where the user
|
|
4
|
+
* can sign in, complete the facts wizard, and copy their ATO_MCP_TOKEN.
|
|
5
|
+
*/
|
|
6
|
+
export async function runOnboard() {
|
|
7
|
+
const url = `${BASE_URL}/onboard`;
|
|
8
|
+
process.stdout.write(`\nato-mcp onboard\n`);
|
|
9
|
+
process.stdout.write(`─────────────────────────────────────────\n`);
|
|
10
|
+
process.stdout.write(`Opening browser to:\n ${url}\n\n`);
|
|
11
|
+
process.stdout.write(`Sign in, complete the setup wizard, then copy\n`);
|
|
12
|
+
process.stdout.write(`the ATO_MCP_TOKEN into your AI client config.\n`);
|
|
13
|
+
// Dynamically import `open` (ESM-only package)
|
|
14
|
+
const { default: open } = await import("open");
|
|
15
|
+
await open(url);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=onboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboard.js","sourceRoot":"","sources":["../../src/lib/onboard.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,wBAAwB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,GAAG,GAAG,GAAG,QAAQ,UAAU,CAAC;IAElC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACpE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,GAAG,MAAM,CAAC,CAAC;IAC1D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACxE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAExE,+CAA+C;IAC/C,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class RemoteToolForwarder {
|
|
2
|
+
private readonly endpoint;
|
|
3
|
+
private readonly bearerToken;
|
|
4
|
+
constructor(endpoint: string, bearerToken: string);
|
|
5
|
+
/**
|
|
6
|
+
* POST {endpoint}/{toolName} with args as JSON body.
|
|
7
|
+
* Returns the parsed JSON response.
|
|
8
|
+
* Throws on non-2xx status with a descriptive message.
|
|
9
|
+
*/
|
|
10
|
+
call(toolName: string, args: unknown): Promise<unknown>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=remote-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-tools.d.ts","sourceRoot":"","sources":["../../src/lib/remote-tools.ts"],"names":[],"mappings":"AAQA,qBAAa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBADX,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM;IAGtC;;;;OAIG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAsC9D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Hosted-mode tool forwarder.
|
|
2
|
+
//
|
|
3
|
+
// When the local MCP is configured for hosted mode, every tool call goes
|
|
4
|
+
// over HTTPS to api.ato-mcp.com.au. The backend runs the same shared tool
|
|
5
|
+
// code we'd otherwise run locally, against Supabase Postgres + pgvector.
|
|
6
|
+
//
|
|
7
|
+
// One forwarder per MCP process. No local Store/Embedder needed.
|
|
8
|
+
export class RemoteToolForwarder {
|
|
9
|
+
endpoint;
|
|
10
|
+
bearerToken;
|
|
11
|
+
constructor(endpoint, bearerToken) {
|
|
12
|
+
this.endpoint = endpoint;
|
|
13
|
+
this.bearerToken = bearerToken;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* POST {endpoint}/{toolName} with args as JSON body.
|
|
17
|
+
* Returns the parsed JSON response.
|
|
18
|
+
* Throws on non-2xx status with a descriptive message.
|
|
19
|
+
*/
|
|
20
|
+
async call(toolName, args) {
|
|
21
|
+
const url = `${this.endpoint.replace(/\/$/, "")}/${toolName}`;
|
|
22
|
+
let resp;
|
|
23
|
+
try {
|
|
24
|
+
resp = await fetch(url, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers: {
|
|
27
|
+
"Authorization": `Bearer ${this.bearerToken}`,
|
|
28
|
+
"Content-Type": "application/json",
|
|
29
|
+
},
|
|
30
|
+
body: JSON.stringify(args),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
35
|
+
throw new Error(`Backend unreachable (${url}): ${msg}`);
|
|
36
|
+
}
|
|
37
|
+
const text = await resp.text();
|
|
38
|
+
if (!resp.ok) {
|
|
39
|
+
// Try to surface the structured error payload if the backend returned JSON
|
|
40
|
+
let detail = text.slice(0, 500);
|
|
41
|
+
try {
|
|
42
|
+
const parsed = JSON.parse(text);
|
|
43
|
+
if (parsed.message)
|
|
44
|
+
detail = parsed.message;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
// not JSON, use the raw text
|
|
48
|
+
}
|
|
49
|
+
throw new Error(`Backend ${toolName}: HTTP ${resp.status} — ${detail}`);
|
|
50
|
+
}
|
|
51
|
+
if (resp.status === 204 || text.length === 0)
|
|
52
|
+
return null;
|
|
53
|
+
try {
|
|
54
|
+
return JSON.parse(text);
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
throw new Error(`Backend ${toolName}: invalid JSON response: ${text.slice(0, 200)}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=remote-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-tools.js","sourceRoot":"","sources":["../../src/lib/remote-tools.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AACzE,EAAE;AACF,iEAAiE;AAEjE,MAAM,OAAO,mBAAmB;IAEX;IACA;IAFnB,YACmB,QAAgB,EAChB,WAAmB;QADnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,gBAAW,GAAX,WAAW,CAAQ;IACnC,CAAC;IAEJ;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,QAAgB,EAAE,IAAa;QACxC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC;QAC9D,IAAI,IAAc,CAAC;QACnB,IAAI,CAAC;YACH,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBACtB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,eAAe,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;oBAC7C,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC3B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvD,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,MAAM,GAAG,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAE/B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,2EAA2E;YAC3E,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAChC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAyB,CAAC;gBACxD,IAAI,MAAM,CAAC,OAAO;oBAAE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;YAC9C,CAAC;YAAC,MAAM,CAAC;gBACP,6BAA6B;YAC/B,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,WAAW,QAAQ,UAAU,IAAI,CAAC,MAAM,MAAM,MAAM,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1D,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAY,CAAC;QACrC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,WAAW,QAAQ,4BAA4B,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACvF,CAAC;IACH,CAAC;CACF"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Forwarder {
|
|
2
|
+
call(toolName: string, args: unknown): Promise<unknown>;
|
|
3
|
+
}
|
|
4
|
+
/** Test seam: inject a fake forwarder to exercise listing + dispatch. */
|
|
5
|
+
export declare function buildServerForTesting(deps: {
|
|
6
|
+
forwarder: Forwarder;
|
|
7
|
+
}): {
|
|
8
|
+
listToolNames(): string[];
|
|
9
|
+
callTool(name: string, args: unknown): Promise<any>;
|
|
10
|
+
};
|
|
11
|
+
export declare function runMcp(): Promise<void>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAyIA,UAAU,SAAS;IACjB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzD;AAED,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE;qBAE/C,MAAM,EAAE;mBAGJ,MAAM,QAAQ,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;EAI5D;AAED,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CA4C5C"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { RemoteToolForwarder } from "./lib/remote-tools.js";
|
|
5
|
+
const DEFAULT_API = "https://api.ato-mcp.com.au";
|
|
6
|
+
const TOOLS = {
|
|
7
|
+
stats: {
|
|
8
|
+
description: "Report corpus installation status, version, and counts.",
|
|
9
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
10
|
+
},
|
|
11
|
+
search: {
|
|
12
|
+
description: "Hybrid BM25 + vector search over the ATO corpus. Returns top-k chunks with [doc:X] citations.",
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object",
|
|
15
|
+
properties: {
|
|
16
|
+
query: { type: "string", minLength: 1 },
|
|
17
|
+
k: { type: "integer", minimum: 1, maximum: 50, default: 10 },
|
|
18
|
+
mode: { type: "string", enum: ["hybrid", "vector", "keyword"], default: "hybrid" },
|
|
19
|
+
include_old: { type: "boolean", default: false },
|
|
20
|
+
pit: { type: "string" },
|
|
21
|
+
},
|
|
22
|
+
required: ["query"],
|
|
23
|
+
additionalProperties: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
get_chunks: {
|
|
27
|
+
description: "Fetch chunk bodies by chunk_id with optional neighbour context.",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
chunk_ids: { type: "array", items: { type: "string" }, minItems: 1, maxItems: 50 },
|
|
32
|
+
neighbours: { type: "integer", minimum: 0, maximum: 5, default: 0 },
|
|
33
|
+
pit: { type: "string" },
|
|
34
|
+
},
|
|
35
|
+
required: ["chunk_ids"],
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
fetch: {
|
|
40
|
+
description: "Live-fetch a document by URI. Supports `ato:`, `ato-law:`, `legis:`, and `staterev-<juris>:` schemes.",
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: { uri: { type: "string", minLength: 1 } },
|
|
44
|
+
required: ["uri"],
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
get_definition: {
|
|
49
|
+
description: "Statutory definition with optional point-in-time. Falls back to labelled ordinary-meaning (WordNet) when no statutory match. Caller MUST respect kind:'ordinary' vs kind:'statutory'.",
|
|
50
|
+
inputSchema: { type: "object", properties: { term: { type: "string", minLength: 1 }, pit: { type: "string" }, jurisdiction: { type: "string", default: "AU" } }, required: ["term"], additionalProperties: false },
|
|
51
|
+
},
|
|
52
|
+
get_doc: {
|
|
53
|
+
description: "Fetch full document by doc_id with cleaned HTML and anchor list.",
|
|
54
|
+
inputSchema: { type: "object", properties: { doc_id: { type: "string", minLength: 1 }, pit: { type: "string" } }, required: ["doc_id"], additionalProperties: false },
|
|
55
|
+
},
|
|
56
|
+
get_doc_anchors: {
|
|
57
|
+
description: "List in-document anchors and the citation graph (inbound + outbound) for a doc.",
|
|
58
|
+
inputSchema: { type: "object", properties: { doc_id: { type: "string", minLength: 1 } }, required: ["doc_id"], additionalProperties: false },
|
|
59
|
+
},
|
|
60
|
+
get_threshold: {
|
|
61
|
+
description: "Time-keyed scalar tax fact lookup (e.g. gst_registration_threshold, instant_asset_write_off, super_concessional_cap). PIT-aware.",
|
|
62
|
+
inputSchema: { type: "object", properties: { name: { type: "string", minLength: 1 }, pit: { type: "string" } }, required: ["name"], additionalProperties: false },
|
|
63
|
+
},
|
|
64
|
+
get_user_facts: {
|
|
65
|
+
description: "Return the authenticated user's personal tax facts (state, ABN, business structure, GST, dependants, etc.). Call once on initialise and reason from the result throughout the session.",
|
|
66
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
67
|
+
},
|
|
68
|
+
deduction_discovery: {
|
|
69
|
+
description: "Surface every deduction-related category that plausibly applies to the authenticated user's tax profile, with corpus citations, thresholds, and a confidence rating. Branches across all taxpayer structures (individual, sole trader, partnership, company, trust, SMSF member). Optionally pass `activity` to focus on a specific spend.",
|
|
70
|
+
inputSchema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
activity: { type: "string" },
|
|
74
|
+
fy: { type: "string" },
|
|
75
|
+
k_citations: { type: "integer", minimum: 1, maximum: 5, default: 3 },
|
|
76
|
+
include_low_confidence: { type: "boolean", default: true },
|
|
77
|
+
},
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
depreciation_helper: {
|
|
82
|
+
description: "Compute depreciation for an asset across all applicable methods (prime cost, diminishing value, instant asset write-off, $300 immediate, small business pool, Division 43 capital works), branched by the user's taxpayer structure. Returns year-by-year schedules, the live instant-asset-write-off threshold, and corpus citations. Inputs: asset_cost, acquisition_date (YYYY-MM-DD), and optionally business_use_pct, effective_life_years, is_small_business_entity, is_capital_works, asset_type, fy.",
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
asset_cost: { type: "number", exclusiveMinimum: 0 },
|
|
87
|
+
acquisition_date: { type: "string" },
|
|
88
|
+
business_use_pct: { type: "number", minimum: 0, maximum: 100, default: 100 },
|
|
89
|
+
asset_type: { type: "string" },
|
|
90
|
+
effective_life_years: { type: "number", exclusiveMinimum: 0 },
|
|
91
|
+
is_small_business_entity: { type: "boolean" },
|
|
92
|
+
is_capital_works: { type: "boolean", default: false },
|
|
93
|
+
method: { type: "string", enum: ["prime_cost", "diminishing_value", "both"], default: "both" },
|
|
94
|
+
fy: { type: "string" },
|
|
95
|
+
years: { type: "integer", minimum: 1, maximum: 40 },
|
|
96
|
+
},
|
|
97
|
+
required: ["asset_cost", "acquisition_date"],
|
|
98
|
+
additionalProperties: false,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
bas_prep_checklist: {
|
|
102
|
+
description: "Produce a tiered, cited BAS preparation checklist for the user's GST reporting period: which labels apply (GST G1/1A/1B, PAYG-W, PAYG-I, FBT instalment, fuel tax credits, WET, LCT), what evidence to gather, and common gotchas. Does not calculate amounts. Optional inputs: period_type (monthly/quarterly/annual), quarter (1-4), fy, full_gst_method.",
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: "object",
|
|
105
|
+
properties: {
|
|
106
|
+
period_type: { type: "string", enum: ["monthly", "quarterly", "annual"] },
|
|
107
|
+
quarter: { type: "integer", minimum: 1, maximum: 4 },
|
|
108
|
+
fy: { type: "string" },
|
|
109
|
+
full_gst_method: { type: "boolean", default: false },
|
|
110
|
+
},
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
audit_risk_check: {
|
|
115
|
+
description: "Flag patterns the ATO is known to scrutinise, given the user's facts + a draft return summary (income, deductions, rental). Returns qualitative red-flag findings with a risk band, why-flagged, what-to-do and ATO guidance citations. A heuristic indicator, NOT an audit prediction and NOT numeric benchmarking. Optional inputs: income, deductions [{category, amount}], rental {income, interest, repairs, capital_works}, business_income, fy.",
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
income: { type: "number", minimum: 0 },
|
|
120
|
+
deductions: { type: "array", items: { type: "object", properties: { category: { type: "string" }, amount: { type: "number", minimum: 0 } }, required: ["category", "amount"], additionalProperties: false } },
|
|
121
|
+
rental: { type: "object", properties: { income: { type: "number", minimum: 0 }, interest: { type: "number", minimum: 0 }, repairs: { type: "number", minimum: 0 }, capital_works: { type: "number", minimum: 0 } }, additionalProperties: false },
|
|
122
|
+
business_income: { type: "number" },
|
|
123
|
+
fy: { type: "string" },
|
|
124
|
+
},
|
|
125
|
+
additionalProperties: false,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
/** Test seam: inject a fake forwarder to exercise listing + dispatch. */
|
|
130
|
+
export function buildServerForTesting(deps) {
|
|
131
|
+
return {
|
|
132
|
+
listToolNames() {
|
|
133
|
+
return Object.keys(TOOLS);
|
|
134
|
+
},
|
|
135
|
+
async callTool(name, args) {
|
|
136
|
+
return deps.forwarder.call(name, args ?? {});
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export async function runMcp() {
|
|
141
|
+
const token = process.env.ATO_MCP_TOKEN;
|
|
142
|
+
if (!token) {
|
|
143
|
+
process.stderr.write("ato-mcp: ATO_MCP_TOKEN is not set.\n" +
|
|
144
|
+
"Get your token and config snippet at https://ato-mcp.com.au/onboard\n");
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
const endpoint = process.env.ATO_MCP_API ?? DEFAULT_API;
|
|
148
|
+
const forwarder = new RemoteToolForwarder(endpoint, token);
|
|
149
|
+
const server = new Server({ name: "ato-mcp", version: "1.1.0" }, { capabilities: { tools: {} } });
|
|
150
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
151
|
+
tools: Object.entries(TOOLS).map(([name, def]) => ({
|
|
152
|
+
name,
|
|
153
|
+
description: def.description,
|
|
154
|
+
inputSchema: def.inputSchema,
|
|
155
|
+
})),
|
|
156
|
+
}));
|
|
157
|
+
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
158
|
+
const { name, arguments: args } = req.params;
|
|
159
|
+
try {
|
|
160
|
+
const result = await forwarder.call(name, args ?? {});
|
|
161
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
165
|
+
return {
|
|
166
|
+
isError: true,
|
|
167
|
+
content: [{ type: "text", text: JSON.stringify({ kind: "error", message }, null, 2) }],
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
// Fire-and-forget connection ping so the web onboarding page can show "connected". Failures (network or transient backend) are intentionally ignored.
|
|
172
|
+
void forwarder.call("usage_event", { event_type: "mcp_started" }).catch(() => { });
|
|
173
|
+
const transport = new StdioServerTransport();
|
|
174
|
+
await server.connect(transport);
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,GAAG,4BAA4B,CAAC;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AC;YACH,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;YACtD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QAChF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACvF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,sJAAsJ;IACtJ,KAAK,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAElF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ato-mcp",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Hosted MCP server for the Australian Taxation Office corpus — cited tax retrieval, personal context, and workflow tools for AI agents.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"ato",
|
|
9
|
+
"australian-tax",
|
|
10
|
+
"tax",
|
|
11
|
+
"australia",
|
|
12
|
+
"claude",
|
|
13
|
+
"ai-agent",
|
|
14
|
+
"rag",
|
|
15
|
+
"itaa-1997"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "William Laverty",
|
|
19
|
+
"homepage": "https://ato-mcp.com.au",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/william-laverty/ato-mcp.git",
|
|
23
|
+
"directory": "packages/mcp"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/william-laverty/ato-mcp/issues"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"bin": {
|
|
30
|
+
"ato-mcp": "./bin/ato-mcp.js"
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"files": [
|
|
34
|
+
"bin",
|
|
35
|
+
"dist",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=22"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@modelcontextprotocol/sdk": "1.0.4",
|
|
46
|
+
"open": "^11.0.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/better-sqlite3": "7.6.12",
|
|
50
|
+
"@types/node": "22.9.0",
|
|
51
|
+
"better-sqlite3": "11.5.0",
|
|
52
|
+
"sqlite-vec": "0.1.6",
|
|
53
|
+
"tsx": "4.19.2",
|
|
54
|
+
"typescript": "5.6.3",
|
|
55
|
+
"vitest": "2.1.5",
|
|
56
|
+
"@ato-mcp/shared": "1.0.0"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsc -p tsconfig.json",
|
|
60
|
+
"dev": "tsx watch src/index.ts",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"typecheck": "tsc --noEmit"
|
|
63
|
+
}
|
|
64
|
+
}
|