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:- API Documentation - Complete REST API reference with OpenAPI synchronization
- MCP Server Documentation - Model Context Protocol server for AI integration
- 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
Python Virtual Environment
Always use the virtual environment for Python dependencies:Mintlify Development
Project Structure
Key Resources
- OpenAPI Specification: https://api.anysite.io/openapi.json
- MCP Server Repository: https://github.com/horizondatawave/hdw-mcp-server
- n8n Nodes Repository: https://github.com/horizondatawave/n8n-nodes-anysite
- Mintlify Documentation: https://mintlify.com/docs
API Structure & Authentication
IMPORTANT API Details:- Base URL: https://api.anysite.io
- Authentication:
access-tokenheader (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
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
- Overview & Prerequisites
- Get MCP Connection URL (from app.anysite.io)
- Configure MCP in platform (with screenshots)
- System prompts & tool inventory
- Use cases with examples
- Workflow integration diagrams
- Troubleshooting & security
- Benefits & next steps
OpenAPI Filtering
The project uses a custom Python script to filter the OpenAPI specification and remove internal/private endpoints:- Removes Payments API (Stripe integration)
- Removes Subscriptions API (billing management)
- Removes Chat API (internal chat system)
- Removes Webhook endpoints (internal notifications)
- Removes x-request-id parameters from all endpoints
- Maps technical tag names to human-readable names
openapi-filtered.json and automatically used by Mintlify.
AI Features
The documentation includes AI-enhanced features:- AI Development Assistant: Smart prompt generation system for API integration
- “Copy 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
- Always activate the virtual environment before development
- Use
mintlify devfor local preview during editing - Run
python3 filter_openapi.pywhen API changes to update filtered OpenAPI spec - Test all interactive examples and code snippets
- Ensure cross-references between sections work correctly
- Build and verify before deployment
Правила обновления документации
Автоматическое обновление OpenAPI спецификации
Для обновления документации API используйте скриптfilter_openapi.py:
- Загружает актуальную OpenAPI спецификацию с https://api.anysite.io/openapi.json
- Удаляет внутренние/приватные эндпоинты (Payments, Subscriptions, Chat, Webhooks)
- Убирает технические параметры (x-request-id) из всех эндпоинтов
- Улучшает названия тегов для лучшей читаемости
- Сохраняет отфильтрованную версию в
openapi-filtered.json
- ❌ Payments API (интеграция со Stripe)
- ❌ Subscriptions API (управление подписками)
- ❌ Chat API (внутренняя система чата)
- ❌ Webhook endpoints (внутренние уведомления)
- ❌ Параметры x-request-id (технические заголовки)
- 82 эндпоинта → 56 эндпоинтов (только публичные API)
- Автоматическое улучшение названий тегов
- Готовая спецификация для Mintlify
Порядок обновления документации
-
При изменениях в API:
-
При изменениях в MCP сервере:
- Проверить репозиторий: https://github.com/horizondatawave/hdw-mcp-server
- Обновить файлы в папке
mcp-server/
-
При изменениях в n8n нодах:
- Проверить репозиторий: https://github.com/horizondatawave/n8n-nodes-anysite
- Обновить файлы в папке
n8n-nodes/
-
При добавлении новых AI интеграций:
- Создать файл в формате
mcp-server/unlimited-plan-{platform}.mdx - Добавить скриншоты в
public/images/{platform}_mcp/ - Обновить
docs.jsonв секции “MCP Unlimited Plan” - Следовать структуре существующих интеграций (Make, Clay)
- Обновить
CLAUDE.mdв секции “MCP Unlimited Plan Integrations”
- Создать файл в формате
-
Проверка изменений:
-
Тестирование:
- Проверить все интерактивные примеры
- Убедиться в корректности кросс-ссылок
- Проверить отображение всех изображений
- Протестировать AI функции (кнопки “Copy AI Prompt”)
Мониторинг изменений
Автоматически отслеживаемые изменения:- OpenAPI спецификация синхронизируется с живым API
- Фильтрация применяется автоматически при запуске скрипта
- Документация MCP сервера обновляется при изменениях в исходном репозитории
- Документация n8n нодов обновляется при релизах новых версий
- Документация AI интеграций (Make, Clay) обновляется при изменениях в UI платформ
- Общие разделы (введение, аутентификация) обновляются по мере необходимости
Команды для обновления
Important Notes
- Configuration migrated from
mint.jsontodocs.jsonfor modern Mintlify features - All API examples use correct patterns:
access-tokenheader 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.jsloaded viadocs.jsonhead scripts - Works with Mintlify’s dynamic API page generation from OpenAPI specifications
- Automatically adds ”🤖 Copy 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
- JavaScript implementation in
- Virtual environment (
venv/) and Claude config (.claude/) are in gitignore - Contextual menu requires
docs.jsonconfiguration format - Filter script removes unwanted API sections and improves tag names automatically
- LLMs.txt updated with complete API coverage: 51+ endpoints including all 39 LinkedIn endpoints organized by functionality