@podlite/mcp 0.0.3

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,11 @@
1
+ # @podlite/mcp
2
+
3
+ =head1 Upcoming
4
+
5
+ =head1 0.0.3
6
+
7
+ =item declare public npm access so the package publishes to the registry
8
+
9
+ =head1 0.0.2
10
+
11
+ =item initial release: MCP stdio server with four tools — C<podlite_parse> (source to AST with locations), C<podlite_validate> (parse errors + lint rules + schema check), C<podlite_render> (HTML/Markdown), C<podlite_query> (structural selector over blocks)
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2026 Aliaksandr Zahatski
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.
22
+
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @podlite/mcp
2
+
3
+ MCP server for [Podlite](https://podlite.org): gives AI agents and editors four tools to parse, validate, render, and structurally query Podlite documents.
4
+
5
+ ## Connect
6
+
7
+ Add to your MCP client config (Claude Code, Cursor, and other MCP-compatible tools):
8
+
9
+ ```json
10
+ {
11
+ "mcpServers": {
12
+ "podlite": {
13
+ "command": "npx",
14
+ "args": ["-y", "@podlite/mcp"]
15
+ }
16
+ }
17
+ }
18
+ ```
19
+
20
+ Claude Code one-liner:
21
+
22
+ ```bash
23
+ claude mcp add podlite -- npx -y @podlite/mcp
24
+ ```
25
+
26
+ ## Tools
27
+
28
+ | Tool | Input | Output |
29
+ |------|-------|--------|
30
+ | `podlite_parse` | `text` | AST as JSON: typed blocks with `line`/`column` locations |
31
+ | `podlite_validate` | `text` | `{ok, counts, problems[]}` — parse errors, lint rules, schema check |
32
+ | `podlite_render` | `text`, `format: html\|md` | rendered document |
33
+ | `podlite_query` | `selector`, `text`, `format: podlite\|json\|html\|md` | blocks matching a structural selector |
34
+
35
+ Selector examples for `podlite_query`:
36
+
37
+ ```
38
+ head1 all level-1 headings
39
+ code[:lang<python>] code blocks with a :lang attribute
40
+ *[:tags~<draft>] any block tagged draft
41
+ ```
42
+
43
+ A structural break in generated markup comes back as a line-located problem, so an agent can regenerate and re-check instead of shipping a silently broken document.
44
+
45
+ ## Scope notes
46
+
47
+ - The lint rule set is growing. A clean `podlite_validate` result means the source parses and passes current rules, not an exhaustive audit.
48
+ - `=include` blocks are not resolved: the server receives text without a file context.
49
+ - Read-only: no tools mutate files.
50
+
51
+ ## Links
52
+
53
+ - [Podlite specification](https://podlite.org/specification)
54
+ - [Podlite skills for AI agents](https://github.com/podlite/podlite-skills)
55
+ - [Monorepo](https://github.com/podlite/podlite)
56
+
57
+ ## License
58
+
59
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../lib/cli')
package/lib/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/lib/cli.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
4
+ const index_1 = require("./index");
5
+ const main = async () => {
6
+ await (0, index_1.createServer)().connect(new stdio_js_1.StdioServerTransport());
7
+ };
8
+ main().catch(err => {
9
+ console.error(err);
10
+ process.exit(1);
11
+ });
12
+ //# sourceMappingURL=cli.js.map
package/lib/cli.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAAA,wEAAgF;AAChF,mCAAsC;AAEtC,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IACtB,MAAM,IAAA,oBAAY,GAAE,CAAC,OAAO,CAAC,IAAI,+BAAoB,EAAE,CAAC,CAAA;AAC1D,CAAC,CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const createServer: () => McpServer;
package/lib/index.js ADDED
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createServer = void 0;
4
+ const zod_1 = require("zod");
5
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
6
+ const tools_1 = require("./tools");
7
+ const { version } = require('../package.json');
8
+ const textResult = (text) => ({ content: [{ type: 'text', text }] });
9
+ const errorResult = (e) => ({
10
+ content: [{ type: 'text', text: e instanceof Error ? e.message : String(e) }],
11
+ isError: true,
12
+ });
13
+ const createServer = () => {
14
+ const server = new mcp_js_1.McpServer({ name: 'podlite', version });
15
+ server.registerTool('podlite_parse', {
16
+ title: 'Parse Podlite',
17
+ description: 'Parse Podlite source into its AST: a JSON tree of typed blocks with line/column locations.',
18
+ inputSchema: {
19
+ text: zod_1.z.string().describe('Podlite source text'),
20
+ },
21
+ }, async ({ text }) => {
22
+ try {
23
+ return textResult(JSON.stringify((0, tools_1.parseSource)(text), null, 2));
24
+ }
25
+ catch (e) {
26
+ return errorResult(e);
27
+ }
28
+ });
29
+ server.registerTool('podlite_validate', {
30
+ title: 'Validate Podlite',
31
+ description: 'Check Podlite source: parse errors plus lint rules. The rule set is growing; a clean result means the source parses and passes current rules, not an exhaustive audit.',
32
+ inputSchema: {
33
+ text: zod_1.z.string().describe('Podlite source text'),
34
+ },
35
+ }, async ({ text }) => textResult(JSON.stringify((0, tools_1.validateSource)(text), null, 2)));
36
+ server.registerTool('podlite_render', {
37
+ title: 'Render Podlite',
38
+ description: 'Render Podlite source to HTML or Markdown.',
39
+ inputSchema: {
40
+ text: zod_1.z.string().describe('Podlite source text'),
41
+ format: zod_1.z.enum(['html', 'md']).describe('Output format'),
42
+ },
43
+ }, async ({ text, format }) => {
44
+ try {
45
+ return textResult((0, tools_1.renderSource)(text, format));
46
+ }
47
+ catch (e) {
48
+ return errorResult(e);
49
+ }
50
+ });
51
+ server.registerTool('podlite_query', {
52
+ title: 'Query Podlite',
53
+ description: 'Select blocks from Podlite source with a structural selector, e.g. "head1" or "*[:tags~<draft>]". Returns matches as Podlite source, JSON AST, HTML, or Markdown.',
54
+ inputSchema: {
55
+ selector: zod_1.z.string().describe('Block selector'),
56
+ text: zod_1.z.string().describe('Podlite source text'),
57
+ format: zod_1.z.enum(['podlite', 'json', 'html', 'md']).describe('Output format'),
58
+ },
59
+ }, async ({ selector, text, format }) => {
60
+ try {
61
+ const report = (0, tools_1.querySource)(selector, text, format);
62
+ if (report.matchCount === 0) {
63
+ return textResult('No matches.');
64
+ }
65
+ return textResult(report.output);
66
+ }
67
+ catch (e) {
68
+ return errorResult(e);
69
+ }
70
+ });
71
+ return server;
72
+ };
73
+ exports.createServer = createServer;
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC;SAC5E;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;QACnC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAA,mBAAW,EAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;YAClD,IAAI,MAAM,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;gBAC5B,OAAO,UAAU,CAAC,aAAa,CAAC,CAAA;YAClC,CAAC;YACD,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAClC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,WAAW,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;IACH,CAAC,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AA/EY,QAAA,YAAY,gBA+ExB"}
package/lib/tools.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import type { Violation } from 'podlite/lib/lint/types';
2
+ export type ValidateReport = {
3
+ ok: boolean;
4
+ counts: {
5
+ error: number;
6
+ warning: number;
7
+ info: number;
8
+ };
9
+ problems: Violation[];
10
+ };
11
+ export declare const parseSource: (text: string) => any;
12
+ export type RenderFormat = 'html' | 'md';
13
+ export declare const renderSource: (text: string, format: RenderFormat) => string;
14
+ export type QueryFormat = 'podlite' | 'json' | 'html' | 'md';
15
+ export type QueryReport = {
16
+ matchCount: number;
17
+ output: string;
18
+ };
19
+ export declare const querySource: (selector: string, text: string, format: QueryFormat) => QueryReport;
20
+ export declare const validateSource: (text: string) => ValidateReport;
package/lib/tools.js ADDED
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateSource = exports.querySource = exports.renderSource = exports.parseSource = void 0;
4
+ const schema_1 = require("@podlite/schema");
5
+ const podlite_1 = require("podlite");
6
+ const scan_1 = require("podlite/lib/lint/grammar/scan");
7
+ const index_1 = require("podlite/lib/lint/rules/index");
8
+ const engine_1 = require("podlite/lib/lint/engine");
9
+ const loader_1 = require("podlite/lib/lint/loader");
10
+ const syntax_valid_1 = require("podlite/lib/lint/rules/syntax-valid");
11
+ const virtualFile = 'input.podlite';
12
+ const parseSource = (text) => (0, schema_1.parse)(text);
13
+ exports.parseSource = parseSource;
14
+ const renderSource = (text, format) => {
15
+ const p = (0, podlite_1.podlite)({ importPlugins: true });
16
+ const tree = p.toAst(p.parse(text, { podMode: 1 }));
17
+ const out = format === 'md' ? (0, schema_1.toMarkdown)({}).run(tree) : (0, schema_1.toHtml)({}).run(tree);
18
+ return out.toString();
19
+ };
20
+ exports.renderSource = renderSource;
21
+ const sliceBlock = (text, block) => {
22
+ const loc = block.location;
23
+ if (typeof loc?.start?.offset !== 'number' || typeof loc?.end?.offset !== 'number') {
24
+ return '';
25
+ }
26
+ return text.slice(loc.start.offset, loc.end.offset);
27
+ };
28
+ const renderBlock = (block, format) => {
29
+ const root = { type: 'block', name: 'pod', margin: '', content: [block] };
30
+ const out = format === 'md' ? (0, schema_1.toMarkdown)({}).run(root) : (0, schema_1.toHtml)({}).run(root);
31
+ return out.toString().trimEnd();
32
+ };
33
+ const querySource = (selector, text, format) => {
34
+ if (!(0, schema_1.parseSelector)(selector)) {
35
+ throw new Error(`Invalid selector: ${selector}`);
36
+ }
37
+ const docs = [{ file: virtualFile, node: (0, schema_1.parse)(text) }];
38
+ const blocks = [];
39
+ for (const item of (0, schema_1.runSelector)(selector, docs)) {
40
+ if (item && typeof item === 'object' && !('file' in item)) {
41
+ blocks.push(item);
42
+ }
43
+ }
44
+ let output;
45
+ if (format === 'json') {
46
+ output = JSON.stringify(blocks, null, 2);
47
+ }
48
+ else if (format === 'podlite') {
49
+ output = blocks
50
+ .map(b => sliceBlock(text, b).trimEnd())
51
+ .filter(Boolean)
52
+ .join('\n\n');
53
+ }
54
+ else {
55
+ output = blocks
56
+ .map(b => renderBlock(b, format))
57
+ .filter(Boolean)
58
+ .join('\n\n');
59
+ }
60
+ return { matchCount: blocks.length, output };
61
+ };
62
+ exports.querySource = querySource;
63
+ const validateSource = (text) => {
64
+ const problems = [...(0, scan_1.scanSourceRules)(text)];
65
+ try {
66
+ const ast = (0, loader_1.parseContent)(text, 'podlite');
67
+ const ctx = { filePath: virtualFile, fileType: 'podlite', config: {} };
68
+ problems.push(...(0, engine_1.runRules)(ast, index_1.DEFAULT_RULES, ctx));
69
+ for (const err of (0, schema_1.validatePodliteAst)(ast)) {
70
+ problems.push({
71
+ rule: 'schema-valid',
72
+ severity: 'error',
73
+ message: [err.instancePath, err.message].filter(Boolean).join(' '),
74
+ });
75
+ }
76
+ }
77
+ catch (e) {
78
+ problems.push((0, syntax_valid_1.makeSyntaxViolation)(e, virtualFile));
79
+ }
80
+ const counts = { error: 0, warning: 0, info: 0 };
81
+ for (const p of problems)
82
+ counts[p.severity] += 1;
83
+ return { ok: counts.error === 0, counts, problems };
84
+ };
85
+ exports.validateSource = validateSource;
86
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":";;;AAAA,4CAA2G;AAE3G,qCAAiC;AACjC,wDAA+D;AAC/D,wDAA4D;AAC5D,oDAAkD;AAClD,oDAAsD;AACtD,sEAAyE;AASzE,MAAM,WAAW,GAAG,eAAe,CAAA;AAE5B,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;AAA3C,QAAA,WAAW,eAAgC;AAIjD,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,MAAoB,EAAU,EAAE;IACzE,MAAM,CAAC,GAAG,IAAA,iBAAO,EAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1C,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AK,MAAM,CAAC,IAAI,QAAQ;QAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACjD,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AACrD,CAAC,CAAA;AAnBY,QAAA,cAAc,kBAmB1B"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@podlite/mcp",
3
+ "version": "0.0.3",
4
+ "description": "MCP server for Podlite: parse, validate, render, and query tools for AI agents",
5
+ "keywords": [
6
+ "podlite",
7
+ "mcp",
8
+ "model-context-protocol",
9
+ "markup",
10
+ "ast",
11
+ "lint",
12
+ "llm-tools"
13
+ ],
14
+ "main": "./lib/index.js",
15
+ "types": "./lib/index.d.ts",
16
+ "bin": {
17
+ "podlite-mcp": "./bin/podlite-mcp.js"
18
+ },
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/podlite/podlite.git",
25
+ "directory": "packages/podlite-mcp"
26
+ },
27
+ "author": "Aliaksandr Zahatski",
28
+ "license": "MIT",
29
+ "homepage": "https://podlite.org",
30
+ "files": [
31
+ "bin",
32
+ "lib",
33
+ "README.md",
34
+ "CHANGELOG.podlite",
35
+ "LICENSE"
36
+ ],
37
+ "scripts": {
38
+ "clean": "rm -rf lib tsconfig.tsbuildinfo",
39
+ "build": "yarn g:tsc",
40
+ "test": "yarn g:jest --passWithNoTests"
41
+ },
42
+ "dependencies": {
43
+ "@modelcontextprotocol/sdk": "^1.29.0",
44
+ "@podlite/schema": "0.0.53",
45
+ "podlite": "0.0.66",
46
+ "zod": "^3.25.0"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ }
51
+ }