BEST-SOLUTION.mdā¢2.24 kB
# Sitecore API Status - Your Instance
## š Detected Situation
Your Sitecore instance has:
- ā **GraphQL** - Not available (404) - Sitecore version too old
- ā **Item Web API** - Not available (403) - Not activated
- ā **SSC API** - Status unknown
- ā
**SPE** - Installed and working (PowerShell ISE accessible)
## ā
BEST SOLUTION: SPE with Alternative Method
Since SPE is installed and the ISE interface works, we can use an **alternative SPE method**:
### Method: PowerShell ISE Automation
Instead of the RESTful v2 API (which doesn't work), we can:
1. Create a **saved script** in Sitecore via SPE ISE
2. Call this script via the **RESTful v2 API**
3. Or: create a **custom HTTP handler**
### Quick Win: Create one base script
In Sitecore PowerShell ISE (`/sitecore/system/Modules/PowerShell/Script Library`):
**Script name:** `ExecuteCommand`
**Script path:** `/sitecore/system/Modules/PowerShell/Script Library/MCP/ExecuteCommand`
```powershell
param(
[string]$Command,
[string]$Path = "/sitecore/content",
[string]$Database = "master",
[string]$Language = "en"
)
# Execute the command
$result = Invoke-Expression $Command
# Return as JSON
$result | ConvertTo-Json -Depth 10 -Compress
```
Then the MCP server can call this:
```
POST https://your-sitecore-instance.com/-/script/v2/master/MCP/ExecuteCommand?command=Get-Item+-Path+'/sitecore/content'
```
## šÆ Alternative: Simple PowerShell Wrapper
Or I can create a **very simple solution**:
- MCP server calls PowerShell **locally**
- PowerShell connects to Sitecore via SPE Remoting PowerShell module
- This works **without API**!
**Advantages:**
- ā
No API configuration needed
- ā
Uses SPE Remoting PowerShell cmdlets
- ā
Full PowerShell power available
**Disadvantages:**
- ā ļø Requires SPE Remoting PowerShell module installed locally
- ā ļø MCP server must run locally (not remote)
## š” What do you want?
**Option A:** I create saved scripts in SPE and adjust the MCP ā Simplest, works immediately
**Option B:** I use local PowerShell + SPE Remoting module ā Most flexibility
**Option C:** We upgrade Sitecore to 10.1+ for GraphQL ā Best long-term
Let me know! I would recommend **Option A** for now. š