@antonytm/mcp-sitecore-server 0.7.0 → 0.8.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
@@ -73,9 +73,16 @@
73
73
  - [x] `provider-get-item-by-path`: returns an item by path
74
74
  - [x] `provider-get-item-by-query`: returns an item by query
75
75
  - [x] `provider-get-item-by-path`: returns an item by path
76
+ - [x] Indexing
77
+ - [x] `indexing-initialize-search-index`: initializes one or more search indexes
78
+ - [x] `indexing-get-search-index`: returns a search index
76
79
 
77
80
  - [ ] Sitecore CLI
78
81
 
82
+ ### Tools selection
83
+
84
+ AI Agents may have limit on the amount of tools they can use. Please make sure that you have disabled the tools you don't need. It will make your agent faster, cheaper and more efficient.
85
+
79
86
  ## Installation
80
87
 
81
88
  Add the following Model Context Protocol server to your Cursor, VS Code, Claud:
@@ -129,3 +136,7 @@ Add the following Model Context Protocol server to your Cursor, VS Code, Claud:
129
136
  2. Run `npm install` to install dependencies
130
137
  3. Run `npm run build` to build the project
131
138
  4. Run `npm start` to start the server
139
+
140
+ ## Contributing
141
+
142
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details.
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function registerGetSearchIndexPowerShell(server: McpServer, config: Config): void;
@@ -0,0 +1,28 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic.js";
4
+ export function registerGetSearchIndexPowerShell(server, config) {
5
+ server.tool("indexing-get-search-index", "Get information about Sitecore search indexes. Can filter by name, database, running status, or corrupted status.", {
6
+ name: z.string().optional().describe("The name of the index to retrieve information for. Supports wildcards."),
7
+ database: z.string().optional().describe("Filter indices by database name."),
8
+ running: z.boolean().optional().describe("Filter to show only running indices."),
9
+ corrupted: z.boolean().optional().describe("Filter to show only corrupted indices."),
10
+ }, async (params) => {
11
+ const command = `Get-SearchIndex`;
12
+ const options = {};
13
+ if (params.name) {
14
+ options["Name"] = params.name;
15
+ }
16
+ if (params.database) {
17
+ options["Database"] = params.database;
18
+ }
19
+ if (params.running === true) {
20
+ options["Running"] = "";
21
+ }
22
+ if (params.corrupted === true) {
23
+ options["Corrupted"] = "";
24
+ }
25
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
26
+ });
27
+ }
28
+ //# sourceMappingURL=register-get-search-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-get-search-index.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/indexing/register-get-search-index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,gCAAgC,CAAC,MAAiB,EAAE,MAAc;IAC9E,MAAM,CAAC,IAAI,CACP,2BAA2B,EAC3B,mHAAmH,EACnH;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;QAC9G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QAC5E,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QAChF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;KACvF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,iBAAiB,CAAC;QAClC,MAAM,OAAO,GAAwB,EAAE,CAAC;QAExC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;QAClC,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YAC1B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QAC5B,CAAC;QAED,IAAI,MAAM,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;YAC5B,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function registerIndexingPowerShell(server: McpServer, config: Config): void;
@@ -0,0 +1,7 @@
1
+ import { registerInitializeSearchIndexPowerShell } from "./register-initialize-search-index.js";
2
+ import { registerGetSearchIndexPowerShell } from "./register-get-search-index.js";
3
+ export function registerIndexingPowerShell(server, config) {
4
+ registerInitializeSearchIndexPowerShell(server, config);
5
+ registerGetSearchIndexPowerShell(server, config);
6
+ }
7
+ //# sourceMappingURL=register-indexing-powershell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-indexing-powershell.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/indexing/register-indexing-powershell.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uCAAuC,EAAE,MAAM,uCAAuC,CAAC;AAChG,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAElF,MAAM,UAAU,0BAA0B,CAAC,MAAiB,EAAE,MAAc;IACxE,uCAAuC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxD,gCAAgC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function registerInitializeSearchIndexPowerShell(server: McpServer, config: Config): void;
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic.js";
4
+ export function registerInitializeSearchIndexPowerShell(server, config) {
5
+ server.tool("indexing-initialize-search-index", "Initialize one or more Sitecore search indexes. If no name is provided, all indexes will be initialized.", {
6
+ name: z.string().optional().describe("The name of the index to initialize. If not provided, all indexes will be initialized."),
7
+ includeRemoteIndex: z.boolean().optional().describe("Includes remote indexes in the initialization."),
8
+ asJob: z.boolean().optional().describe("Run the command as a job."),
9
+ }, async (params) => {
10
+ const command = `Initialize-SearchIndex`;
11
+ const options = {};
12
+ if (params.name) {
13
+ options["Name"] = params.name;
14
+ }
15
+ if (params.includeRemoteIndex === true) {
16
+ options["IncludeRemoteIndex"] = "";
17
+ }
18
+ if (params.asJob === true) {
19
+ options["AsJob"] = "";
20
+ }
21
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
22
+ });
23
+ }
24
+ //# sourceMappingURL=register-initialize-search-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-initialize-search-index.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/indexing/register-initialize-search-index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,uCAAuC,CAAC,MAAiB,EAAE,MAAc;IACrF,MAAM,CAAC,IAAI,CACP,kCAAkC,EAClC,0GAA0G,EAC1G;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wFAAwF,CAAC;QAC9H,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;QACrG,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;KACtE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,wBAAwB,CAAC;QACzC,MAAM,OAAO,GAAwB,EAAE,CAAC;QAExC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;QAClC,CAAC;QAED,IAAI,MAAM,CAAC,kBAAkB,KAAK,IAAI,EAAE,CAAC;YACrC,OAAO,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC;QACvC,CAAC;QAED,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACxB,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { registerSecurityPowerShell } from "./security/register-security-powershell.js";
2
2
  import { registerProviderPowerShell } from "./provider/register-provider-powershell.js";
3
+ import { registerIndexingPowerShell } from "./indexing/register-indexing-powershell.js";
3
4
  export function registerSimplePowerShell(server, config) {
4
5
  registerSecurityPowerShell(server, config);
5
6
  registerProviderPowerShell(server, config);
7
+ registerIndexingPowerShell(server, config);
6
8
  }
7
9
  //# sourceMappingURL=register-simple-powershell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-simple-powershell.js","sourceRoot":"","sources":["../../../../src/tools/powershell/simple/register-simple-powershell.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,MAAc;IACtE,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC"}
1
+ {"version":3,"file":"register-simple-powershell.js","sourceRoot":"","sources":["../../../../src/tools/powershell/simple/register-simple-powershell.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,MAAc;IACtE,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antonytm/mcp-sitecore-server",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "A Model Context Protocol server for Sitecore",
5
5
  "files": [
6
6
  "dist",