Skip to main content

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a comprehensive documentation project for anysite.io, built using the Mintlify documentation platform. The project covers three main components:
  1. API Documentation - Complete REST API reference with OpenAPI synchronization
  2. MCP Server Documentation - Model Context Protocol server for AI integration
  3. n8n Nodes Documentation - Community nodes for workflow automation

Project Goals

  • Create comprehensive, user-friendly documentation for the entire anysite.io ecosystem
  • Maintain automatic synchronization with OpenAPI specifications
  • Provide interactive examples and code playgrounds
  • Support developers integrating with Anysite services across different platforms

Development Environment

Prerequisites

  • uv — Python package manager
  • just — command runner
  • mintlify — docs CLI (npm install -g mintlify)

just recipes

Manual commands

Project Structure

Key Resources

API Structure & Authentication

IMPORTANT API Details:
  • Base URL: https://api.anysite.io
  • Authentication: access-token header (NOT Bearer tokens)
  • HTTP Methods: All main endpoints use POST method (except token management endpoints which use GET)
  • Request Format: JSON request body for all POST endpoints
  • Endpoint Prefix: All main API endpoints have /api/ prefix
All documentation examples use the correct access-token header format and POST methods.

Content Synchronization

  • OpenAPI specification is automatically synchronized from the live API using filtered version
  • Unwanted endpoints (Payments, Subscriptions, Chat, Webhooks) are automatically excluded
  • x-request-id parameters are automatically removed from all endpoints
  • Repository documentation is manually updated when source repositories change
  • Version control ensures consistency across all documentation sections

MCP Unlimited Plan Integrations

The documentation includes comprehensive integration guides for AI agent platforms:

Make AI Agent Integration

  • File: mcp-server/unlimited-plan-make.mdx
  • Images: public/images/make_mcp/ (6 screenshots)
  • Focus: Autonomous research agents, workflow automation, scheduled intelligence
  • Use Cases: Lead enrichment, competitor monitoring, multi-platform research, recruitment

Clay AI Agent Integration

  • File: mcp-server/unlimited-plan-clay.mdx
  • Images: public/images/clay_mcp/ (3 screenshots)
  • Focus: Data enrichment workflows, table-based automation, waterfall sequences
  • Use Cases: Lead enrichment, company intelligence, multi-platform waterfall, talent sourcing
Integration Pattern: Both guides follow consistent structure:
  1. Overview & Prerequisites
  2. Get MCP Connection URL (from app.anysite.io)
  3. Configure MCP in platform (with screenshots)
  4. System prompts & tool inventory
  5. Use cases with examples
  6. Workflow integration diagrams
  7. Troubleshooting & security
  8. Benefits & next steps

OpenAPI Filtering & Navigation Generation

The project uses filter_openapi.py to process the OpenAPI specification and auto-generate Mintlify navigation:
What the script does:
  • Downloads the live OpenAPI spec from https://api.anysite.io/openapi.json
  • Removes x-request-id parameters and fixes OAuth security references
  • Maps technical tag names to human-readable names (e.g. /linkedin/companyLinkedIn Companies)
  • Embeds x-llm-* hints into endpoint descriptions for AI agents
  • Removes endpoints with path parameters {...} (breaks Mintlify parser)
  • Removes invalid schema names
  • Auto-generates nested sidebar navigation in docs.json from x-tagGroups (Mintlify does not support x-tagGroups natively, so the script builds the groups structure manually)
  • Generates llms.txt, llms-full.txt, and split JSON files for AI consumption
Navigation auto-generation:
  • Groups are built from the OpenAPI x-tagGroups extension
  • Each tag becomes a nested sub-group with its endpoints
  • Single-tag groups are flattened to avoid duplication (e.g. SEC → endpoints directly, not SEC → SEC → endpoints)
  • Both EN and ZH API Reference tabs are updated automatically
The filtered spec is saved as openapi-filtered.json and used by Mintlify for page generation.

AI Features

