RULER MCP
MCP server for reading, aggregating, suggesting, and applying price rules (floors) from ActiveView with a confirmation flow, designed for AI agents to analyze and adjust monetization.
README
RULER MCP — Price Rules (ActiveView)
Servidor MCP (JSON-RPC 2.0) focado 100% nas price rules da ActiveView: leitura, agregação, sugestão e aplicação de floors com fluxo de confirmação. Feito pra agentes de IA (CORTEX, Claude Desktop) analisarem e ajustarem a monetização junto com os dados de campanha.
As 5 tools
| Tool | Tipo | O que faz |
|---|---|---|
| resumo_floors | leitura | Panorama do domínio: revenue total, eCPM ponderado, top 10 regras por revenue, REGRAS PROBLEMÁTICAS (match fora do desired, revenue zerado) |
| listar_price_rules | leitura | Todas as rules com floor, eCPM, revenue, impressões, match_rate, desired, país, device, uri, utm |
| historico_ajustes | leitura | Auditoria: quem mudou qual floor, quando, com snapshot anterior |
| sugerir_floor | análise | Sugestões SUBIR/DESCER com justificativa e confiança (match_rate vs desired) — não aplica nada |
| aplicar_floor | AÇÃO | Upsert na ActiveView — exige confirm=true; sem ele retorna preview e NÃO executa |
Autenticação (duas camadas)
- Acesso ao MCP:
Authorization: Bearer <token>— tokens emRULER_MCP_TOKENS - ActiveView: cada tool recebe
av_bearercomo argumento — cada gestor usa a própria key.networkedomainsão informados pelo gestor.
Fluxo de segurança do aplicar_floor
- Sem
confirm: true→ retorna preview e NÃO executa - Com
confirm: true→ aplica, grava snapshot anterior + mudança + actor no histórico - O agente deve SEMPRE mostrar o preview e só confirmar após aprovação explícita do gestor
Deploy no Railway
- Repo próprio (separado do RULER), conecta no Railway
- Variáveis:
RULER_MCP_TOKENS,HIST_DB_PATH=/data/ruler-mcp-history.db - Volume em
/data(recomendado, pro histórico persistir) - Generate Domain → endpoint:
https://SEU-APP.up.railway.app/api/mcp
Requisitos
Node >= 22 (usa node:sqlite nativo pro histórico — zero compilação).
Fluxo de análise recomendado (pro agente)
resumo_floors→ panorama + problemas do domíniolistar_price_rules→ detalhe das regras relevantessugerir_floor→ propostas de ajuste- Cruzar com dados de campanha (moodlr-ops: roas_cross, analise_campanhas)
aplicar_floorsem confirm → preview → gestor aprova → confirm=truehistorico_ajustesdepois → correlacionar mudança × resultado
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.