@intlayer/mcp 9.0.1 → 9.4.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 CHANGED
@@ -47,27 +47,27 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
47
47
 
48
48
  ## Keys benefits of Intlayer:
49
49
 
50
- | Feature | Description |
51
- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
53
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
54
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
55
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
56
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
57
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
58
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
59
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/server_component.png?raw=true" alt="Feature" width="700"> | **Consistent Server Component Implementation**<br><br>Perfectly suited for Next.js server components, use the same implementation for both client and server components, no need to pass your `t` function across each server component. <br><br> - [Server Components](https://intlayer.org/doc/environment/nextjs#step-7-utilize-content-in-your-code) |
60
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
61
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
62
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
63
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
66
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
67
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
68
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
69
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) |
70
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
50
+ | Feature | Description |
51
+ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
53
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
54
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
55
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
56
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
57
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
58
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
59
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/server_component.png?raw=true" alt="Feature" width="700"> | **Consistent Server Component Implementation**<br><br>Perfectly suited for Next.js server components, use the same implementation for both client and server components, no need to pass your `t` function across each server component. <br><br> - [Server Components](https://intlayer.org/doc/environment/nextjs#step-7-utilize-content-in-your-code) |
60
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
61
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
62
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
63
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
66
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
67
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
68
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
69
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
70
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
71
71
 
72
72
  ---
73
73
 
@@ -162,7 +162,7 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
162
162
  <li><a href="https://intlayer.org/doc/concept/cms" rel=''>Intlayer CMS</a></li>
163
163
  <li><a href="https://intlayer.org/doc/concept/content" rel=''>Dictionary</a>
164
164
  <ul>
165
- <li><a href="https://intlayer.org/doc/concept/content/per-locale-file" rel=''>Per-Locale Content Declaration File</a></li>
165
+ <li><a href="https://intlayer.org/doc/concept/per-locale-file" rel=''>Per-Locale Content Declaration File</a></li>
166
166
  <li><a href="https://intlayer.org/doc/concept/content/translation" rel=''>Translation</a></li>
167
167
  <li><a href="https://intlayer.org/doc/concept/content/enumeration" rel=''>Enumeration</a></li>
168
168
  <li><a href="https://intlayer.org/doc/concept/content/condition" rel=''>Condition</a></li>
@@ -183,7 +183,7 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
183
183
  <ul>
184
184
  <li><a href="https://intlayer.org/doc/environment/nextjs/15" rel=''>Next.js 15</a></li>
185
185
  <li><a href="https://intlayer.org/doc/environment/nextjs/14" rel=''>Next.js 14 (App Router)</a></li>
186
- <li><a href="https://intlayer.org/doc/environment/nextjs/next-with-Page-Router" rel=''>Next.js Page Router</a></li>
186
+ <li><a href="https://intlayer.org/doc/environment/nextjs/next-with-page-router" rel=''>Next.js Page Router</a></li>
187
187
  <li><a href="https://intlayer.org/doc/environment/nextjs/compiler" rel=''>Next.js using Compiler</a></li>
188
188
  </ul>
189
189
  </li>
@@ -212,8 +212,9 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
212
212
  <li><a href="https://intlayer.org/doc/environment/sveltekit" rel=''>SvelteKit</a></li>
213
213
  <li><a href="https://intlayer.org/doc/environment/vite-and-preact" rel=''>Vite + Preact</a></li>
214
214
  <li><a href="https://intlayer.org/doc/environment/vite-and-vue" rel=''>Vite + Vue</a></li>
215
- <li><a href="https://intlayer.org/doc/environment/vite-and-nuxt" rel=''>Vite + Nuxt</a></li>
215
+ <li><a href="https://intlayer.org/doc/environment/nuxt-and-vue" rel=''>Vite + Nuxt</a></li>
216
216
  <li><a href="https://intlayer.org/doc/environment/vite-and-solid" rel=''>Vite + Solid</a></li>
217
+ <li><a href="https://intlayer.org/doc/environment/solid-start" rel=''>Solid Start</a></li>
217
218
  <li><a href="https://intlayer.org/doc/environment/angular" rel=''>Angular</a></li>
218
219
  <li>
219
220
  <a href="https://intlayer.org/doc/environment/express" rel=''>Backend</a>
@@ -223,7 +224,9 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
223
224
  <li><a href="https://intlayer.org/doc/environment/fastify" rel=''>Fastify</a></li>
224
225
  <li><a href="https://intlayer.org/doc/environment/adonisjs" rel=''>AdonisJS</a></li>
225
226
  <li><a href="https://intlayer.org/doc/environment/hono" rel=''>Hono</a></li>
227
+ <li><a href="https://intlayer.org/doc/environment/elysia" rel=''>Elysia</a></li>
226
228
  </ul>
229
+
227
230
  </li>
228
231
  </ul>
229
232
  </details>
