@lingochunk/mcp 0.3.1 → 0.9.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/README.md +114 -11
- package/dist/client.d.ts +207 -0
- package/dist/client.js +164 -0
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +23 -0
- package/dist/config.js +41 -14
- package/dist/config.js.map +1 -1
- package/dist/generated/guides.d.ts +13 -0
- package/dist/generated/guides.js +50 -0
- package/dist/generated/guides.js.map +1 -0
- package/dist/http.d.ts +22 -0
- package/dist/http.js +174 -0
- package/dist/http.js.map +1 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts +13 -0
- package/dist/prompts.js +26 -0
- package/dist/prompts.js.map +1 -0
- package/dist/tools.d.ts +7 -1
- package/dist/tools.js +807 -56
- package/dist/tools.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
/**
|
|
3
|
+
* Register one MCP prompt per authoring skill (name `lingochunk-<skill>`),
|
|
4
|
+
* each returning that skill's full markdown as a user-role message. This is
|
|
5
|
+
* how remote clients (claude.ai, ChatGPT, ...) can pull the craft guidance a
|
|
6
|
+
* slash-command / prompt picker exposes - the same content get_authoring_guide
|
|
7
|
+
* serves as a tool, but surfaced through the prompts capability.
|
|
8
|
+
*
|
|
9
|
+
* Calling registerPrompt makes the high-level McpServer advertise the prompts
|
|
10
|
+
* capability in the initialize handshake, so this must run before
|
|
11
|
+
* server.connect() in BOTH transports (stdio in index.ts, HTTP in http.ts).
|
|
12
|
+
*/
|
|
13
|
+
export declare function registerPrompts(server: McpServer): void;
|
package/dist/prompts.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GUIDES, GUIDE_TOPICS } from "./generated/guides.js";
|
|
2
|
+
/**
|
|
3
|
+
* Register one MCP prompt per authoring skill (name `lingochunk-<skill>`),
|
|
4
|
+
* each returning that skill's full markdown as a user-role message. This is
|
|
5
|
+
* how remote clients (claude.ai, ChatGPT, ...) can pull the craft guidance a
|
|
6
|
+
* slash-command / prompt picker exposes - the same content get_authoring_guide
|
|
7
|
+
* serves as a tool, but surfaced through the prompts capability.
|
|
8
|
+
*
|
|
9
|
+
* Calling registerPrompt makes the high-level McpServer advertise the prompts
|
|
10
|
+
* capability in the initialize handshake, so this must run before
|
|
11
|
+
* server.connect() in BOTH transports (stdio in index.ts, HTTP in http.ts).
|
|
12
|
+
*/
|
|
13
|
+
export function registerPrompts(server) {
|
|
14
|
+
for (const topic of GUIDE_TOPICS) {
|
|
15
|
+
const guide = GUIDES[topic];
|
|
16
|
+
server.registerPrompt(guide.promptName, { title: guide.promptName, description: guide.description }, () => ({
|
|
17
|
+
messages: [
|
|
18
|
+
{
|
|
19
|
+
role: "user",
|
|
20
|
+
content: { type: "text", text: guide.body },
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,CAAC,cAAc,CACnB,KAAK,CAAC,UAAU,EAChB,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,EAC3D,GAAG,EAAE,CAAC,CAAC;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;iBAC5C;aACF;SACF,CAAC,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { type LingoChunkClient } from "./client.js";
|
|
3
3
|
import type { Config } from "./config.js";
|
|
4
|
-
|
|
4
|
+
/** Where the server runs relative to the user. "local": a stdio process on
|
|
5
|
+
* the user's machine (files it writes are the user's files). "remote": a
|
|
6
|
+
* hosted multi-user HTTP server, where writing to the local filesystem is
|
|
7
|
+
* meaningless to the caller - so get_audio_clip is not offered and sibling
|
|
8
|
+
* descriptions stop pointing at it. */
|
|
9
|
+
export type ToolMode = "local" | "remote";
|
|
10
|
+
export declare function registerTools(server: McpServer, client: LingoChunkClient, config: Config, mode?: ToolMode): void;
|