@kitsuden/mcp-server 0.0.0-stage → 0.9.0-beta

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.
@@ -0,0 +1,3 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { McpServerDependencies } from "./index";
3
+ export declare function registerTools(server: McpServer, deps: McpServerDependencies): void;
package/dist/toon.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Kitsuden — TOON (Token-Oriented Object Notation), canonical codec
3
+ * ============================================================================
4
+ *
5
+ * Own implementation, dependency-free, of https://toonformat.dev/ . The
6
+ * encoder's OUTPUT is byte-for-byte the same as that of the reference
7
+ * implementation `@toon-format/toon@4.4.0` for any JSON value, and the decoder
8
+ * reads everything that version writes. It is guarded by
9
+ * `src/tests-unit/toon-tabular.test.ts`, which compares the two in both
10
+ * directions (also with random data).
11
+ *
12
+ * This file is the CANONICAL copy. There are two identical copies, byte for byte,
13
+ * for the packages that cannot depend on the API: `packages/sdk/src/toon.ts`
14
+ * (the SDK has no dependencies) and `packages/mcp-server/src/toon.ts`. It is guarded by
15
+ * `src/tests-unit/toon-mirrors.test.ts`: edit here and copy.
16
+ *
17
+ * users[2]{id,name,role}: ← table: the keys ONCE, CSV rows
18
+ * 1,Alice,admin
19
+ * 2,Bob,user
20
+ * docs[2]{id,_meta{datasetId,createdAt},name}: ← object column folded
21
+ * 1,d1,2026-01-01,a into the header
22
+ * 2,d1,2026-01-02,b
23
+ * tags[3]: admin,ops,dev ← inline scalar array
24
+ * items[2]: ← list form (non-uniform objects)
25
+ * - id: 1
26
+ * extra: true
27
+ * - id: 2
28
+ * profile: ← empty object: the key with nothing after it
29
+ * empty: [] ← empty array
30
+ *
31
+ * Root: an array is written without a key (`[2]{id}:`), an empty object is the
32
+ * empty document, and a scalar is its literal. 2-space indentation.
33
+ *
34
+ * Input semantics = those of `JSON.stringify`: `toJSON` is called (Date →
35
+ * ISO), `undefined`/function/symbol properties disappear, in an array
36
+ * they become `null`, NaN/±Infinity become `null` and -0 becomes 0. That way
37
+ * `decodeToon(encodeToon(x))` is the same as `JSON.parse(JSON.stringify(x))`,
38
+ * which is what `auto` mode (lib/formats.ts) needs to verify that
39
+ * a TOON response loses nothing compared with the same one in JSON.
40
+ *
41
+ * History (2026-10-25, measurement G1 in docs/agents/benchmarks.md): the previous
42
+ * codec could not read the list form (it returned `[]` without error in 15 of
43
+ * 24 real endpoints), wrote `{}` where TOON expects the bare key, and
44
+ * put root arrays under an invented `data` key.
45
+ */
46
+ export declare class ToonDecodeError extends SyntaxError {
47
+ line?: number;
48
+ constructor(message: string, line?: number);
49
+ }
50
+ /**
51
+ * Encodes a value to TOON. Same output as `encode()` from
52
+ * `@toon-format/toon@4.4.0` (without a trailing newline). `undefined` at the root
53
+ * gives `null`, like the JSON body of an empty response.
54
+ */
55
+ export declare function encodeToon(input: unknown): string;
56
+ /**
57
+ * Decodes TOON. Reads everything `encodeToon` writes and what the
58
+ * reference implementation writes (tables with folded columns, keyed
59
+ * tables, list form at any depth, delimiters `,` `\t` `|`).
60
+ * The empty document is `{}`. On malformed TOON it throws `ToonDecodeError`:
61
+ * it never returns partial data.
62
+ */
63
+ export declare function decodeToon(text: string): unknown;
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
2
  "name": "@kitsuden/mcp-server",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.9.0-beta",
4
+ "description": "Kitsuden Model Context Protocol (MCP) server for AI agents. Runs on Bun.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Kitsuden/kitsuden.git",
9
+ "directory": "packages/mcp-server"
10
+ },
11
+ "homepage": "https://github.com/Kitsuden/kitsuden/tree/main/packages/mcp-server#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Kitsuden/kitsuden/issues"
14
+ },
15
+ "type": "module",
16
+ "main": "dist/index.js",
17
+ "types": "dist/index.d.ts",
18
+ "bin": {
19
+ "kitsuden-mcp": "dist/standalone.js"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "keywords": [
25
+ "kitsuden",
26
+ "mcp",
27
+ "model-context-protocol",
28
+ "ai",
29
+ "claude",
30
+ "cursor"
31
+ ],
32
+ "author": "Victor Antinori Broce (https://github.com/vigogami)",
33
+ "dependencies": {
34
+ "@modelcontextprotocol/sdk": "^1.32.2",
35
+ "hono": "4.13.19",
36
+ "zod": "^4.6.7"
37
+ },
38
+ "devDependencies": {
39
+ "typescript": "^5.9.3",
40
+ "@types/node": "^22.19.0"
41
+ },
42
+ "engines": {
43
+ "node": ">=22.12.0",
44
+ "bun": ">=1.3.0"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "scripts": {
50
+ "build": "bun build ./src/index.ts --outdir ./dist --target=bun && bun build ./src/standalone.ts --outdir ./dist --target=bun && tsc --emitDeclarationOnly --outDir dist",
51
+ "typecheck": "tsc --noEmit",
52
+ "dev": "bun run --watch src/standalone.ts",
53
+ "start": "bun run dist/standalone.js"
54
+ }
6
55
  }