Eventor MCP Server
Enables AI agents to manage events, races, and batches on Eventor via auto-generated tools from the OpenAPI spec.
README
eventor-cli
Cliente headless da Management API do Eventor (/api/v1), desenhado com um agente de IA como usuário primário. Monorepo com três pacotes sobre um SDK tipado único:
| Pacote | O que é | Status |
|---|---|---|
@eventor-run/sdk |
Cliente HTTP tipado (auth, retry, paginação, upload). Núcleo. | ✅ 9.B |
@eventor-run/cli |
Binário eventor (commander). |
✅ 9.C |
@eventor-run/mcp |
Servidor MCP com tools auto-geradas do spec. | ⏳ 9.E |
A fonte de verdade é o OpenAPI 3.1 em openapi/eventor-v1.json (gerado pelo backend Laravel). Os tipos do SDK são gerados dele — endpoint novo na API = tipo novo no cliente, sem código escrito à mão.
Requisitos
- Node ≥ 20 (usa
fetch/FormDatanativos — zero dependência de runtime) - pnpm 10
Setup
pnpm install
pnpm gen # regenera os tipos a partir de openapi/eventor-v1.json
pnpm build # compila os pacotes
pnpm test # roda os testes
pnpm typecheck
SDK em 30 segundos
import { EventorClient, createClient } from '@eventor-run/sdk';
// credencial em camadas: flag → EVENTOR_API_KEY → ~/.config/eventor/config.json
const sdk = createClient({ apiKey: process.env.EVENTOR_API_KEY });
// request tipado (path/query/body inferidos do OpenAPI):
const event = await sdk.request('get', '/events/{event}', { path: { event: 'MAR2026' } });
// paginação automática:
const all = await sdk.all('/events', { query: { status: 'published' } });
// upload por caminho local (sem montar multipart na mão):
await sdk.upload('post', '/events/{event}/logo', { path: { event: 'MAR2026' }, file: './logo.png' });
// escape hatch sem tipos (cobre 100% do spec):
await sdk.api('POST', '/events', { body: { name: 'Maratona' } });
O que o SDK entrega (9.B)
- Tipos gerados do OpenAPI (
request/all/paginate/uploadtotalmente tipados). - Credencial em camadas (flag → env → config file
0600→ erroexit 4). - Retry/backoff exponencial em
429/5xx, respeitandoRetry-After.POST/PATCHnão re-tentam em5xx(evita duplicar escrita);429re-tenta sempre. - Paginação via
meta.last_page(all()/paginate()). - Upload por caminho de arquivo (lê do disco, monta multipart).
- Erros preservam o envelope
{error,message,details}+hintacionável e expõem exit code semântico (EventorApiError.exitCode) pro CLI.
CLI (eventor) — 9.C
Desenhado com stdout = dados, stderr = humanos. Sem TTY (pipe/agente) o stdout é JSON puro.
eventor auth login --api-key sk_live_... # valida em /me e grava ~/.config/eventor/config.json (0600)
eventor event list --json | jq '.data[].code' # dados no stdout
eventor event setup --from spec.json --dry-run # mostra o plano (would_create/would_update/unchanged)
eventor event setup --from spec.json # executa idempotente (organizer→event→races→batches→…)
eventor event publish --event MAR2026
eventor api GET /events --all # escape hatch: cobre 100% do spec, --all pagina tudo
- Exit codes semânticos:
0ok ·1genérico/5xx ·2uso ·3not_found ·4unauthorized ·5conflict. - Erro acionável: todo erro vira
{"error":{"code","message","hint"}}no stderr; o agente lêcode(decide) ehint(próximo comando). event setup: workflow consolidado e idempotente;race_pricesaceita o nome da prova (resolvido prarace_id);--dry-runsó faz GETs.- Destrutivo (
api DELETE) exige--yes(agente em CI nunca fica pendurado). eventor skill installinstala oSKILL.mdem~/.claude/skills/eventor/— ensina o agente quando/como usar o CLI.--helpem qualquer comando traz exemplos copiáveis + a tabela de exit codes.
Publicando no npm (@eventor-run/cli + @eventor-run/sdk)
A publicação é automática ao empurrar uma tag vX.Y.Z (workflow release.yml). Pré-requisitos, uma vez:
- Criar a org
eventorno npmjs.com (grátis para pacotes públicos). - Gerar um automation token (Account → Access Tokens → Granular/Automation, só publish) e salvá-lo como secret
NPM_TOKENdo repositório (Settings → Secrets → Actions). É revogável — não é a credencial pessoal.
Depois, a cada release:
# bump das versões em packages/sdk e packages/cli, commit, então:
git tag v0.1.0 && git push origin v0.1.0 # dispara o workflow → publica sdk depois cli
O pnpm -r publish publica em ordem (sdk antes do cli) e converte workspace:* na versão real. O binário instalado chama-se eventor independentemente do nome do pacote (npx @eventor-run/cli ... para uso pontual).
Decisões (PRD cli-eventor-headless §13–14)
- Repo separado do backend Laravel; CLI antes do MCP; commander; OpenAPI como fonte de verdade.
- Base URL default:
https://eventor.run/api/v1(sobrescrevível por--base-url/EVENTOR_BASE_URL). - Distribuição npm (
@eventor-run/cli): decisão da 9.D.
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.