Skip to main content
Glama
agentpages-mcp

agentpages-mcp

agentack-mcp

A small MCP server that lets an AI assistant publish a static website through the AgenTack API.

AgenTack is the service: it stores and serves static sites behind an HTTP API (POST /v1/sites). This repository is only a client for it. It gives an MCP client (Claude Code, Claude Desktop, Gemini CLI, ...) two tools: create_website, which sends the model's files to AgenTack and returns the public URL, and account_status, which shows the key's limits and usage.

  • Transports: stdio (default; runs on the user's machine with their key in the environment) and Streamable HTTP (--http; a hosted server where each caller sends their own key as an Authorization: Bearer header, or signs in with an email magic link over OAuth). See Hosted mode.

  • Two tools:

    • create_website(files), where each file is {path, content, encoding} and encoding is "utf8" (default) or "base64".

    • account_status(), no arguments: the key's kind (trial, kept or standard), sites and updates used of its limits, upload limits and rules, and how to have trial limits lifted, all from AgenTack's GET /v1/account. Its description tells the model to call it before publishing when unsure, and after a trial_limit or site_limit_reached error, instead of guessing. Example answer:

      Kept free key: 3 of 3 sites used, 4 of 10 updates used.
      Upload limits: at most 20 files per site, 512 KiB per file, 2 MiB per site.
      Trial rules apply (no scripts; allowed file types: css, html, ...).
      This key has the free-trial limits. To have them lifted, email help@example.com.
  • The tool description tells the model the AgenTack limits and sandbox rules, so it writes a valid site on the first try.

  • No client-side validation beyond "files is a non-empty list": AgenTack is the single source of truth. Its errors come back to the model as <code>: <message> tool errors (for example index_missing: ...), so the model can fix the files and retry.

Quick start (hosted, nothing to install)

In claude.ai, ChatGPT or the Gemini app: add https://mcp.agentack.site/mcp as a custom connector and sign in with your email when asked. See Connecting from chat apps.

In Claude Code, Gemini CLI, Cursor or VS Code, with a key:

  1. Get an AgenTack API key: a free trial key on agentpages-sites.amir-zare.com, or a permanent one from the operator.

  2. Add the hosted server to your client by URL, https://mcp.agentack.site/mcp, with your key as a Bearer header. Claude Code:

    claude mcp add --transport http agentack https://mcp.agentack.site/mcp --header "Authorization: Bearer your-key"

    Gemini CLI, Cursor and VS Code each use a different config format: see Connecting to a hosted server.

  3. Ask: "Create a one-page website for a coffee shop and publish it."

Related MCP server: webserver-mcp

Install and run

Requires Python 3.12 and uv.

Run it without cloning (what the client configs below use):

uvx --from git+https://github.com/mrprogrammingx/agentack-mcp agentack-mcp --help

Or clone it to develop:

git clone https://github.com/mrprogrammingx/agentack-mcp.git
cd agentack-mcp
uv sync

Configuration is read from the environment only:

Variable

Example

Notes

AGENTACK_API_URL

http://localhost:8000

Base URL, no trailing slash

AGENTACK_API_KEY

ap_...

Bearer key

If either is missing, the tool returns a clear error (the server still starts). The key is never logged or returned.

Run the server (it speaks MCP over stdin/stdout, so you normally let your MCP client start it):

AGENTACK_API_URL=http://localhost:8000 AGENTACK_API_KEY=... uv run agentack-mcp

Run the tests (no network needed; the API is mocked with respx):

uv run pytest -q

A local AgenTack to try it against

In a checkout of the agentack repo:

docker compose up -d
docker compose exec -T api agentack create-key --name mcp

Client configuration

These run the server locally over stdio, with your key in its environment. Replace the URL and key with your own. To run a checkout instead of the published code, replace uvx --from git+https://github.com/mrprogrammingx/agentack-mcp agentack-mcp with uv run --directory /path/to/agentack-mcp agentack-mcp.

Claude Code

claude mcp add agentack -e AGENTACK_API_URL=http://localhost:8000 -e AGENTACK_API_KEY=your-key -- uvx --from git+https://github.com/mrprogrammingx/agentack-mcp agentack-mcp

Claude Desktop

In claude_desktop_config.json (Settings > Developer > Edit Config):

{
  "mcpServers": {
    "agentack": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/mrprogrammingx/agentack-mcp", "agentack-mcp"],
      "env": {
        "AGENTACK_API_URL": "http://localhost:8000",
        "AGENTACK_API_KEY": "your-key"
      }
    }
  }
}

