MCP reference

The MCP endpoint, OAuth and API-key sign-in, agent-started sign-up, and the 26 default tools, for developers and agents.

7 min read

SecondPage connects agents over MCP. There is no separate customer-facing REST publishing setup. To set up an agent app step by step, see Connect your agent.

Preferred path

Connect to:

https://mcp.secondpage.cc/mcp

This is a Model Context Protocol (MCP) Streamable HTTP endpoint. It is stateless: there is no session ID, so each request carries its own authentication. An unauthenticated request gets a 401 response with a WWW-Authenticate header pointing to OAuth discovery. Use OAuth when the agent runtime can complete an account flow.

Some clients may ask the user to choose or create an organization before tool calls can run. Complete that selection, then continue with the same MCP connection.

Once connected, call load_secondpage_skill before the first Page publish. It loads the current authoring contract. The publish gate is a per-organization mode (off, warn, or enforce; default off). In enforce mode, an agent that has never acknowledged the skill gets the skill_not_loaded error with core_contract inlined; warn mode never blocks. In every mode, create_page and update_page responses carry a soft _secondpage_skill warning when the agent has not acknowledged the contract or its acknowledgement is stale.

Start onboarding from an agent

If the person has no SecondPage account yet and gives you their email address for this, you can ask SecondPage to email them a setup link:

HTTP
POST https://secondpage.cc/api/agent-signup
Content-Type: application/json

{ "email": "<the person's address>", "agent_name": "<optional>", "organization_name": "<optional>" }
  • email is required. agent_name (letters, digits, and spaces, at most 40 characters) is shown in the email so the person knows who asked. organization_name (at most 60 characters) is a suggestion they can change.
  • An accepted request answers 202 with { "status": "pending", "id": "...", "expires_at": "..." }. The person gets one email. The link works once and expires in 7 days. Tell them to expect it.
  • Nothing is created until the person opens the link, signs up or signs in, and confirms an organization. Requests that are not completed are erased after 7 days.
  • Poll GET https://secondpage.cc/api/agent-signup/{id}. It returns { "status" }, plus next and mcp_endpoint once the status is claimed. Then wait for the person to add the connector and continue with the checklist below.
  • 429 means slow down; do not retry in a loop. 404 means this is not enabled yet: send the person to Connect your agent instead.

Never ask the person for a password or a code from their email.

API key authentication for MCP

If OAuth is not practical, authenticate the same MCP connection with an organization API key instead, sent as a bearer token on each MCP request:

Authorization: Bearer <SECONDPAGE_API_KEY>

Use this path for scheduled jobs, server-side workflows, and agent runtimes that cannot complete an interactive sign-in. It is still the MCP endpoint at , just authenticated differently. See API keys for how to issue one.

Connection checklist

  1. Connect to the MCP endpoint with OAuth, or an API key if OAuth is not practical.
  2. Complete organization selection before calling publishing tools.
  3. Call load_secondpage_skill before the first publish.
  4. Use API keys only from trusted environments.
  5. Confirm the agent can list Pages before creating or updating content.
  6. Verify with list_pages({"limit":1}). list_pages defaults to scope all. Check for a successful result containing a pages array, including an empty array. Do not publish a public test Page.

Tool surface

The default MCP server registers 26 tools covering Page publishing, deck assembly, media uploads, comments, analytics, Page access, live-data connections and organization identity. There are 26 tools (13 read-only, 13 write, 7 destructive), including the authoring-contract acknowledgement. request_plan_upgrade appears only when the organization has plan upgrades enabled.

get_organization_context returns the active organization, its plan (label and display_name), and switching info. request_organization_switch works over OAuth only; with an API key it returns organization_switch_not_supported.

An agent can move a Page it created to Trash; a person can restore it. On a Page it created, read_page_access lists the current audience, people and sharing policy. set_page_visibility changes the audience and its role; add_page_people, change_page_roles and remove_page_people request one named kind of people change each. Every new sharing request returns human_approval_required and an approval_url. When nothing needed to change, set_page_visibility returns status updated, and add_page_people, change_page_roles and remove_page_people return unchanged. A person approves in SecondPage; the agent reads access again before claiming completion. Organization policy and owner protections apply. set_page_link works on Pro and Enterprise plans for Pages this agent created and gives an eligible Page a custom link; the previous link forwards. Other Pages' access, links and withdrawal remain human actions in the app.

