# Connect your frontend | RenewCMS Docs

> Fetch published articles, use SEO metadata and connect tools to your RenewCMS instance.

Canonical page: https://renewcms.dev/en/resources/integrate

## Fetch a published article

Replace `cms.example.com` with the CMS address and `42` with the ID of a published article. Use the response to render the article on your frontend. If you receive `404`, check the ID and publication status.

```bash
curl -fsS "https://cms.example.com/v1/article/42?format=json"
```

## Choose a response format

Article reads support Markdown, stored HTML and structured JSON blocks. Choose `format=markdown`, `format=html` or `format=json` to suit your renderer. If you write through the API, send the article body as HTML. Follow the pagination controls for list routes instead of assuming a single response includes every item.

## Render SEO metadata and the sitemap

Use the resolved SEO data and the site sitemap from your instance’s Integration reference. Render the canonical URL, title and description on the public page.

Use the article ID from the content response in the SEO request. The sitemap endpoint returns paginated JSON. Fetch every page and emit sitemap XML from your frontend, excluding entries marked `noindex`.

```bash
curl -fsS "https://cms.example.com/v1/article/42/seo"
curl -fsS "https://cms.example.com/v1/site/journal/sitemap?page=1&size=100"
```

## Authenticate server-side requests

Public reads can be made without a key. For protected routes that accept keys, create a named API key in a verified session, store it in your server’s secret store and send it as `Authorization: Bearer rcms_…`. A key inherits its creator’s permissions. Revoke it when it is no longer needed and keep it out of browser code.

## Find the API reference for your version

Open Integration in the backoffice to browse routes, authentication, parameters and examples for your deployment. Your CMS origin also serves `/openapi.json`, `/llms.txt` and `/llms-full.txt`. Use these files when generating a client or documenting an integration for a specific release.

## Connect an MCP client

Run the optional `renewcms-mcp` executable as a stdio server from your MCP client. Give it the CMS URL and a dedicated API key through the client’s environment settings. Build the executable from the source for your release with `task build:mcp` if needed. Create the key under Integration → API keys and set `RENEWCMS_URL` and `RENEWCMS_API_KEY` as shown.

```json
{
  "mcpServers": {
    "renewcms": {
      "command": "/path/to/renewcms-mcp",
      "env": {
        "RENEWCMS_URL": "https://cms.example.com",
        "RENEWCMS_API_KEY": "rcms_..."
      }
    }
  }
}
```