@@ -327,4 +330,4 @@ Contribute on [GitHub](https://github.com/aymericzip/intlayer), [GitLab](https:/
327
330
 
328
331
  If you like Intlayer, give us a ⭐ on GitHub. It helps others discover the project! [See why GitHub Stars matter](https://github.com/aymericzip/intlayer/blob/main/CONTRIBUTING.md#why-github-stars-matter-).
329
332
 
330
- [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.com/#aymericzip/intlayer&Date)
333
+ [![Star History Chart](https://star-history.dera.page/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.dera.page/#aymericzip/intlayer&Date)
@@ -1 +1 @@
1
- {"version":3,"file":"client.mjs","names":["pathDirname"],"sources":["../../../src/client/client.ts"],"sourcesContent":["import { dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { createMCPClient, type MCPClient } from '@ai-sdk/mcp';\nimport { isESModule } from '@intlayer/config/utils';\n\nexport type { MCPClient };\n\nexport const dirname: string = isESModule\n ? pathDirname(fileURLToPath(import.meta.url))\n : __dirname;\n\nexport const loadMCPTools = async (\n serverURL: string\n): Promise<{ client: MCPClient; tools: Record<string, any> }> => {\n const client = await createMCPClient({\n transport: { type: 'http', url: serverURL },\n });\n const tools = await client.tools();\n return { client, tools };\n};\n"],"mappings":";;;;;;AAOA,MAAa,UAAkB,aAC3BA,UAAY,cAAc,OAAO,KAAK,GAAG,CAAC,IAC1C;AAEJ,MAAa,eAAe,OAC1B,cAC+D;CAC/D,MAAM,SAAS,MAAM,gBAAgB,EACnC,WAAW;EAAE,MAAM;EAAQ,KAAK;CAAU,EAC5C,CAAC;CAED,OAAO;EAAE;EAAQ,aADG,OAAO,MAAM;CACV;AACzB"}
1
+ {"version":3,"file":"client.mjs","names":["pathDirname"],"sources":["../../../src/client/client.ts"],"sourcesContent":["import { dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { createMCPClient, type MCPClient } from '@ai-sdk/mcp';\nimport { isESModule } from '@intlayer/config/utils';\n\nexport type { MCPClient };\n\nexport const dirname: string = isESModule\n ? pathDirname(fileURLToPath(import.meta.url))\n : __dirname;\n\nexport const loadMCPTools = async (\n serverURL: string\n): Promise<{ client: MCPClient; tools: Record<string, any> }> => {\n const client = await createMCPClient({\n transport: { type: 'http', url: serverURL },\n });\n const tools = await client.tools();\n return { client, tools };\n};\n"],"mappings":";;;;;;AAOA,MAAa,UAAkB,aAC3BA,UAAY,cAAc,YAAY,GAAG,CAAC,IAC1C;AAEJ,MAAa,eAAe,OAC1B,cAC+D;CAC/D,MAAM,SAAS,MAAM,gBAAgB,EACnC,WAAW;EAAE,MAAM;EAAQ,KAAK;CAAU,EAC5C,CAAC;CAED,OAAO;EAAE;EAAQ,aADG,OAAO,MAAM;CACV;AACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.mjs","names":["pathDirname"],"sources":["../../../src/server/server.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname as pathDirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { isESModule } from '@intlayer/config/utils';\nimport z from 'zod';\nimport { loadAPITools } from '../tools/api';\nimport { loadCLITools } from '../tools/cli';\nimport { loadDocsTools } from '../tools/docs';\nimport { loadInstallLSPTool } from '../tools/installLSP';\nimport { loadInstallSkillsTool } from '../tools/installSkills';\n\nexport const dirname: string = isESModule\n ? pathDirname(fileURLToPath(import.meta.url))\n : __dirname;\n\nconst packageJson: Record<string, any> = JSON.parse(\n readFileSync(resolve(dirname, '../../../package.json'), 'utf8')\n);\n\ntype ToolResult = {\n content: { type: string; text: string }[];\n isError?: boolean;\n};\n\ntype StoredTool = {\n name: string;\n description?: string;\n annotations?: Record<string, any>;\n inputSchema: Record<string, any>;\n handler: (params: any) => Promise<ToolResult>;\n};\n\nexport interface McpTransport {\n start(server: McpServer): Promise<void>;\n}\n\nexport class McpServer {\n private readonly _tools = new Map<string, StoredTool>();\n private readonly _info: { name: string; version: string };\n\n constructor(info: { name: string; version: string }) {\n this._info = info;\n }\n\n registerTool(\n name: string,\n config: {\n title?: string;\n description?: string;\n inputSchema?: Record<string, any>;\n annotations?: Record<string, any>;\n },\n handler: (params: any) => Promise<ToolResult>\n ): void {\n const shape = config.inputSchema ?? {};\n let inputSchema: Record<string, any>;\n try {\n inputSchema = z.toJSONSchema(z.object(shape)) as Record<string, any>;\n } catch {\n inputSchema = { type: 'object', properties: {} };\n }\n this._tools.set(name, {\n name,\n description: config.description,\n annotations: config.annotations,\n inputSchema,\n handler,\n });\n }\n\n async handleMessage(message: any): Promise<any> {\n const { id, method, params } = message;\n const isNotification = id === undefined;\n\n switch (method) {\n case 'initialize':\n return {\n jsonrpc: '2.0',\n id,\n result: {\n protocolVersion: '2024-11-05',\n capabilities: { tools: {} },\n serverInfo: this._info,\n },\n };\n\n case 'tools/list':\n return {\n jsonrpc: '2.0',\n id,\n result: {\n tools: Array.from(this._tools.values()).map((t) => ({\n name: t.name,\n description: t.description,\n inputSchema: t.inputSchema,\n ...(t.annotations && { annotations: t.annotations }),\n })),\n },\n };\n\n case 'tools/call': {\n const { name, arguments: args } = params ?? {};\n const tool = this._tools.get(name);\n if (!tool) {\n if (isNotification) return null;\n return {\n jsonrpc: '2.0',\n id,\n error: { code: -32601, message: `Tool not found: ${name}` },\n };\n }\n try {\n const result = await tool.handler(args ?? {});\n if (isNotification) return null;\n return { jsonrpc: '2.0', id, result };\n } catch (error) {\n if (isNotification) return null;\n return {\n jsonrpc: '2.0',\n id,\n error: {\n code: -32000,\n message: error instanceof Error ? error.message : String(error),\n },\n };\n }\n }\n\n case 'ping':\n if (isNotification) return null;\n return { jsonrpc: '2.0', id, result: {} };\n\n default:\n if (isNotification) return null;\n return {\n jsonrpc: '2.0',\n id,\n error: { code: -32601, message: `Method not found: ${method}` },\n };\n }\n }\n\n async connect(transport: McpTransport): Promise<void> {\n await transport.start(this);\n }\n}\n\ntype LoadServer = (options: { isLocal: boolean }) => McpServer;\n\nexport const loadServer: LoadServer = ({ isLocal }) => {\n const server = new McpServer({\n name: 'intlayer',\n version: packageJson.version,\n });\n\n if (isLocal) {\n try {\n loadCLITools(server);\n loadInstallSkillsTool(server);\n loadInstallLSPTool(server);\n } catch (error) {\n console.error('Error loading CLI tools:', error);\n }\n }\n\n try {\n loadDocsTools(server);\n } catch (error) {\n console.error('Error loading docs tools:', error);\n }\n\n try {\n loadAPITools(server);\n } catch (error) {\n console.error('Error loading API tools:', error);\n }\n\n return server;\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,UAAkB,aAC3BA,UAAY,cAAc,OAAO,KAAK,GAAG,CAAC,IAC1C;AAEJ,MAAM,cAAmC,KAAK,MAC5C,aAAa,QAAQ,SAAS,uBAAuB,GAAG,MAAM,CAChE;AAmBA,IAAa,YAAb,MAAuB;CACrB,AAAiB,yBAAS,IAAI,IAAwB;CACtD,AAAiB;CAEjB,YAAY,MAAyC;EACnD,KAAK,QAAQ;CACf;CAEA,aACE,MACA,QAMA,SACM;EACN,MAAM,QAAQ,OAAO,eAAe,CAAC;EACrC,IAAI;EACJ,IAAI;GACF,cAAc,EAAE,aAAa,EAAE,OAAO,KAAK,CAAC;EAC9C,QAAQ;GACN,cAAc;IAAE,MAAM;IAAU,YAAY,CAAC;GAAE;EACjD;EACA,KAAK,OAAO,IAAI,MAAM;GACpB;GACA,aAAa,OAAO;GACpB,aAAa,OAAO;GACpB;GACA;EACF,CAAC;CACH;CAEA,MAAM,cAAc,SAA4B;EAC9C,MAAM,EAAE,IAAI,QAAQ,WAAW;EAC/B,MAAM,iBAAiB,OAAO;EAE9B,QAAQ,QAAR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0B,EAAE,cAAc;CACrD,MAAM,SAAS,IAAI,UAAU;EAC3B,MAAM;EACN,SAAS,YAAY;CACvB,CAAC;CAED,IAAI,SACF,IAAI;EACF,aAAa,MAAM;EACnB,sBAAsB,MAAM;EAC5B,mBAAmB,MAAM;CAC3B,SAAS,OAAO;EACd,QAAQ,MAAM,4BAA4B,KAAK;CACjD;CAGF,IAAI;EACF,cAAc,MAAM;CACtB,SAAS,OAAO;EACd,QAAQ,MAAM,6BAA6B,KAAK;CAClD;CAEA,IAAI;EACF,aAAa,MAAM;CACrB,SAAS,OAAO;EACd,QAAQ,MAAM,4BAA4B,KAAK;CACjD;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"server.mjs","names":["pathDirname"],"sources":["../../../src/server/server.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname as pathDirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { isESModule } from '@intlayer/config/utils';\nimport z from 'zod';\nimport { loadAPITools } from '../tools/api';\nimport { loadCLITools } from '../tools/cli';\nimport { loadDocsTools } from '../tools/docs';\nimport { loadInstallLSPTool } from '../tools/installLSP';\nimport { loadInstallSkillsTool } from '../tools/installSkills';\n\nexport const dirname: string = isESModule\n ? pathDirname(fileURLToPath(import.meta.url))\n : __dirname;\n\nconst packageJson: Record<string, any> = JSON.parse(\n readFileSync(resolve(dirname, '../../../package.json'), 'utf8')\n);\n\ntype ToolResult = {\n content: { type: string; text: string }[];\n isError?: boolean;\n};\n\ntype StoredTool = {\n name: string;\n description?: string;\n annotations?: Record<string, any>;\n inputSchema: Record<string, any>;\n handler: (params: any) => Promise<ToolResult>;\n};\n\nexport interface McpTransport {\n start(server: McpServer): Promise<void>;\n}\n\nexport class McpServer {\n private readonly _tools = new Map<string, StoredTool>();\n private readonly _info: { name: string; version: string };\n\n constructor(info: { name: string; version: string }) {\n this._info = info;\n }\n\n registerTool(\n name: string,\n config: {\n title?: string;\n description?: string;\n inputSchema?: Record<string, any>;\n annotations?: Record<string, any>;\n },\n handler: (params: any) => Promise<ToolResult>\n ): void {\n const shape = config.inputSchema ?? {};\n let inputSchema: Record<string, any>;\n try {\n inputSchema = z.toJSONSchema(z.object(shape)) as Record<string, any>;\n } catch {\n inputSchema = { type: 'object', properties: {} };\n }\n this._tools.set(name, {\n name,\n description: config.description,\n annotations: config.annotations,\n inputSchema,\n handler,\n });\n }\n\n async handleMessage(message: any): Promise<any> {\n const { id, method, params } = message;\n const isNotification = id === undefined;\n\n switch (method) {\n case 'initialize':\n return {\n jsonrpc: '2.0',\n id,\n result: {\n protocolVersion: '2024-11-05',\n capabilities: { tools: {} },\n serverInfo: this._info,\n },\n };\n\n case 'tools/list':\n return {\n jsonrpc: '2.0',\n id,\n result: {\n tools: Array.from(this._tools.values()).map((t) => ({\n name: t.name,\n description: t.description,\n inputSchema: t.inputSchema,\n ...(t.annotations && { annotations: t.annotations }),\n })),\n },\n };\n\n case 'tools/call': {\n const { name, arguments: args } = params ?? {};\n const tool = this._tools.get(name);\n if (!tool) {\n if (isNotification) return null;\n return {\n jsonrpc: '2.0',\n id,\n error: { code: -32601, message: `Tool not found: ${name}` },\n };\n }\n try {\n const result = await tool.handler(args ?? {});\n if (isNotification) return null;\n return { jsonrpc: '2.0', id, result };\n } catch (error) {\n if (isNotification) return null;\n return {\n jsonrpc: '2.0',\n id,\n error: {\n code: -32000,\n message: error instanceof Error ? error.message : String(error),\n },\n };\n }\n }\n\n case 'ping':\n if (isNotification) return null;\n return { jsonrpc: '2.0', id, result: {} };\n\n default:\n if (isNotification) return null;\n return {\n jsonrpc: '2.0',\n id,\n error: { code: -32601, message: `Method not found: ${method}` },\n };\n }\n }\n\n async connect(transport: McpTransport): Promise<void> {\n await transport.start(this);\n }\n}\n\ntype LoadServer = (options: { isLocal: boolean }) => McpServer;\n\nexport const loadServer: LoadServer = ({ isLocal }) => {\n const server = new McpServer({\n name: 'intlayer',\n version: packageJson.version,\n });\n\n if (isLocal) {\n try {\n loadCLITools(server);\n loadInstallSkillsTool(server);\n loadInstallLSPTool(server);\n } catch (error) {\n console.error('Error loading CLI tools:', error);\n }\n }\n\n try {\n loadDocsTools(server);\n } catch (error) {\n console.error('Error loading docs tools:', error);\n }\n\n try {\n loadAPITools(server);\n } catch (error) {\n console.error('Error loading API tools:', error);\n }\n\n return server;\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,UAAkB,aAC3BA,UAAY,cAAc,YAAY,GAAG,CAAC,IAC1C;AAEJ,MAAM,cAAmC,KAAK,MAC5C,aAAa,QAAQ,SAAS,uBAAuB,GAAG,MAAM,CAChE;AAmBA,IAAa,YAAb,MAAuB;CACrB,AAAiB,yBAAS,IAAI,IAAwB;CACtD,AAAiB;CAEjB,YAAY,MAAyC;EACnD,KAAK,QAAQ;CACf;CAEA,aACE,MACA,QAMA,SACM;EACN,MAAM,QAAQ,OAAO,eAAe,CAAC;EACrC,IAAI;EACJ,IAAI;GACF,cAAc,EAAE,aAAa,EAAE,OAAO,KAAK,CAAC;EAC9C,QAAQ;GACN,cAAc;IAAE,MAAM;IAAU,YAAY,CAAC;GAAE;EACjD;EACA,KAAK,OAAO,IAAI,MAAM;GACpB;GACA,aAAa,OAAO;GACpB,aAAa,OAAO;GACpB;GACA;EACF,CAAC;CACH;CAEA,MAAM,cAAc,SAA4B;EAC9C,MAAM,EAAE,IAAI,QAAQ,WAAW;EAC/B,MAAM,iBAAiB,OAAO;EAE9B,QAAQ,QAAR;GACE,KAAK,cACH,OAAO;IACL,SAAS;IACT;IACA,QAAQ;KACN,iBAAiB;KACjB,cAAc,EAAE,OAAO,CAAC,EAAE;KAC1B,YAAY,KAAK;IACnB;GACF;GAEF,KAAK,cACH,OAAO;IACL,SAAS;IACT;IACA,QAAQ,EACN,OAAO,MAAM,KAAK,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO;KAClD,MAAM,EAAE;KACR,aAAa,EAAE;KACf,aAAa,EAAE;KACf,GAAI,EAAE,eAAe,EAAE,aAA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AAM;CACrB,SAAS,OAAO;EACd,QAAQ,MAAM,4BAA4B,KAAK;CACjD;CAEA,OAAO;AACT"}
@@ -1,6 +1,7 @@
1
1
  import z from "zod";
2
2
  import { getIntlayerAPI } from "@intlayer/api";
3
3
  import { editor } from "@intlayer/config/built";
4
+ import { getEditorClientSecret } from "@intlayer/config/secrets";
4
5
 
5
6
  //#region src/tools/api.ts
6
7
  const authSchema = {
@@ -9,13 +10,14 @@ const authSchema = {
9
10
  };
10
11
  const getAPI = async (clientId, clientSecret) => {
11
12
  const resolvedClientId = clientId ?? editor.clientId;
12
- const resolvedClientSecret = clientSecret ?? editor.clientSecret;
13
+ const resolvedClientSecret = clientSecret ?? getEditorClientSecret();
13
14
  if (!resolvedClientId || !resolvedClientSecret) throw new Error("Intlayer credentials not found. Provide clientId/clientSecret or set INTLAYER_CLIENT_ID/INTLAYER_CLIENT_SECRET.");
14
- const token = (await getIntlayerAPI({}, { editor: {
15
+ const configWithCreds = { editor: {
15
16
  ...editor,
16
17
  clientId: resolvedClientId,
17
18
  clientSecret: resolvedClientSecret
18
- } }).oAuth.getOAuth2AccessToken())?.data?.access_token;
19
+ } };
20
+ const token = (await getIntlayerAPI({}, configWithCreds).oAuth.getOAuth2AccessToken())?.data?.access_token;
19
21
  if (!token) throw new Error("Failed to obtain OAuth2 access token. Check your credentials.");
20
22
  return getIntlayerAPI({ headers: { Authorization: `Bearer ${token}` } }, { editor });
21
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"api.mjs","names":[],"sources":["../../../src/tools/api.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { editor } from '@intlayer/config/built';\nimport z from 'zod';\nimport type { McpServer } from './docs';\n\ntype LoadAPITools = (server: McpServer) => void;\n\nconst authSchema = {\n clientId: z\n .string()\n .optional()\n .describe(\n 'Intlayer OAuth2 client ID (access key). Falls back to INTLAYER_CLIENT_ID env var.'\n ),\n clientSecret: z\n .string()\n .optional()\n .describe(\n 'Intlayer OAuth2 client secret. Falls back to INTLAYER_CLIENT_SECRET env var.'\n ),\n};\n\nconst getAPI = async (clientId?: string, clientSecret?: string) => {\n const resolvedClientId = clientId ?? editor.clientId;\n const resolvedClientSecret = clientSecret ?? editor.clientSecret;\n\n if (!resolvedClientId || !resolvedClientSecret) {\n throw new Error(\n 'Intlayer credentials not found. Provide clientId/clientSecret or set INTLAYER_CLIENT_ID/INTLAYER_CLIENT_SECRET.'\n );\n }\n\n const configWithCreds = {\n editor: {\n ...editor,\n clientId: resolvedClientId,\n clientSecret: resolvedClientSecret,\n },\n };\n\n const tempAPI = getIntlayerAPI({}, configWithCreds);\n const tokenResult = await tempAPI.oAuth.getOAuth2AccessToken();\n const token = (tokenResult as any)?.data?.access_token as string | undefined;\n\n if (!token) {\n throw new Error(\n 'Failed to obtain OAuth2 access token. Check your credentials.'\n );\n }\n\n return getIntlayerAPI(\n { headers: { Authorization: `Bearer ${token}` } },\n { editor }\n );\n};\n\nconst ok = (data: unknown) => ({\n content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],\n});\n\nconst fail = (label: string, error: unknown) => ({\n content: [\n {\n type: 'text' as const,\n text: `${label} failed: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true as const,\n});\n\nexport const loadAPITools: LoadAPITools = (server) => {\n // ── Dictionaries ──────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-dictionaries-list',\n {\n title: 'List Dictionaries',\n description:\n 'List all dictionaries for the selected project. Returns keys, IDs, and metadata.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.getDictionaries({\n page,\n pageSize,\n });\n return ok(result);\n } catch (error) {\n return fail('List dictionaries', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-get',\n {\n title: 'Get Dictionary',\n description: 'Get a dictionary by its key, including its full content.',\n inputSchema: {\n ...authSchema,\n dictionaryKey: z.string().describe('The dictionary key'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, dictionaryKey }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.getDictionary(dictionaryKey);\n return ok(result);\n } catch (error) {\n return fail('Get dictionary', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-create',\n {\n title: 'Create Dictionary',\n description: 'Create a new dictionary in the selected project.',\n inputSchema: {\n ...authSchema,\n key: z.string().describe('Unique key for the dictionary'),\n title: z.string().optional().describe('Human-readable title'),\n description: z\n .string()\n .optional()\n .describe('Description of the dictionary'),\n content: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Initial content as JSON object'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, key, title, description, content }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.addDictionary({\n key,\n title,\n description,\n content,\n });\n return ok(result);\n } catch (error) {\n return fail('Create dictionary', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-update',\n {\n title: 'Update Dictionary',\n description: 'Update an existing dictionary content or metadata.',\n inputSchema: {\n ...authSchema,\n id: z.string().describe('Dictionary ID'),\n key: z.string().optional().describe('New key for the dictionary'),\n title: z.string().optional().describe('New title'),\n description: z.string().optional().describe('New description'),\n content: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Updated content as JSON object'),\n },\n annotations: { destructiveHint: true },\n },\n async ({\n clientId,\n clientSecret,\n id,\n key,\n title,\n description,\n content,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.updateDictionary({\n id,\n key,\n title,\n description,\n content,\n });\n return ok(result);\n } catch (error) {\n return fail('Update dictionary', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-delete',\n {\n title: 'Delete Dictionary',\n description:\n 'Delete a dictionary by its ID. This action is irreversible.',\n inputSchema: {\n ...authSchema,\n dictionaryId: z.string().describe('Dictionary ID to delete'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, dictionaryId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.deleteDictionary(dictionaryId);\n return ok(result);\n } catch (error) {\n return fail('Delete dictionary', error);\n }\n }\n );\n\n // ── Tags ──────────────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-tags-list',\n {\n title: 'List Tags',\n description: 'List all tags for the selected organization.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.getTags({ page, pageSize });\n return ok(result);\n } catch (error) {\n return fail('List tags', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-tag-create',\n {\n title: 'Create Tag',\n description:\n 'Create a new tag in the organization. Tags can be used to group dictionaries and provide AI context.',\n inputSchema: {\n ...authSchema,\n key: z.string().describe('Unique tag key'),\n name: z.string().optional().describe('Display name for the tag'),\n description: z.string().optional().describe('Description of the tag'),\n color: z.string().optional().describe('Tag color (hex code)'),\n instructions: z\n .string()\n .optional()\n .describe('AI instructions to apply when this tag is used'),\n },\n annotations: { destructiveHint: false },\n },\n async ({\n clientId,\n clientSecret,\n key,\n name,\n description,\n color,\n instructions,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.addTag({\n key,\n name,\n description,\n color,\n instructions,\n });\n return ok(result);\n } catch (error) {\n return fail('Create tag', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-tag-update',\n {\n title: 'Update Tag',\n description: 'Update an existing tag.',\n inputSchema: {\n ...authSchema,\n tagId: z.string().describe('Tag ID to update'),\n key: z.string().optional().describe('New key'),\n name: z.string().optional().describe('New display name'),\n description: z.string().optional().describe('New description'),\n color: z.string().optional().describe('New color (hex code)'),\n instructions: z.string().optional().describe('New AI instructions'),\n },\n annotations: { destructiveHint: true },\n },\n async ({\n clientId,\n clientSecret,\n tagId,\n key,\n name,\n description,\n color,\n instructions,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.updateTag(tagId, {\n key,\n name,\n description,\n color,\n instructions,\n });\n return ok(result);\n } catch (error) {\n return fail('Update tag', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-tag-delete',\n {\n title: 'Delete Tag',\n description: 'Delete a tag by its ID.',\n inputSchema: {\n ...authSchema,\n tagId: z.string().describe('Tag ID to delete'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, tagId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.deleteTag(tagId);\n return ok(result);\n } catch (error) {\n return fail('Delete tag', error);\n }\n }\n );\n\n // ── Organizations ─────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-organizations-list',\n {\n title: 'List Organizations',\n description: 'List all organizations the authenticated user belongs to.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.organization.getOrganizations({\n page,\n pageSize,\n });\n return ok(result);\n } catch (error) {\n return fail('List organizations', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-organization-select',\n {\n title: 'Select Organization',\n description:\n 'Select an organization as the current active organization. Required before accessing organization-specific resources.',\n inputSchema: {\n ...authSchema,\n organizationId: z.string().describe('Organization ID to select'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, organizationId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result =\n await api.organization.selectOrganization(organizationId);\n return ok(result);\n } catch (error) {\n return fail('Select organization', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-organization-update',\n {\n title: 'Update Organization',\n description: 'Update the selected organization name or settings.',\n inputSchema: {\n ...authSchema,\n name: z.string().optional().describe('New organization name'),\n customInstructions: z\n .string()\n .optional()\n .describe('Custom AI instructions for this organization'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, name, customInstructions }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.organization.updateOrganization({\n name,\n customInstructions,\n });\n return ok(result);\n } catch (error) {\n return fail('Update organization', error);\n }\n }\n );\n\n // ── Projects ──────────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-cms-projects-list',\n {\n title: 'List CMS Projects',\n description:\n 'List all Intlayer CMS projects for the selected organization. These are server-side projects, not local project directories.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.getProjects({ page, pageSize });\n return ok(result);\n } catch (error) {\n return fail('List CMS projects', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-project-select',\n {\n title: 'Select CMS Project',\n description:\n 'Select a CMS project as the current active project. Required before accessing project-specific dictionaries.',\n inputSchema: {\n ...authSchema,\n projectId: z.string().describe('Project ID to select'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, projectId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.selectProject(projectId);\n return ok(result);\n } catch (error) {\n return fail('Select CMS project', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-project-create',\n {\n title: 'Create CMS Project',\n description: 'Create a new CMS project in the selected organization.',\n inputSchema: {\n ...authSchema,\n name: z.string().describe('Project name'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.addProject({ name });\n return ok(result);\n } catch (error) {\n return fail('Create CMS project', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-project-update',\n {\n title: 'Update CMS Project',\n description: 'Update the selected CMS project settings.',\n inputSchema: {\n ...authSchema,\n name: z.string().optional().describe('New project name'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.updateProject({ name });\n return ok(result);\n } catch (error) {\n return fail('Update CMS project', error);\n }\n }\n );\n\n // ── Environments ──────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-cms-environment-select',\n {\n title: 'Select CMS Environment',\n description:\n 'Select a CMS environment as the current active environment. Required before accessing environment-specific dictionaries.',\n inputSchema: {\n ...authSchema,\n environmentId: z.string().describe('Environment ID to select'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, environmentId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.selectEnvironment(environmentId);\n return ok(result);\n } catch (error) {\n return fail('Select CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-reset',\n {\n title: 'Reset CMS Environment to Production',\n description:\n 'Reset the current active environment to the default production environment.',\n inputSchema: {\n ...authSchema,\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.resetToProductionEnvironment();\n return ok(result);\n } catch (error) {\n return fail('Reset CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-create',\n {\n title: 'Create CMS Environment',\n description: 'Create a new CMS environment in the selected project.',\n inputSchema: {\n ...authSchema,\n name: z.string().describe('Environment name'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.addEnvironment({ name });\n return ok(result);\n } catch (error) {\n return fail('Create CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-update',\n {\n title: 'Update CMS Environment',\n description: 'Update the selected CMS environment settings.',\n inputSchema: {\n ...authSchema,\n environmentId: z.string().describe('Environment ID to update'),\n name: z.string().optional().describe('New environment name'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, environmentId, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.updateEnvironment(environmentId, {\n name,\n });\n return ok(result);\n } catch (error) {\n return fail('Update CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-delete',\n {\n title: 'Delete CMS Environment',\n description: 'Delete a CMS environment by its ID.',\n inputSchema: {\n ...authSchema,\n environmentId: z.string().describe('Environment ID to delete'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, environmentId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.deleteEnvironment(environmentId);\n return ok(result);\n } catch (error) {\n return fail('Delete CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-migrate',\n {\n title: 'Migrate CMS Environment',\n description:\n 'Migrate dictionaries and configuration from one environment to another.',\n inputSchema: {\n ...authSchema,\n sourceEnvironmentId: z.string().describe('Source environment ID'),\n targetEnvironmentId: z.string().describe('Target environment ID'),\n strategy: z\n .enum(['overwrite', 'fill-missing'])\n .describe(\n 'Migration strategy: overwrite existing or only fill missing'\n ),\n migrateContent: z\n .boolean()\n .optional()\n .describe('Whether to migrate content (dictionaries)'),\n migrateConfiguration: z\n .boolean()\n .optional()\n .describe('Whether to migrate environment configuration'),\n },\n annotations: { destructiveHint: true },\n },\n async ({\n clientId,\n clientSecret,\n sourceEnvironmentId,\n targetEnvironmentId,\n strategy,\n migrateContent,\n migrateConfiguration,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.migrateEnvironment({\n sourceEnvironmentId,\n targetEnvironmentId,\n strategy,\n migrateContent,\n migrateConfiguration,\n });\n return ok(result);\n } catch (error) {\n return fail('Migrate CMS environment', error);\n }\n }\n );\n};\n"],"mappings":";;;;;AAOA,MAAM,aAAa;CACjB,UAAU,EACP,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,mFACF;CACF,cAAc,EACX,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,8EACF;AACJ;AAEA,MAAM,SAAS,OAAO,UAAmB,iBAA0B;CACjE,MAAM,mBAAmB,YAAY,OAAO;CAC5C,MAAM,uBAAuB,gBAAgB,OAAO;CAEpD,IAAI,CAAC,oBAAoB,CAAC,sBACxB,MAAM,IAAI,MACR,iHACF;CAaF,MAAM,SAAS,MAFC,eAAe,CAAC,GAAG,EAPjC,QAAQ;EACN,GAAG;EACH,UAAU;EACV,cAAc;CAChB,EAG+C,CACjB,CAAC,CAAC,MAAM,qBAAqB,EACnC,EAAU,MAAM;CAE1C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,+DACF;CAGF,OAAO,eACL,EAAE,SAAS,EAAE,eAAe,UAAU,QAAQ,EAAE,GAChD,EAAE,OAAO,CACX;AACF;AAEA,MAAM,MAAM,UAAmB,EAC7B,SAAS,CAAC;CAAE,MAAM;CAAiB,MAAM,KAAK,UAAU,MAAM,MAAM,CAAC;AAAE,CAAC,EAC1E;AAEA,MAAM,QAAQ,OAAe,WAAoB;CAC/C,SAAS,CACP;EACE,MAAM;EACN,MAAM,GAAG,MAAM,WAAW,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACjF,CACF;CACA,SAAS;AACX;AAEA,MAAa,gBAA8B,WAAW;CAGpD,OAAO,aACL,8BACA;EACE,OAAO;EACP,aACE;EACF,aAAa;GACX,GAAG;GACH,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,uBAAuB;GAC5D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,gBAAgB;EAC3D;EACA,aAAa,EAAE,cAAc,KAAK;CACp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AAgB,EACb,QAAQ,CAAC,CACT,SAAS,CAAC,CACV,SAAS,2CAA2C;GACvD,sBAAsB,EACnB,QAAQ,CAAC,CACT,SAAS,CAAC,CACV,SAAS,8CAA8C;EAC5D;EACA,aAAa,EAAE,iBAAiB,KAAK;CACvC,GACA,OAAO,EACL,UACA,cACA,qBACA,qBACA,UACA,gBACA,2BACI;EACJ,IAAI;GAEF,MAAM,SAAS,OAAM,MADH,OAAO,UAAU,YAAY,EACvB,CAAC,YAAY,mBAAmB;IACtD;IACA;IACA;IACA;IACA;GACF,CAAC;GACD,OAAO,GAAG,MAAM;EAClB,SAAS,OAAO;GACd,OAAO,KAAK,2BAA2B,KAAK;EAC9C;CACF,CACF;AACF"}
1
+ {"version":3,"file":"api.mjs","names":[],"sources":["../../../src/tools/api.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { editor } from '@intlayer/config/built';\nimport { getEditorClientSecret } from '@intlayer/config/secrets';\nimport z from 'zod';\nimport type { McpServer } from './docs';\n\ntype LoadAPITools = (server: McpServer) => void;\n\nconst authSchema = {\n clientId: z\n .string()\n .optional()\n .describe(\n 'Intlayer OAuth2 client ID (access key). Falls back to INTLAYER_CLIENT_ID env var.'\n ),\n clientSecret: z\n .string()\n .optional()\n .describe(\n 'Intlayer OAuth2 client secret. Falls back to INTLAYER_CLIENT_SECRET env var.'\n ),\n};\n\nconst getAPI = async (clientId?: string, clientSecret?: string) => {\n const resolvedClientId = clientId ?? editor.clientId;\n\n const resolvedClientSecret = clientSecret ?? getEditorClientSecret();\n\n if (!resolvedClientId || !resolvedClientSecret) {\n throw new Error(\n 'Intlayer credentials not found. Provide clientId/clientSecret or set INTLAYER_CLIENT_ID/INTLAYER_CLIENT_SECRET.'\n );\n }\n\n const configWithCreds = {\n editor: {\n ...editor,\n clientId: resolvedClientId,\n clientSecret: resolvedClientSecret,\n },\n };\n\n const tempAPI = getIntlayerAPI({}, configWithCreds);\n const tokenResult = await tempAPI.oAuth.getOAuth2AccessToken();\n const token = (tokenResult as any)?.data?.access_token as string | undefined;\n\n if (!token) {\n throw new Error(\n 'Failed to obtain OAuth2 access token. Check your credentials.'\n );\n }\n\n return getIntlayerAPI(\n { headers: { Authorization: `Bearer ${token}` } },\n { editor }\n );\n};\n\nconst ok = (data: unknown) => ({\n content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],\n});\n\nconst fail = (label: string, error: unknown) => ({\n content: [\n {\n type: 'text' as const,\n text: `${label} failed: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true as const,\n});\n\nexport const loadAPITools: LoadAPITools = (server) => {\n // ── Dictionaries ──────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-dictionaries-list',\n {\n title: 'List Dictionaries',\n description:\n 'List all dictionaries for the selected project. Returns keys, IDs, and metadata.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.getDictionaries({\n page,\n pageSize,\n });\n return ok(result);\n } catch (error) {\n return fail('List dictionaries', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-get',\n {\n title: 'Get Dictionary',\n description: 'Get a dictionary by its key, including its full content.',\n inputSchema: {\n ...authSchema,\n dictionaryKey: z.string().describe('The dictionary key'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, dictionaryKey }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.getDictionary(dictionaryKey);\n return ok(result);\n } catch (error) {\n return fail('Get dictionary', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-create',\n {\n title: 'Create Dictionary',\n description: 'Create a new dictionary in the selected project.',\n inputSchema: {\n ...authSchema,\n key: z.string().describe('Unique key for the dictionary'),\n title: z.string().optional().describe('Human-readable title'),\n description: z\n .string()\n .optional()\n .describe('Description of the dictionary'),\n content: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Initial content as JSON object'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, key, title, description, content }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.addDictionary({\n key,\n title,\n description,\n content,\n });\n return ok(result);\n } catch (error) {\n return fail('Create dictionary', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-update',\n {\n title: 'Update Dictionary',\n description: 'Update an existing dictionary content or metadata.',\n inputSchema: {\n ...authSchema,\n id: z.string().describe('Dictionary ID'),\n key: z.string().optional().describe('New key for the dictionary'),\n title: z.string().optional().describe('New title'),\n description: z.string().optional().describe('New description'),\n content: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Updated content as JSON object'),\n },\n annotations: { destructiveHint: true },\n },\n async ({\n clientId,\n clientSecret,\n id,\n key,\n title,\n description,\n content,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.updateDictionary({\n id,\n key,\n title,\n description,\n content,\n });\n return ok(result);\n } catch (error) {\n return fail('Update dictionary', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-dictionary-delete',\n {\n title: 'Delete Dictionary',\n description:\n 'Delete a dictionary by its ID. This action is irreversible.',\n inputSchema: {\n ...authSchema,\n dictionaryId: z.string().describe('Dictionary ID to delete'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, dictionaryId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.dictionary.deleteDictionary(dictionaryId);\n return ok(result);\n } catch (error) {\n return fail('Delete dictionary', error);\n }\n }\n );\n\n // ── Tags ──────────────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-tags-list',\n {\n title: 'List Tags',\n description: 'List all tags for the selected organization.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.getTags({ page, pageSize });\n return ok(result);\n } catch (error) {\n return fail('List tags', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-tag-create',\n {\n title: 'Create Tag',\n description:\n 'Create a new tag in the organization. Tags can be used to group dictionaries and provide AI context.',\n inputSchema: {\n ...authSchema,\n key: z.string().describe('Unique tag key'),\n name: z.string().optional().describe('Display name for the tag'),\n description: z.string().optional().describe('Description of the tag'),\n color: z.string().optional().describe('Tag color (hex code)'),\n instructions: z\n .string()\n .optional()\n .describe('AI instructions to apply when this tag is used'),\n },\n annotations: { destructiveHint: false },\n },\n async ({\n clientId,\n clientSecret,\n key,\n name,\n description,\n color,\n instructions,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.addTag({\n key,\n name,\n description,\n color,\n instructions,\n });\n return ok(result);\n } catch (error) {\n return fail('Create tag', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-tag-update',\n {\n title: 'Update Tag',\n description: 'Update an existing tag.',\n inputSchema: {\n ...authSchema,\n tagId: z.string().describe('Tag ID to update'),\n key: z.string().optional().describe('New key'),\n name: z.string().optional().describe('New display name'),\n description: z.string().optional().describe('New description'),\n color: z.string().optional().describe('New color (hex code)'),\n instructions: z.string().optional().describe('New AI instructions'),\n },\n annotations: { destructiveHint: true },\n },\n async ({\n clientId,\n clientSecret,\n tagId,\n key,\n name,\n description,\n color,\n instructions,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.updateTag(tagId, {\n key,\n name,\n description,\n color,\n instructions,\n });\n return ok(result);\n } catch (error) {\n return fail('Update tag', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-tag-delete',\n {\n title: 'Delete Tag',\n description: 'Delete a tag by its ID.',\n inputSchema: {\n ...authSchema,\n tagId: z.string().describe('Tag ID to delete'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, tagId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.tag.deleteTag(tagId);\n return ok(result);\n } catch (error) {\n return fail('Delete tag', error);\n }\n }\n );\n\n // ── Organizations ─────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-organizations-list',\n {\n title: 'List Organizations',\n description: 'List all organizations the authenticated user belongs to.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.organization.getOrganizations({\n page,\n pageSize,\n });\n return ok(result);\n } catch (error) {\n return fail('List organizations', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-organization-select',\n {\n title: 'Select Organization',\n description:\n 'Select an organization as the current active organization. Required before accessing organization-specific resources.',\n inputSchema: {\n ...authSchema,\n organizationId: z.string().describe('Organization ID to select'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, organizationId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result =\n await api.organization.selectOrganization(organizationId);\n return ok(result);\n } catch (error) {\n return fail('Select organization', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-organization-update',\n {\n title: 'Update Organization',\n description: 'Update the selected organization name or settings.',\n inputSchema: {\n ...authSchema,\n name: z.string().optional().describe('New organization name'),\n customInstructions: z\n .string()\n .optional()\n .describe('Custom AI instructions for this organization'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, name, customInstructions }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.organization.updateOrganization({\n name,\n customInstructions,\n });\n return ok(result);\n } catch (error) {\n return fail('Update organization', error);\n }\n }\n );\n\n // ── Projects ──────────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-cms-projects-list',\n {\n title: 'List CMS Projects',\n description:\n 'List all Intlayer CMS projects for the selected organization. These are server-side projects, not local project directories.',\n inputSchema: {\n ...authSchema,\n page: z.number().optional().describe('Page number (1-based)'),\n pageSize: z.number().optional().describe('Items per page'),\n },\n annotations: { readOnlyHint: true },\n },\n async ({ clientId, clientSecret, page, pageSize }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.getProjects({ page, pageSize });\n return ok(result);\n } catch (error) {\n return fail('List CMS projects', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-project-select',\n {\n title: 'Select CMS Project',\n description:\n 'Select a CMS project as the current active project. Required before accessing project-specific dictionaries.',\n inputSchema: {\n ...authSchema,\n projectId: z.string().describe('Project ID to select'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, projectId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.selectProject(projectId);\n return ok(result);\n } catch (error) {\n return fail('Select CMS project', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-project-create',\n {\n title: 'Create CMS Project',\n description: 'Create a new CMS project in the selected organization.',\n inputSchema: {\n ...authSchema,\n name: z.string().describe('Project name'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.addProject({ name });\n return ok(result);\n } catch (error) {\n return fail('Create CMS project', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-project-update',\n {\n title: 'Update CMS Project',\n description: 'Update the selected CMS project settings.',\n inputSchema: {\n ...authSchema,\n name: z.string().optional().describe('New project name'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.project.updateProject({ name });\n return ok(result);\n } catch (error) {\n return fail('Update CMS project', error);\n }\n }\n );\n\n // ── Environments ──────────────────────────────────────────────────────────\n\n server.registerTool(\n 'intlayer-cms-environment-select',\n {\n title: 'Select CMS Environment',\n description:\n 'Select a CMS environment as the current active environment. Required before accessing environment-specific dictionaries.',\n inputSchema: {\n ...authSchema,\n environmentId: z.string().describe('Environment ID to select'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, environmentId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.selectEnvironment(environmentId);\n return ok(result);\n } catch (error) {\n return fail('Select CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-reset',\n {\n title: 'Reset CMS Environment to Production',\n description:\n 'Reset the current active environment to the default production environment.',\n inputSchema: {\n ...authSchema,\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.resetToProductionEnvironment();\n return ok(result);\n } catch (error) {\n return fail('Reset CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-create',\n {\n title: 'Create CMS Environment',\n description: 'Create a new CMS environment in the selected project.',\n inputSchema: {\n ...authSchema,\n name: z.string().describe('Environment name'),\n },\n annotations: { destructiveHint: false },\n },\n async ({ clientId, clientSecret, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.addEnvironment({ name });\n return ok(result);\n } catch (error) {\n return fail('Create CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-update',\n {\n title: 'Update CMS Environment',\n description: 'Update the selected CMS environment settings.',\n inputSchema: {\n ...authSchema,\n environmentId: z.string().describe('Environment ID to update'),\n name: z.string().optional().describe('New environment name'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, environmentId, name }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.updateEnvironment(environmentId, {\n name,\n });\n return ok(result);\n } catch (error) {\n return fail('Update CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-delete',\n {\n title: 'Delete CMS Environment',\n description: 'Delete a CMS environment by its ID.',\n inputSchema: {\n ...authSchema,\n environmentId: z.string().describe('Environment ID to delete'),\n },\n annotations: { destructiveHint: true },\n },\n async ({ clientId, clientSecret, environmentId }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.deleteEnvironment(environmentId);\n return ok(result);\n } catch (error) {\n return fail('Delete CMS environment', error);\n }\n }\n );\n\n server.registerTool(\n 'intlayer-cms-environment-migrate',\n {\n title: 'Migrate CMS Environment',\n description:\n 'Migrate dictionaries and configuration from one environment to another.',\n inputSchema: {\n ...authSchema,\n sourceEnvironmentId: z.string().describe('Source environment ID'),\n targetEnvironmentId: z.string().describe('Target environment ID'),\n strategy: z\n .enum(['overwrite', 'fill-missing'])\n .describe(\n 'Migration strategy: overwrite existing or only fill missing'\n ),\n migrateContent: z\n .boolean()\n .optional()\n .describe('Whether to migrate content (dictionaries)'),\n migrateConfiguration: z\n .boolean()\n .optional()\n .describe('Whether to migrate environment configuration'),\n },\n annotations: { destructiveHint: true },\n },\n async ({\n clientId,\n clientSecret,\n sourceEnvironmentId,\n targetEnvironmentId,\n strategy,\n migrateContent,\n migrateConfiguration,\n }) => {\n try {\n const api = await getAPI(clientId, clientSecret);\n const result = await api.environment.migrateEnvironment({\n sourceEnvironmentId,\n targetEnvironmentId,\n strategy,\n migrateContent,\n migrateConfiguration,\n });\n return ok(result);\n } catch (error) {\n return fail('Migrate CMS environment', error);\n }\n }\n );\n};\n"],"mappings":";;;;;;AAQA,MAAM,aAAa;CACjB,UAAU,EACP,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,mFACF;CACF,cAAc,EACX,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,8EACF;AACJ;AAEA,MAAM,SAAS,OAAO,UAAmB,iBAA0B;CACjE,MAAM,mBAAmB,YAAY,OAAO;CAE5C,MAAM,uBAAuB,gBAAgB,sBAAsB;CAEnE,IAAI,CAAC,oBAAoB,CAAC,sBACxB,MAAM,IAAI,MACR,iHACF;CAGF,MAAM,kBAA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,KAAK,2BAA2B,KAAK;EAC9C;CACF,CACF;AACF"}
@@ -10,9 +10,10 @@ const loadInstallLSPTool = (server) => {
10
10
  annotations: { destructiveHint: true }
11
11
  }, async ({ projectRoot }) => {
12
12
  try {
13
+ const root = projectRoot ?? process.cwd();
13
14
  return { content: [{
14
15
  type: "text",
15
- text: await installLSP(projectRoot ?? process.cwd())
16
+ text: await installLSP(root)
16
17
  }] };
17
18
  } catch (error) {
18
19
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"installLSP.mjs","names":[],"sources":["../../../src/tools/installLSP.ts"],"sourcesContent":["import { installLSP } from '@intlayer/engine/cli';\nimport z from 'zod';\nimport type { McpServer } from './docs';\n\nexport const loadInstallLSPTool = (server: McpServer): void => {\n server.registerTool(\n 'intlayer-install-lsp',\n {\n title: 'Install Intlayer LSP',\n description:\n 'Configure the Intlayer Language Server in the project. ' +\n 'Writes `intlayer.languageServer.command` and `intlayer.languageServer.args` to `.vscode/settings.json` ' +\n 'so that VS Code, Cursor, and Windsurf automatically start the language server, enabling Go-to-Definition ' +\n 'for `useIntlayer` and `getIntlayer` calls. ' +\n 'Returns next-step instructions for installing the `@intlayer/lsp` binary and, optionally, ' +\n 'registering the Intlayer Claude Code plugin.',\n inputSchema: {\n projectRoot: z\n .string()\n .describe(\n 'Root directory of the project. Defaults to current working directory.'\n )\n .optional(),\n },\n annotations: {\n destructiveHint: true,\n },\n },\n async ({ projectRoot }) => {\n try {\n const root = projectRoot ?? process.cwd();\n const message = await installLSP(root);\n\n return {\n content: [{ type: 'text', text: message }],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Failed to configure LSP: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n }\n );\n};\n"],"mappings":";;;;AAIA,MAAa,sBAAsB,WAA4B;CAC7D,OAAO,aACL,wBACA;EACE,OAAO;EACP,aACE;EAMF,aAAa,EACX,aAAa,EACV,OAAO,CAAC,CACR,SACC,uEACF,CAAC,CACA,SAAS,EACd;EACA,aAAa,EACX,iBAAiB,KACnB;CACF,GACA,OAAO,EAAE,kBAAkB;EACzB,IAAI;GAIF,OAAO,EACL,SAAS,CAAC;IAAE,MAAM;IAAQ,MAAM,MAHZ,WADT,eAAe,QAAQ,IAAI,CACH;GAGK,CAAC,EAC3C;EACF,SAAS,OAAO;GACd,OAAO;IACL,SAAS,CACP;KACE,MAAM;KACN,MAAM,4BAA4B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IACzF,CACF;IACA,SAAS;GACX;EACF;CACF,CACF;AACF"}
1
+ {"version":3,"file":"installLSP.mjs","names":[],"sources":["../../../src/tools/installLSP.ts"],"sourcesContent":["import { installLSP } from '@intlayer/engine/cli';\nimport z from 'zod';\nimport type { McpServer } from './docs';\n\nexport const loadInstallLSPTool = (server: McpServer): void => {\n server.registerTool(\n 'intlayer-install-lsp',\n {\n title: 'Install Intlayer LSP',\n description:\n 'Configure the Intlayer Language Server in the project. ' +\n 'Writes `intlayer.languageServer.command` and `intlayer.languageServer.args` to `.vscode/settings.json` ' +\n 'so that VS Code, Cursor, and Windsurf automatically start the language server, enabling Go-to-Definition ' +\n 'for `useIntlayer` and `getIntlayer` calls. ' +\n 'Returns next-step instructions for installing the `@intlayer/lsp` binary and, optionally, ' +\n 'registering the Intlayer Claude Code plugin.',\n inputSchema: {\n projectRoot: z\n .string()\n .describe(\n 'Root directory of the project. Defaults to current working directory.'\n )\n .optional(),\n },\n annotations: {\n destructiveHint: true,\n },\n },\n async ({ projectRoot }) => {\n try {\n const root = projectRoot ?? process.cwd();\n const message = await installLSP(root);\n\n return {\n content: [{ type: 'text', text: message }],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Failed to configure LSP: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n }\n );\n};\n"],"mappings":";;;;AAIA,MAAa,sBAAsB,WAA4B;CAC7D,OAAO,aACL,wBACA;EACE,OAAO;EACP,aACE;EAMF,aAAa,EACX,aAAa,EACV,OAAO,CAAC,CACR,SACC,uEACF,CAAC,CACA,SAAS,EACd;EACA,aAAa,EACX,iBAAiB,KACnB;CACF,GACA,OAAO,EAAE,kBAAkB;EACzB,IAAI;GACF,MAAM,OAAO,eAAe,QAAQ,IAAI;GAGxC,OAAO,EACL,SAAS,CAAC;IAAE,MAAM;IAAQ,MAAM,MAHZ,WAAW,IAAI;GAGK,CAAC,EAC3C;EACF,SAAS,OAAO;GACd,OAAO;IACL,SAAS,CACP;KACE,MAAM;KACN,MAAM,4BAA4B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IACzF,CACF;IACA,SAAS;GACX;EACF;CACF,CACF;AACF"}
@@ -14,9 +14,10 @@ const loadInstallSkillsTool = (server) => {
14
14
  }
15
15
  }, async ({ platform, skills, projectRoot }) => {
16
16
  try {
17
+ const root = projectRoot || process.cwd();
17
18
  return { content: [{
18
19
  type: "text",
19
- text: await installSkills(projectRoot || process.cwd(), platform, skills)
20
+ text: await installSkills(root, platform, skills)
20
21
  }] };
21
22
  } catch (error) {
22
23
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"installSkills.mjs","names":[],"sources":["../../../src/tools/installSkills.ts"],"sourcesContent":["import * as readline from 'node:readline';\nimport {\n installSkills,\n PLATFORMS,\n SKILLS,\n type Skill,\n} from '@intlayer/engine/cli';\nimport z from 'zod';\nimport type { McpServer } from './docs';\n\nexport const loadInstallSkillsTool = (server: McpServer): void => {\n server.registerTool(\n 'intlayer-install-skills',\n {\n title: 'Install Intlayer Skills',\n description:\n 'Install Intlayer documentation and skills to the project to assist AI agents. Ask the user for the platform (Cursor, VSCode, OpenCode, Claude, etc.) and which skills they want to install before calling this tool.',\n inputSchema: {\n platform: z\n .enum(PLATFORMS)\n .describe('The platform to install skills for'),\n skills: z.array(z.enum(SKILLS)).describe('List of skills to install'),\n projectRoot: z\n .string()\n .optional()\n .describe(\n 'Root directory of the project. Defaults to current directory.'\n ),\n },\n },\n\n async ({ platform, skills, projectRoot }) => {\n try {\n const root = projectRoot || process.cwd();\n const message = await installSkills(root, platform, skills);\n\n return {\n content: [\n {\n type: 'text',\n text: message,\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Failed to install skills: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n }\n );\n};\n\nexport const runInstallSkillsCLI = async (): Promise<void> => {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n\n const question = (query: string): Promise<string> =>\n new Promise((resolve) => rl.question(query, resolve));\n\n try {\n console.log('Install Intlayer Skills');\n console.log('-----------------------');\n\n const platformInput = await question(\n 'Which platform are you using? (Cursor, Windsurf, Trae, OpenCode, GitHub, Claude, VSCode, Cline, RooCode, etc. or \"Other\"): '\n );\n\n // we only accept a single platform here, not an array like the main CLI\n const platform =\n PLATFORMS.find(\n (platform) =>\n platform.toLowerCase() === platformInput.trim().toLowerCase()\n ) || ('Other' as const);\n\n console.log(`Selected platform: ${platform}`);\n\n console.log('\\nAvailable skills:');\n\n SKILLS.forEach((skill, i) => {\n console.log(`${i + 1}. ${skill}`);\n });\n\n const skillsInput = await question(\n '\\nWhich skills do you want to install? (comma separated numbers, e.g. 1,2,3 or \"all\"): '\n );\n\n let selectedSkills: Skill[] = [];\n if (skillsInput.trim().toLowerCase() === 'all') {\n selectedSkills = [...SKILLS];\n } else {\n const indices = skillsInput\n .split(',')\n .map((skill) => parseInt(skill.trim(), 10) - 1)\n .filter(\n (skill) => !Number.isNaN(skill) && skill >= 0 && skill < SKILLS.length\n );\n selectedSkills = indices.map((i) => SKILLS[i] as any);\n }\n\n if (selectedSkills.length === 0) {\n console.log('No valid skills selected. Exiting.');\n rl.close();\n return;\n }\n\n console.log(`Installing skills: ${selectedSkills.join(', ')}...`);\n const result = await installSkills(process.cwd(), platform, selectedSkills);\n console.log(result);\n } catch (error) {\n console.error('Error:', error);\n } finally {\n rl.close();\n }\n};\n"],"mappings":";;;;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K,CAAC,CAAC,YAAY,MAAM,OACvC,iBAAiB,CAAC,GAAG,MAAM;OAQ3B,iBANgB,YACb,MAAM,GAAG,CAAC,CACV,KAAK,UAAU,SAAS,MAAM,KAAK,GAAG,EAAE,IAAI,CAAC,CAAC,CAC9C,QACE,UAAU,CAAC,OAAO,MAAM,KAAK,KAAK,SAAS,KAAK,QAAQ,OAAO,MAE7C,CAAC,CAAC,KAAK,MAAM,OAAO,EAAS;EAGtD,IAAI,eAAe,WAAW,GAAG;GAC/B,QAAQ,IAAI,oCAAoC;GAChD,GAAG,MAAM;GACT;EACF;EAEA,QAAQ,IAAI,sBAAsB,eAAe,KAAK,IAAI,EAAE,IAAI;EAChE,MAAM,SAAS,MAAM,cAAc,QAAQ,IAAI,GAAG,UAAU,cAAc;EAC1E,QAAQ,IAAI,MAAM;CACpB,SAAS,OAAO;EACd,QAAQ,MAAM,UAAU,KAAK;CAC/B,UAAU;EACR,GAAG,MAAM;CACX;AACF"}
1
+ {"version":3,"file":"installSkills.mjs","names":[],"sources":["../../../src/tools/installSkills.ts"],"sourcesContent":["import * as readline from 'node:readline';\nimport {\n installSkills,\n PLATFORMS,\n SKILLS,\n type Skill,\n} from '@intlayer/engine/cli';\nimport z from 'zod';\nimport type { McpServer } from './docs';\n\nexport const loadInstallSkillsTool = (server: McpServer): void => {\n server.registerTool(\n 'intlayer-install-skills',\n {\n title: 'Install Intlayer Skills',\n description:\n 'Install Intlayer documentation and skills to the project to assist AI agents. Ask the user for the platform (Cursor, VSCode, OpenCode, Claude, etc.) and which skills they want to install before calling this tool.',\n inputSchema: {\n platform: z\n .enum(PLATFORMS)\n .describe('The platform to install skills for'),\n skills: z.array(z.enum(SKILLS)).describe('List of skills to install'),\n projectRoot: z\n .string()\n .optional()\n .describe(\n 'Root directory of the project. Defaults to current directory.'\n ),\n },\n },\n\n async ({ platform, skills, projectRoot }) => {\n try {\n const root = projectRoot || process.cwd();\n const message = await installSkills(root, platform, skills);\n\n return {\n content: [\n {\n type: 'text',\n text: message,\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Failed to install skills: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n }\n );\n};\n\nexport const runInstallSkillsCLI = async (): Promise<void> => {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n\n const question = (query: string): Promise<string> =>\n new Promise((resolve) => rl.question(query, resolve));\n\n try {\n console.log('Install Intlayer Skills');\n console.log('-----------------------');\n\n const platformInput = await question(\n 'Which platform are you using? (Cursor, Windsurf, Trae, OpenCode, GitHub, Claude, VSCode, Cline, RooCode, etc. or \"Other\"): '\n );\n\n // we only accept a single platform here, not an array like the main CLI\n const platform =\n PLATFORMS.find(\n (platform) =>\n platform.toLowerCase() === platformInput.trim().toLowerCase()\n ) || ('Other' as const);\n\n console.log(`Selected platform: ${platform}`);\n\n console.log('\\nAvailable skills:');\n\n SKILLS.forEach((skill, i) => {\n console.log(`${i + 1}. ${skill}`);\n });\n\n const skillsInput = await question(\n '\\nWhich skills do you want to install? (comma separated numbers, e.g. 1,2,3 or \"all\"): '\n );\n\n let selectedSkills: Skill[] = [];\n if (skillsInput.trim().toLowerCase() === 'all') {\n selectedSkills = [...SKILLS];\n } else {\n const indices = skillsInput\n .split(',')\n .map((skill) => parseInt(skill.trim(), 10) - 1)\n .filter(\n (skill) => !Number.isNaN(skill) && skill >= 0 && skill < SKILLS.length\n );\n selectedSkills = indices.map((i) => SKILLS[i] as any);\n }\n\n if (selectedSkills.length === 0) {\n console.log('No valid skills selected. Exiting.');\n rl.close();\n return;\n }\n\n console.log(`Installing skills: ${selectedSkills.join(', ')}...`);\n const result = await installSkills(process.cwd(), platform, selectedSkills);\n console.log(result);\n } catch (error) {\n console.error('Error:', error);\n } finally {\n rl.close();\n }\n};\n"],"mappings":";;;;;AAUA,MAAa,yBAAyB,WAA4B;CAChE,OAAO,aACL,2BACA;EACE,OAAO;EACP,aACE;EACF,aAAa;GACX,UA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ANgB,YACb,MAAM,GAAG,CAAC,CACV,KAAK,UAAU,SAAS,MAAM,KAAK,GAAG,EAAE,IAAI,CAAC,CAAC,CAC9C,QACE,UAAU,CAAC,OAAO,MAAM,KAAK,KAAK,SAAS,KAAK,QAAQ,OAAO,MAE7C,CAAC,CAAC,KAAK,MAAM,OAAO,EAAS;EAGtD,IAAI,eAAe,WAAW,GAAG;GAC/B,QAAQ,IAAI,oCAAoC;GAChD,GAAG,MAAM;GACT;EACF;EAEA,QAAQ,IAAI,sBAAsB,eAAe,KAAK,IAAI,EAAE,IAAI;EAChE,MAAM,SAAS,MAAM,cAAc,QAAQ,IAAI,GAAG,UAAU,cAAc;EAC1E,QAAQ,IAAI,MAAM;CACpB,SAAS,OAAO;EACd,QAAQ,MAAM,UAAU,KAAK;CAC/B,UAAU;EACR,GAAG,MAAM;CACX;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","names":[],"sources":["../../../src/tools/api.ts"],"mappings":";;KAKK,gBAAgB,QAAQ;cAiEhB,cAAc"}
1
+ {"version":3,"file":"api.d.ts","names":[],"sources":["../../../src/tools/api.ts"],"mappings":";;KAMK,gBAAgB,QAAQ;cAkEhB,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/mcp",
3
- "version": "9.0.1",
3
+ "version": "9.4.0",
4
4
  "private": false,
5
5
  "description": "Intlayer MCP server. Handle MCP to help IDE to use Intlayer. It build, fill, pull, push, dictionaries",
6
6
  "keywords": [
@@ -111,29 +111,29 @@
111
111
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
112
112
  },
113
113
  "dependencies": {
114
- "@ai-sdk/mcp": "2.0.16",
114
+ "@ai-sdk/mcp": "2.0.35",
115
115
  "@fastify/cors": "11.3.0",
116
- "@fastify/helmet": "13.1.0",
117
- "@intlayer/api": "9.0.1",
118
- "@intlayer/cli": "9.0.1",
119
- "@intlayer/config": "9.0.1",
120
- "@intlayer/docs": "9.0.1",
121
- "@intlayer/engine": "9.0.1",
122
- "@intlayer/types": "9.0.1",
116
+ "@fastify/helmet": "13.1.1",
117
+ "@intlayer/api": "9.4.0",
118
+ "@intlayer/cli": "9.4.0",
119
+ "@intlayer/config": "9.4.0",
120
+ "@intlayer/docs": "9.4.0",
121
+ "@intlayer/engine": "9.4.0",
122
+ "@intlayer/types": "9.4.0",
123
123
  "dotenv": "17.4.2",
124
- "fastify": "5.10.0",
124
+ "fastify": "5.12.1",
125
125
  "zod": "4.4.3"
126
126
  },
127
127
  "devDependencies": {
128
- "@intlayer/types": "9.0.1",
129
- "@types/node": "26.1.1",
128
+ "@intlayer/types": "9.4.0",
129
+ "@types/node": "26.3.0",
130
130
  "@utils/ts-config": "1.0.4",
131
131
  "@utils/ts-config-types": "1.0.4",
132
132
  "@utils/tsdown-config": "1.0.4",
133
133
  "rimraf": "6.1.3",
134
- "tsdown": "0.22.13",
134
+ "tsdown": "0.22.14",
135
135
  "typescript": "7.0.2",
136
- "vitest": "4.1.10"
136
+ "vitest": "4.1.11"
137
137
  },
138
138
  "engines": {
139
139
  "node": ">=14.18"