Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion apify-docs-theme/src/theme/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@ import { useLocation } from '@docusaurus/router';
import Layout from '@docusaurus/theme-classic/lib/theme/Layout/index';
import useBaseUrl from '@docusaurus/useBaseUrl';
import { usePluginData } from '@docusaurus/useGlobalData';
import React from 'react';
import React, { useEffect } from 'react';

export default function LayoutWrapper(props) {
const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
const baseUrl = useBaseUrl('/');
const currentPath = useLocation().pathname.replace(new RegExp(`^${baseUrl}`), '');

// Silent cache busting for mcp.apify.com redirects
useEffect(() => {
// Only run on the MCP documentation page
if (currentPath.includes('integrations/mcp')) {
// Always clear cache when on MCP page to help with redirect issues.
// Background: Previously, mcp.apify.com had a 301 redirect to this docs page, which was wrong.
// Many users have this redirect cached in their browsers, so they can't access the new MCP UI.
// This helps with their cached redirect, allowing them to access mcp.apify.com
fetch('https://mcp.apify.com/', { method: 'get', cache: 'reload' }).then(() => {
console.log('MCP cache cleared successfully');
}).catch((error) => {
console.warn('Failed to clear MCP cache:', error);
});
}
}, [currentPath]);

return (
<>
<Head>
Expand Down
10 changes: 9 additions & 1 deletion sources/platform/integrations/ai/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ slug: /integrations/mcp

<!-- markdownlint-disable MD024 -->

The _Apify Model Context Protocol (MCP) Server_ allows AI applications to connect to Apify’s extensive library of Actors as tools to perform web scraping, data extraction, or other automation tasks in real time.


The _Apify Model Context Protocol (MCP) Server_ allows AI applications to connect to Apify's extensive library of Actors as tools to perform web scraping, data extraction, or other automation tasks in real time.

:::tip Configure MCP Server

Configure Apify MCP server at [mcp.apify.com](https://mcp.apify.com), select Actors and tools and copy configuration to your MCP client.

:::

![Apify MCP Server](../../images/apify_mcp_server.png)

Expand Down
Loading