Claude Desktop may not see your shell's PATH; if uvx is not found, use its absolute path (which uvx) as command.

Gemini CLI

In ~/.gemini/settings.json (or .gemini/settings.json in a project):

{
  "mcpServers": {
    "agentack": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/mrprogrammingx/agentack-mcp", "agentack-mcp"],
      "env": {
        "AGENTACK_API_URL": "http://localhost:8000",
        "AGENTACK_API_KEY": "your-key"
      }
    }
  }
}

Hosted mode (HTTP)

agentack-mcp --http serves MCP over Streamable HTTP at /mcp (stateless, JSON responses) and a health check at /healthz. It is meant to run next to AgenTack, so users can add it by URL instead of installing anything.

  • Each caller's own key. The tool reads the key from the request's Authorization: Bearer <AgenTack key> header and forwards it to the API. The server has no key of its own: it refuses to start in --http mode if AGENTACK_API_KEY is set, so nobody can ever publish with a shared key.

  • Or OAuth sign-in (optional, see OAuth vs raw key): with the OAuth settings, the server is also an OAuth authorization server, and chat apps connect by URL. Their users sign in with an email magic link and publish with their own key.

  • Without OAuth settings, listing tools works without a key, and calling a tool without one returns unauthorized: ... as a tool error. With OAuth on, every request to /mcp needs a Bearer, listing tools included: an OAuth access token or a raw key. Without one the answer is 401 with WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource/mcp", which is how chat apps find out they should start the OAuth flow.

  • MCP_ALLOWED_HOSTS (comma-separated) limits the accepted Host headers, for example to the public hostname. Other hosts get 421.

  • Request bodies up to 6 MiB are accepted; the API enforces its own 5 MiB limit.

  • Keys are never logged or returned.

Run it locally:

AGENTACK_API_URL=http://localhost:8000 uv run agentack-mcp --http --port 8080

Deploying with Docker next to AgenTack (Cloudflare Tunnel, no host ports): docs/DEPLOY.md.

Connecting to a hosted server

The public server is https://mcp.agentack.site/mcp. For your own deployment, use its URL instead. Replace your-key with your AgenTack API key.

Each client names the URL field differently, so copy the snippet for your client: a Gemini CLI config pasted into Cursor, for example, does not connect.

Client

Where

URL field

Claude Code

claude mcp add

--transport http + URL

Gemini CLI

~/.gemini/settings.json

httpUrl

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project)

url

VS Code

.vscode/mcp.json

servers with "type": "http" and url

Claude Code:

claude mcp add --transport http agentack https://mcp.agentack.site/mcp --header "Authorization: Bearer your-key"

Gemini CLI (~/.gemini/settings.json). ${AGENTACK_API_KEY} is read from your environment:

{
  "mcpServers": {
    "agentack": {
      "httpUrl": "https://mcp.agentack.site/mcp",
      "headers": { "Authorization": "Bearer ${AGENTACK_API_KEY}" }
    }
  }
}

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "agentack": {
      "url": "https://mcp.agentack.site/mcp",
      "headers": { "Authorization": "Bearer your-key" }
    }
  }
}

VS Code (.vscode/mcp.json). VS Code asks for the key once and stores it, so it is never written in the file:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "agentack-key",
      "description": "AgenTack API key",
      "password": true
    }
  ],
  "servers": {
    "agentack": {
      "type": "http",
      "url": "https://mcp.agentack.site/mcp",
      "headers": { "Authorization": "Bearer ${input:agentack-key}" }
    }
  }
}

Connecting from chat apps (OAuth sign-in)

