Zuar Portal Blocks MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Zuar Portal Blocks MCP ServerCreate an HTML block that displays a bar chart of monthly sales"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zuar Portal Blocks — MCP Server
An MCP server that lets Claude build and manage Zuar Portal (zPortal) HTML blocks for you. Claude can discover your datasources, preview real data, and create / update / delete HTML blocks through the Portal REST API — with bundled authoring guidance so the blocks it produces follow zPortal conventions.
⬇️ Quick install (Claude Desktop): download
zuar-portal-mcp.mcpbfrom the latest release and double-click it, or drag it onto Claude Desktop. You'll be asked for three portal values (below) and that's it — no terminal, no config files.
Only HTML blocks are created or modified. Other block types are visible via list_blocks, but this server will never create or change them.
Contents
Related MCP server: AutoWP MCP Server
What Claude can do with it
Tools
Tool | What it does |
| List blocks on the portal (optionally by ID, or names only). |
| Fetch one block by UUID, including its HTML/CSS and query config. |
| Create an HTML block (full payload: name, data, css, json_data, tags, access). |
| Update an HTML block — only the fields you pass are sent. |
| Delete a block by UUID. |
| Find the |
| List saved queries (Portal 1.18+). |
| Preview a few rows so blocks get wired to real column names. |
Resources — authoring guidance Claude reads before building, so blocks follow zPortal conventions even if you've never set up a zPortal skill:
zportal://guide/block-structure— the two-field HTML/CSS structure and theme variableszportal://guide/currentblock— reading query data inside a block and reacting to filterszportal://guide/amcharts-loader— the amCharts 5 two-block loader pattern
Prompt — create_zportal_block: a guided "discover data → build → create" workflow you can invoke from your MCP client.
Requirements
A Zuar Portal you can reach over HTTPS, with an account that has permission to manage blocks (admin recommended).
Claude Desktop (for the one-click
.mcpb) — Node.js ships with it, so there's nothing else to install.For the developer /
npxpath instead: Node.js 18+.
Getting your portal credentials
You need three values. All three are entered once, during install.
1. Portal URL
The base URL of your portal, with no trailing path — for example:
https://your-portal.zuarbase.net2. Portal API Key
Sign in to your portal as an admin.
Go to Admin → Auth → API Keys.
Create a new API key (or copy an existing one).
Copy the key string.
The API key inherits the permissions of the user it's associated with, so make sure that user can create, edit, and delete blocks.
3. Portal User ID
Go to Admin → Users.
Click your user.
Copy the UUID from the page URL (the long
xxxxxxxx-xxxx-...segment).
Keep the API Key and User ID private. In the Claude Desktop bundle they're stored as sensitive fields (masked and stored securely). They never leave the machine running the server.
Install — Claude Desktop (one-click bundle)
Download
zuar-portal-mcp.mcpbfrom the latest release.Double-click the file, or drag it onto the Claude Desktop window. An install dialog appears.
Fill in the three fields when prompted:
Portal URL — e.g.
https://your-portal.zuarbase.netPortal API Key — from Admin → Auth → API Keys
Portal User ID — your user UUID
Confirm. The tools, resources, and prompt are now available to Claude.
To update later, download the newer .mcpb from the releases page and install it over the old one.
Install — Claude Code & other MCP clients
This server speaks MCP over stdio, so any MCP-capable client can use it. Provide the three values as environment variables.
From a local clone (works today)
git clone https://github.com/patrickdeanfox/zuar-portal-mcp.git
cd zuar-portal-mcp
npm install
npm run build # compiles TypeScript -> dist/Then register it in your client's MCP config (e.g. claude_desktop_config.json, or .mcp.json for Claude Code):
{
"mcpServers": {
"zuar-portal-blocks": {
"command": "node",
"args": ["/absolute/path/to/zuar-portal-mcp/dist/index.js"],
"env": {
"PORTAL_URL": "https://your-portal.zuarbase.net",
"PORTAL_API_KEY": "your-portal-api-key",
"PORTAL_USER_ID": "your-portal-user-uuid"
}
}
}
}Via npx (once published to npm)
{
"mcpServers": {
"zuar-portal-blocks": {
"command": "npx",
"args": ["-y", "zuar-portal-mcp-server"],
"env": {
"PORTAL_URL": "https://your-portal.zuarbase.net",
"PORTAL_API_KEY": "your-portal-api-key",
"PORTAL_USER_ID": "your-portal-user-uuid"
}
}
}
}Getting started
Once installed, just talk to Claude. A good first session looks like this:
Confirm the connection
"List the datasources on my portal."
Claude calls
list_datasourcesand shows what's available. If you get a credentials error, re-check the three values (see Troubleshooting).Look at real data
"Show me a few sample rows from the Sales datasource."
Claude calls
fetch_sample_rowsso it can see the actual column names before building anything.Create a block
"Create an HTML stat-card block called 'Total Orders' that shows the order count from the Sales datasource."
Claude reads the
zportal://guide/*resources, builds the two-field block, and callscreate_block. It reports the new block's UUID.Iterate
"Make the number bigger and use the portal's primary color." "Now turn it into a bar chart of orders by state."
Claude calls
update_block. For charts it follows the amCharts loader pattern from the bundled guidance.
Tip: invoke the create_zportal_block prompt for a structured, end-to-end flow — give it a goal (and optionally a datasource name) and it walks discovery → build → create for you.
After Claude creates a block, add it to a page in the zPortal page editor as usual. (This server manages blocks, not page layout.)
How it works
On first request the server logs in to your portal (
GET /auth/login?api_key=…&user_id=…) to get a JWT session cookie, and also sends the API key as anX-Api-Keyheader on every call.If the session expires, it re-logs in automatically and retries once.
Block reads/writes go through the Portal REST API under
/api/blocks,/api/datasources, and/api/queries.create_blockandupdate_blockalways settype: "html"and reject any other type before contacting the portal.
Troubleshooting
Symptom | Likely cause / fix |
"Missing portal credentials: …" | One of |
"Portal login failed: HTTP 401/403" | Wrong API key or user ID, or the user lacks permission. Regenerate the key and confirm the user can manage blocks. |
| Your portal predates the saved-queries API. Use |
Tools don't appear in Claude | Reinstall the |
Want to see what it's doing | Set |
Development
npm install
npm run build # tsc -> dist/
PORTAL_DEBUG=1 npm start # run locally on stdio (debug logs to stderr)
# Interactive testing with the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsProject layout:
src/
index.ts # stdio entrypoint
server.ts # tools, resources, prompts
portalClient.ts # auth + request (login, X-Api-Key, 401 retry)
config.ts # credential resolution (env, then config.json)
guidance.ts # bundled authoring guidance (the zportal://guide resources)
manifest.json # MCPB bundle manifest (Claude Desktop install + config prompts)For local development you can also drop a config.json next to the project with a portal section instead of using env vars:
{ "portal": { "url": "https://your-portal.zuarbase.net", "apiKey": "…", "userId": "…" } }config.json is gitignored — never commit it.
Building the .mcpb bundle
npm install -g @anthropic-ai/mcpb # or use: npx @anthropic-ai/mcpb <cmd>
npm install
npm run build
npm prune --omit=dev # production node_modules only
mcpb validate manifest.json
mcpb pack # -> zuar-portal-mcp.mcpb.mcpbignore excludes src/, dev files, and any local config.json from the bundle. Attach the resulting .mcpb to a GitHub Release so non-developers can one-click install it.
Security
Credentials are never logged. Debug output (gated by
PORTAL_DEBUG=1) goes to stderr only, so it never corrupts the MCP stdio stream.The API Key and User ID are declared sensitive in the bundle manifest — masked in the UI and stored securely by Claude Desktop.
The server talks only to the Portal URL you configure.
create_block/update_blockare restricted totype: "html"and reject other types before any portal call.
License
MIT. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/patrickdeanfox/zuar-portal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server