The documentation includes AI-enhanced features:
  • AI Development Assistant: Smart prompt generation system for API integration
    • “AI Prompt” buttons appear next to each API endpoint title
    • Automatically generates comprehensive integration prompts for AI development tools
    • Extracts endpoint details, authentication, request/response examples from Mintlify’s rendered content
    • Provides production-ready implementation requirements and best practices
    • Works with Claude, ChatGPT, Perplexity, and other AI development tools
  • LLMs.txt: Comprehensive API overview for AI tools consumption with all 51+ endpoints
    • Complete LinkedIn API coverage (39 endpoints organized by categories)
    • Correct HTTP methods (POST for main endpoints, GET for tokens)
    • Proper endpoint paths with /api/ prefix
    • Authentication examples and request formats
  • Contextual Menu: Copy, view, and share functionality with AI tools (ChatGPT, Claude, Perplexity)
  • AI Instructions: Detailed guidance for AI assistants in .ai/instructions.md

Development Workflow

  1. Run just update-api when API changes to update filtered OpenAPI spec
  2. Run just dev for local preview during editing
  3. Test all interactive examples and code snippets
  4. Ensure cross-references between sections work correctly
  5. Build and verify before deployment

Правила обновления документации

Автоматическое обновление OpenAPI спецификации

Для обновления документации API используйте скрипт filter_openapi.py:
Что делает скрипт:
  • Загружает актуальную OpenAPI спецификацию с https://api.anysite.io/openapi.json
  • Убирает технические параметры (x-request-id) из всех эндпоинтов
  • Встраивает x-llm хинты в описания эндпоинтов
  • Улучшает названия тегов для лучшей читаемости
  • Удаляет эндпоинты с path-параметрами {...} (ломают Mintlify)
  • Автоматически генерирует вложенную навигацию в docs.json из x-tagGroups
  • Сохраняет отфильтрованную версию в openapi-filtered.json
  • Генерирует llms.txt, llms-full.txt и JSON файлы для AI

Порядок обновления документации

  1. При изменениях в API:
  2. При изменениях в MCP сервере:
  3. При изменениях в n8n нодах:
  4. При добавлении новых AI интеграций:
    • Создать файл в формате mcp-server/unlimited-plan-{platform}.mdx
    • Добавить скриншоты в public/images/{platform}_mcp/
    • Обновить docs.json в секции “MCP Unlimited Plan”
    • Следовать структуре существующих интеграций (Make, Clay)
    • Обновить CLAUDE.md в секции “MCP Unlimited Plan Integrations”
  5. Проверка изменений:
  6. Тестирование:
    • Проверить все интерактивные примеры
    • Убедиться в корректности кросс-ссылок
    • Проверить отображение всех изображений
    • Протестировать AI функции (кнопки “AI Prompt”)

Мониторинг изменений

Автоматически отслеживаемые изменения:
  • OpenAPI спецификация синхронизируется с живым API
  • Фильтрация применяется автоматически при запуске скрипта
Ручной контроль версий:
  • Документация MCP сервера обновляется при изменениях в исходном репозитории
  • Документация n8n нодов обновляется при релизах новых версий
  • Документация AI интеграций (Make, Clay) обновляется при изменениях в UI платформ
  • Общие разделы (введение, аутентификация) обновляются по мере необходимости

Команды для обновления

Important Notes

  • Configuration migrated from mint.json to docs.json for modern Mintlify features
  • All API examples use correct patterns:
    • access-token header authentication (NOT Bearer tokens)
    • POST method for main endpoints (LinkedIn, Twitter, Instagram, Reddit, Google)
    • GET method only for token management endpoints (/token/statistic, /token/requests, /token/requests/count)
    • JSON request body for all POST endpoints
    • Proper /api/ prefix for all main endpoints
  • AI Development Assistant feature:
    • JavaScript implementation in public/ai-prompt.js loaded via docs.json head scripts
    • Works with Mintlify’s dynamic API page generation from OpenAPI specifications
    • Automatically adds ”🤖 AI Prompt” buttons to endpoint titles
    • Extracts data from DOM (not OpenAPI files) for real-time content accuracy
    • Generates comprehensive prompts with endpoint details, authentication, examples, and implementation requirements
  • Python dependencies managed via uv (pyproject.toml), virtual environment in .venv/
  • .venv/ and .claude/ are in gitignore
  • Contextual menu requires docs.json configuration format
  • Filter script improves tag names and auto-generates nested sidebar navigation from x-tagGroups
  • LLMs.txt updated with complete API coverage: 51+ endpoints including all 39 LinkedIn endpoints organized by functionality