claude.ai, ChatGPT and the Gemini app can't send a header: they connect by URL and sign you in. Use the URL https://mcp.agentack.site/mcp (or your own deployment's). The menus move from time to time; look for "custom connector" or "MCP server".

  • claude.ai (also Claude Desktop and mobile, which share the connectors): Settings → Connectors → Add custom connector. Name AgenTack, URL as above, no client ID or secret. Then Connect.

  • ChatGPT: Settings → Apps & Connectors → Advanced settings → turn on Developer mode, then Create a connector with the URL as above and authentication OAuth. Pick it in a chat from the tools menu.

  • The Gemini app: where your plan lets you add a remote MCP server by URL, add the URL as above with OAuth sign-in.

The app opens a sign-in page: " will publish websites with your AgenTack account", and an email field. You get an email "Sign in to AgenTack" with a link that works once, for 15 minutes, in the same browser. Open it, choose Sign in, and a "You're signed in" page shows your key's limits (for example "This key can publish up to 3 sites (trial rules apply)"), then continues to the app after 3 seconds, or at once with Continue. There is no password. Keys made by sign-in start with the free-trial limits; ask the assistant for your account status to see them, and how to have them lifted.

Your account is your email: the first sign-in creates an AgenTack key for it (a kept key: it never expires but has the free-trial limits; ask the operator to lift them). If the email already kept a trial site ("Keep it" on AgenTack), signing in links those sites to the account. Each later sign-in from another app reuses the same key.

OAuth vs raw key

OAuth sign-in

Raw key (Authorization: Bearer ap_…)

Clients

claude.ai, ChatGPT, the Gemini app, MCP Inspector, any client with MCP OAuth

Claude Code, Gemini CLI, Cursor, VS Code, scripts

What you hold

Nothing: the app holds a 1-hour access token and a 30-day refresh token

The key, in the client's config

Key

One kept key per email, created and stored (encrypted) by the server

Any key you have: trial, kept or standard

Revoking

Disconnect in the app (or /revoke); the operator can delete the account

Revoke the key in AgenTack

Both work against the same URL at once: a Bearer starting with ap_ is a raw key, passed to AgenTack as before; anything else must be an access token this server issued.

How the OAuth server works

  • Endpoints: /.well-known/oauth-authorization-server, /.well-known/oauth-protected-resource/mcp (and the same document at /.well-known/oauth-protected-resource), /register (dynamic client registration), /authorize, /token, /revoke. Issuer: MCP_PUBLIC_URL; resource: MCP_PUBLIC_URL/mcp.

  • Authorization code with PKCE (S256 only). Codes last 5 minutes and work once (a replayed code revokes what it issued). Access tokens are opaque and last 1 hour; refresh tokens last 30 days and rotate on every use, and presenting a used one revokes the whole chain. Only SHA-256 hashes of codes and tokens are stored.

  • Registration: redirect URIs must be https, or http on localhost/127.0.0.1; at most 10 registrations per IP per hour. /authorize needs an exact redirect-URI match.

  • Sign-in: always the same "Check your email" page (it never tells whether an account exists); 3 links per email and 10 per IP per hour. The link page only shows a button (mail scanners open links); the POST uses it up. Pages have no scripts, a strict CSP, a CSRF token on every form, Cache-Control: no-store and Referrer-Policy: no-referrer.

  • The server gets an account's key from AgenTack's internal endpoint (on the Docker network only, with a shared secret) and stores it encrypted (AES-GCM) in SQLite; later sign-ins reuse it. Emails are personal data: never logged, stored only as an HMAC once a link is used, and agentack-mcp delete-account EMAIL deletes an account.

Variable

Example

Notes

MCP_PUBLIC_URL

https://agentack-mcp.example.com

Issuer and base of the sign-in links. https, no path.

MCP_DB_PATH

/data/agentack-mcp.db

SQLite file (default shown).

MCP_ENCRYPTION_KEY

32 random bytes, base64

Encrypts stored keys. Secret.

RESEND_API_KEY

re_…