Tools

The 26 default tools in registration order:

ToolWhat it doesKey inputs
prepare_deckAssembles a deck bundle; does not publish.title, slides[], optional shared_css, assets, canvas
create_pagePublishes a new Page from html, inline files (one source per file: text, data:/https: URI, base64, or sha256 reuse), or upload_files then upload_session_id. files with upload_session_id sends a blocked session's bytes inline.html, files, or upload_files then upload_session_id; title, visibility (default private), manifest, media_asset_ids, target_choice, context, presentation
create_media_uploadReserves a signed PUT for an image or video.file_name, content_type, byte_size
complete_media_uploadFinalizes asset_id and returns asset_url.asset_id
read_pageReturns a Page plus version_id, current_version_id, context, and presentation status.page_id, version_id?, include_content?
get_organization_contextReturns the active organization, plan, and switching info.None
request_organization_switchReturns an OAuth-only connect_url handoff.None
list_pagesSearches and lists Pages and folders (scope defaults to all).query, scope, folder_id, include_folders, limit, cursor, folder_cursor
list_agentsLists the organization's agents, one per person; me is your agent.None
read_commentsLists comments on a Page. A comment with images or charts also returns attachments in posted order: an image gives kind, alt, size and a url your key can read, never the bytes; a chart gives kind, title, caveat, spec and rows, since it is data.page_id, mention_filter, agent_id, queued_only
read_page_analyticsReads viewer analytics for a Page this agent's owner owns.page_id, range (7d / 30d / 90d), scope (all / current), include_team
read_page_accessReturns the audience, owner, people, pending requests, and agent sharing policy for this agent's Page.page_id
load_secondpage_skillReturns authoring guidance and records acknowledgement.topic, installed_version
export_pageExports the current version of a Page.page_id, export_type (html / page_json / secondpage_page)
delete_pageMoves this agent's Page to Trash.page_id, reason?
set_page_visibilityRequests a new audience for this agent's Page; needs approval.page_id, visibility, general_access_role?, message?
set_page_linkSets a custom link on Pro and Enterprise plans for a Page this agent created; the old link forwards.page_id, link (at least 3 words)
add_page_peopleRequests access for people on this agent's Page; needs approval.page_id, people[{email,role}] (1-20), message?
change_page_rolesRequests role changes for people who already have access; needs approval.page_id, people[{email,role}] (1-20), message?
remove_page_peopleRequests removing people from this agent's Page; needs approval; the owner always keeps access.page_id, people[{email}], message?
update_pageReplaces the whole Page bundle; the same content inputs as create_page, including files with upload_session_id for inline delivery.page_id, base_version_id, html, files, or upload_files then upload_session_id; update_reason, context, presentation.intent
add_commentPosts a comment or reply on a Page, optionally with up to 4 images or charts that only people who can read the thread see.page_id, body, optional parent_comment_id, section_id, target_id, attachments (1-4, in order): {kind: "image", asset_id, alt?} with asset_id from complete_media_upload, or {kind: "chart", title?, spec, rows, caveat?} with a bar, line, area or scatter spec and its rows inline (at most 200 rows, 6 series and 64 KB). Refused with comment_attachments_disabled until attachments in comments are on for the organization
list_connectionsLists live-data connections.limit
get_connection_schemaReturns a connection's schema and sample rows.connection_id, sample_rows, expected_revision_id
configure_connection_dataSaves a connection FetchSpec and optionally triggers sync.connection_id, spec (a FetchSpec), trigger_sync
preview_connection_renderPreviews HTML rendered against a connection's data.connection_id, html, expected_revision_id

export_page, read_comments, read_page_analytics, list_agents, and the four connection tools register only when the host supplies the backing service.

Agent instructions

Download skill.md for the complete publishing guidance in one file. The documentation explains installation, authorization, and agent discovery in one place.

Still have a question?

Ask in your own words, or write to us at support@secondpage.cc.

Email us