Get the FREE Ultimate OpenClaw Setup Guide →

agentai

MCP server from OnStartups/agentai-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio onstartups-agentai-mcp-server docker run -i --rm -e API_TOKEN mcp/agentai \
  --env API_TOKEN="YOUR_API_TOKEN_HERE"

How to use

Agent.ai MCP Server exposes a dynamic, API-driven set of tools for web content extraction, screenshots, and YouTube transcripts. The server automatically discovers available functions from the Agent.ai API and exposes them as actions like grab_web_text, grab_web_screenshot, and get_youtube_transcript. To use the server, you must provide an API token via the API_TOKEN environment variable (or your deployment platform's secret management). Clients can then call the specific endpoints exposed by the MCP server to perform tasks such as extracting text from a page, capturing a screenshot, or retrieving a video transcript, all while leveraging caching to minimize repeated API calls.

The primary tools currently available include:

  • grab_web_text: Extracts text from a web page. Required input: url. Optional mode can be scrape for a single page or crawl for up to 100 pages.
  • grab_web_screenshot: Captures a screenshot of a web page. Required input: url. Optional ttl_for_screenshot sets cache expiration in seconds.
  • get_youtube_transcript: Retrieves transcripts for a YouTube video. Required input: url.

These tools are accessed via the Agent.ai API endpoints under v1/action, such as /grab_web_text, /grab_web_screenshot, and /get_youtube_transcript. Example usage patterns and payloads are documented in the Agent.ai API reference linked in the README, and the MCP server will route requests accordingly while handling authentication and caching.

How to install

Prerequisites:

  • Docker installed and running on your system
  • An Agent.ai API token (you can request one from Agent.ai)

Step-by-step installation:

  1. Ensure Docker is installed and running. Verify with:
docker --version
  1. Obtain your Agent.ai API token and keep it ready. You will provide it to the MCP server via the API_TOKEN environment variable when starting the container.
  2. Run the MCP server using Docker:
docker run -i --rm -e API_TOKEN=YOUR_API_TOKEN_HERE mcp/agentai

Replace YOUR_API_TOKEN_HERE with your actual token. The server should start and be ready to receive requests at the configured endpoints.

Optional alternative (NPX):

npx -y @agentai/mcp-server

This will pull and run the MCP server without using Docker, if you prefer a Node-based execution path.

Additional notes

Environment variables and configuration:

  • API_TOKEN must be set to your Agent.ai API token for the MCP server to authenticate with Agent.ai.
  • The Docker deployment uses the --rm flag to clean up the container after exit; remove it if you need the container to persist for debugging.
  • The server caches function definitions to reduce API calls; you can adjust caching behavior through Agent.ai settings if available.
  • If you encounter authentication errors, double-check that the API_TOKEN is correct and has the necessary permissions.
  • When using grab_web_text in crawl mode, ensure the target sites permit crawling and respect robots.txt policies.
  • For YouTube transcripts, ensure the provided video URL is accessible and not restricted by region or privacy settings.

Related MCP Servers

Sponsor this space

Reach thousands of developers