Sends the email through Resend's HTTP API. Secret.

MAIL_FROM

AgenTack <noreply@example.com>

On a domain verified in Resend.

AGENTACK_INTERNAL_URL

http://api:8002

AgenTack's internal key endpoint (default shown).

AGENTACK_INTERNAL_SECRET

The same value as AGENTACK_INTERNAL_SECRET in the AgenTack app. Secret.

MCP_CLIENT_IP_HEADER

CF-Connecting-IP

Client IP for rate limits, behind a proxy. Empty: the TCP peer.

MCP_MAIL_BACKEND

resend

console prints links instead (only for a localhost MCP_PUBLIC_URL).

OAuth is on only when MCP_PUBLIC_URL, MCP_ENCRYPTION_KEY, MAIL_FROM, AGENTACK_INTERNAL_SECRET and (for Resend) RESEND_API_KEY are all set. Otherwise HTTP mode starts with raw-key auth only and says so in the log. Setup, Resend domain verification and a local test with the MCP Inspector: docs/DEPLOY.md.

Example prompt

Create a one-page website for a coffee shop and publish it.

The assistant writes index.html (and any CSS, JS or images), calls create_website, and answers with the URL, for example:

Published: http://localhost:8001/s/k3j9x2/
id: ...
slug: k3j9x2
version: 1

AgenTack rules the tool description passes on

  • index.html is required at the root.

  • Allowed extensions: html, css, js, svg, png, jpg, jpeg, webp, ico, txt, json.

  • At most 100 files per site, 1 MiB per file after decoding, 5 MiB per request, 10 sites per key. These are the standard limits; a trial or kept key has lower ones, which account_status reports (nothing here hard-codes them).

  • Sites run in a sandbox with an opaque origin: only classic <script src> works; no ES modules, no fetching the site's own files, no localStorage, no cookies, and no external network resources.

Out of scope (for now)

  • Update, delete and list-sites tools.

  • Sign-in with Google or a password, and a web dashboard login (sign-in is an email magic link only).

  • Instagram import.

Note on the MCP SDK

This uses the official mcp Python SDK 2.x, where FastMCP was renamed MCPServer (from mcp.server.mcpserver import MCPServer). It is the same decorator-based API.

License

MIT

Available Tools

1 tool
create_websiteA

Publish a static website on AgentPages and return its public URL.

Pass every file of the site in files. Each file has a path (relative, e.g. "index.html" or "css/style.css"), its content, and an encoding: "utf8" for text files (the default) or "base64" for binary files such as images.

Limits (the API rejects anything else):

  • index.html is required at the root.

  • Allowed extensions: html, css, js, svg, png, jpg, jpeg, webp, ico, txt, json.

  • At most 100 files per site, 1 MiB per file after decoding, 5 MiB per request.

  • At most 10 sites per API key.

Sandbox rules (sites are served in a sandbox with an opaque origin):

  • Only classic <script src="..."> works. No ES modules (type="module", import).

  • No fetch/XHR of the site's own files: inline any data in a JS file or the HTML.

  • No localStorage, sessionStorage or cookies.

  • No external network resources: no CDNs, web fonts, remote images or APIs. Ship everything as files in the site, or inline it.

On an error the tool returns ": " from the API (for example index_missing, path_invalid, payload_too_large, validation_error). Fix the files and call the tool again.

Inputs: files (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool there is no possible overlap or misselection; the tool's purpose (publish a static site) is unmistakable from its name and description.

    Naming Consistency5/5

    The single name `create_website` follows a clean verb_noun snake_case convention, so there is no inconsistency to speak of.

    Tool Count3/5

    The surface is a single tool for a domain (hosted site management) that the description itself implies has more state, e.g. a 10-site-per-key quota. It is thin rather than wrong, and the one tool is heavyweight enough to justify its place.

    Completeness2/5

    Only create/publish is exposed: there is no list_sites, get_site, update/redeploy, or delete_site, so an agent that hits the 10-site limit or needs to fix a published site has no path forward. Coverage of the site lifecycle is significantly incomplete.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers