Skip to content

Set up with Claude Code or another coding agent

View as Markdown

AgentMySite runs a remote MCP server. Add it to your coding agent once, approve it for one of your sites, and the agent can do the setup for you: paste the embed snippet in the right layout file, register your hostnames, start indexing your pages, and, for an admin panel, propose and import the tools the assistant may call.

Your code never leaves your machine. The agent reads and edits it; our server only answers the agent’s questions about your site and performs the actions you approve.

  1. In Claude Code, run:

    Terminal window
    claude mcp add -t http agentmysite https://mcp.agentmysite.com/mcp

    Cursor, Windsurf and claude.ai connectors take the same URL (https://mcp.agentmysite.com/mcp) wherever they accept a remote MCP server.

  2. The agent opens your browser on AgentMySite. Sign in with your email code; a new email creates an account.

  3. Pick the site the agent may manage, or create one. Optionally allow localhost for up to 24 hours so you can test from a local dev server.

  4. Select Approve. The browser returns to your agent and the connection is ready.

One connection manages one site. These are the tools it gets:

ToolWhat it does
get_site_contextSite kind, allowed domains, indexed content, the embed snippet and the recommended next steps
set_site_kindRecords whether this is a website, an admin panel, a WooCommerce store or a Shopify store
add_allowed_domainRegisters a permanent hostname the widget may load on
allow_localhostAllows localhost and 127.0.0.1 for 1 to 24 hours
add_website_source, add_sitemap_sourceIndex a page or pick pages from your sitemap (preview first, nothing is indexed silently)
get_ingestion_statusIndexing progress per document
list_tools, import_toolsReview and import tools for an admin panel; imports are a dry run by default and imported tools start disabled
list_unansweredQuestions visitors asked that the content could not answer
diagnose_installFetches one public page of your site and checks the loader tag, site key and origin

The agent also gets an install guide per site kind, so a prompt like “Add AgentMySite to this site” is enough.

When the agent sets up tools for an admin panel, the tools run through your own page. A tool call travels from our chat iframe to the host page, and the handler that runs it is your code with the session the signed-in user already has. Cookies are attached by the browser; a bearer token is added by your handler. AgentMySite never holds credentials and adds no authorization of its own, so the assistant can do exactly what that signed-in user can do and nothing more.

Three things to keep in mind:

  • Your backend still authorizes every call. Tool arguments come from a model and prove nothing.
  • CSRF tokens are your handler’s job, like any other request from your page.
  • What the handler returns goes to the model and into the tool audit. Return what the user may see on screen, nothing more.

add_allowed_domain refuses localhost: permanent localhost origins would let anyone who copies your public site key use your account from their own machine. Use allow_localhost (or the toggle on the approval screen) for a window of up to 24 hours instead. The window closes by itself.

Open Site Settings for the site. The Coding agent connections section lists every approved agent with its scopes and when it was last used. Revoke stops the agent’s access on its next call. A connection also stops working when the site is deleted.

The server is an OAuth 2.1 resource server. Discovery lives at https://mcp.agentmysite.com/.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server. Clients may identify themselves with a Client ID Metadata Document or register dynamically; PKCE (S256) and the resource parameter are required, refresh tokens rotate, and loopback redirect URIs match without the port.