Skip to main content
Glama

Elementor MCP Server

by aguaitech
test-update-page.js898 B
// Test script to get a specific page by slug // import 'dotenv/config'; // Don't use this if calling config() manually const dotenv = require("dotenv"); // Import the dotenv object const path = require("path"); // Import path using require // No need for fileURLToPath in CommonJS const { initializeApiClient } = require("../src/auth"); // Use require, no .js const { updatePage } = require("../src/wp-api"); // Use require, no .js const fs = require("fs"); dotenv.config({ path: path.resolve(__dirname, ".test.env") }); const TARGET_PAGE_ID = process.env.TARGET_ID; const ELEMENTOR_DATA = JSON.parse( fs.readFileSync(path.resolve(__dirname, `${TARGET_FILE}`), "utf8") ).meta._elementor_data; async function runTest() { await initializeApiClient(); const updatedPage = await updatePage(TARGET_PAGE_ID, { elementor_data: ELEMENTOR_DATA, }); console.log(updatedPage); } runTest();

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aguaitech/Elementor-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server