@dojocoding/hacienda-mcp 0.2.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 +151 -0
- package/dist/chunk-NJFDE5LL.js +61858 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +16 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +10 -0
- package/package.json +50 -0
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
createServer
|
|
4
|
+
} from "./chunk-NJFDE5LL.js";
|
|
5
|
+
|
|
6
|
+
// src/cli.ts
|
|
7
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
|
+
async function main() {
|
|
9
|
+
const server = createServer();
|
|
10
|
+
const transport = new StdioServerTransport();
|
|
11
|
+
await server.connect(transport);
|
|
12
|
+
}
|
|
13
|
+
main().catch((error) => {
|
|
14
|
+
console.error("Fatal error starting MCP server:", error);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MCP Server for Costa Rica electronic invoicing.
|
|
5
|
+
*
|
|
6
|
+
* Sets up an McpServer instance with all tools and resources registered.
|
|
7
|
+
* This module is the primary export — consumers can either use the
|
|
8
|
+
* `createServer()` factory (e.g. for testing) or run the stdio transport
|
|
9
|
+
* via the CLI entry point.
|
|
10
|
+
*
|
|
11
|
+
* @module server
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Creates and configures the MCP server with all tools and resources.
|
|
16
|
+
*
|
|
17
|
+
* @returns A fully configured McpServer ready to be connected to a transport.
|
|
18
|
+
*/
|
|
19
|
+
declare function createServer(): McpServer;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @dojocoding/hacienda-mcp
|
|
23
|
+
*
|
|
24
|
+
* MCP Server for Costa Rica electronic invoicing.
|
|
25
|
+
* Exposes SDK functionality as AI-accessible tools via the Model Context Protocol.
|
|
26
|
+
*
|
|
27
|
+
* Tools:
|
|
28
|
+
* - create_invoice — Build a Factura Electronica XML from structured input
|
|
29
|
+
* - check_status — Check document processing status by clave
|
|
30
|
+
* - list_documents — List recent electronic documents
|
|
31
|
+
* - get_document — Get full document details by clave
|
|
32
|
+
* - lookup_taxpayer — Look up taxpayer info by identification number
|
|
33
|
+
* - draft_invoice — Generate a draft invoice template with sensible defaults
|
|
34
|
+
*
|
|
35
|
+
* Resources:
|
|
36
|
+
* - hacienda://schemas/factura — JSON schema for invoice creation
|
|
37
|
+
* - hacienda://reference/document-types — Document types, codes, and descriptions
|
|
38
|
+
* - hacienda://reference/tax-codes — Tax codes, IVA rates, and units of measure
|
|
39
|
+
* - hacienda://reference/id-types — Identification types and validation rules
|
|
40
|
+
*/
|
|
41
|
+
declare const PACKAGE_NAME: "@dojocoding/hacienda-mcp";
|
|
42
|
+
|
|
43
|
+
export { PACKAGE_NAME, createServer };
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dojocoding/hacienda-mcp",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP Server for Costa Rica electronic invoicing (AI-accessible tools)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"hacienda-mcp": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"keywords": [
|
|
21
|
+
"costa-rica",
|
|
22
|
+
"hacienda",
|
|
23
|
+
"electronic-invoicing",
|
|
24
|
+
"factura-electronica",
|
|
25
|
+
"comprobantes-electronicos",
|
|
26
|
+
"mcp",
|
|
27
|
+
"model-context-protocol"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
31
|
+
"zod": "^4.3.6",
|
|
32
|
+
"@dojocoding/hacienda-shared": "0.2.0",
|
|
33
|
+
"@dojocoding/hacienda-sdk": "0.2.0"
|
|
34
|
+
},
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"author": "Dojo Coding Labs <dev@dojocoding.io> (https://dojocoding.io)",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/DojoCodingLabs/hacienda-cr.git",
|
|
40
|
+
"directory": "packages/mcp"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/DojoCodingLabs/hacienda-cr#readme",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"lint": "eslint src/",
|
|
47
|
+
"typecheck": "tsc --noEmit",
|
|
48
|
+
"clean": "rm -rf dist"
|
|
49
|
+
}
|
|
50
|
+
}
|