Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
15 changes: 10 additions & 5 deletions 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.

**Open source**—You can [raise issues](https://github.com/apify/actors-mcp-server/issues) or [suggest new features](https://github.com/apify/actors-mcp-server/issues/new). If you find this useful, please [star us on GitHub](https://github.com/apify/actors-mcp-server) to show your support!

:::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 All @@ -23,15 +31,12 @@ You can use the Apify MCP Server in two ways:
- Set MCP client server command to `npx @apify/actors-mcp-server` and environment variable `APIFY_TOKEN` to your Apify API token
- See `npx @apify/actors-mcp-server --help` for more options

You could also use legacy option by running [Apify Actors MCP Server](https://apify.com/apify/actors-mcp-server) as an Actor.

:::tip Run instantly ⚡

To install the Apify MCP Server in [Claude for Desktop](https://claude.ai/download) with one click, download and run the latest [Apify MCP Server DXT file](https://github.com/apify/actors-mcp-server/releases/latest/download/actors-mcp-server.dxt)

:::


## Prerequisites

Before you start, make sure you have the following:
Expand Down Expand Up @@ -221,7 +226,7 @@ The Apify MCP server has a rate limit of _30 requests per second_ per user. If y
## Learn more

- [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction): Learn about the open standard on the official MCP website – understanding the protocol can help you build custom agents.
- [Apify Actors MCP Server](https://apify.com/apify/actors-mcp-server): The README for the Apify MCP Server actor (available on Apify Store as `apify/actors-mcp-server`) provides technical details on implementation and advanced usage.
- [Actors MCP Server GitHub](https://github.com/apify/actors-mcp-server): The README for the Apify MCP Server actor (available on Apify Store as `apify/actors-mcp-server`) provides technical details on implementation and advanced usage.
- [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client): A specialized client actor (`jiri.spilka/tester-mcp-client`) that you can run to simulate an AI agent in your browser. Useful for testing your setup with a chat UI.
- [How to use MCP with Apify Actors](https://blog.apify.com/how-to-use-mcp/): Learn how to expose over 5,000 Apify Actors to AI agents with Claude and LangGraph, and configure MCP clients and servers.
- [Apify MCP Server Tutorial](https://www.youtube.com/watch?v=BKu8H91uCTg): Integrate thousands of Apify Actors and Agents with Claude.