Reference source for the SWEN.AI public MCP server (https://swen.ia.br/api/mcp)

SWEN.AI MCP Server (reference source)

Product site

This repository contains the reference implementation of the source codebehind the public Model Context Protocol(MCP) server hosted at:

https://swen.ia.br/api/mcp

SWEN.AI is a Brazilian portal covering AI news, modelbenchmarks, tools and tutorials. This MCP server exposes that data to AIagents and MCP-compatible clients (Claude, Claude Code, etc.) with no APIkey required (IP-based rate limiting only).

This is not a runnable standalone package

The files here are copied verbatim from our private production monorepo sothat developers can read, audit, and understand exactly what the hostedendpoint does. Authentication, rate-limiting, and infrastructure code areintentionally not included — see Security below.

To use the server, connect your MCP client directly to the hosted endpoint;there is nothing to install or run locally.

Connecting an MCP client

{
  "mcpServers": {
    "swen-ai": {
      "url": "https://swen.ia.br/api/mcp"
    }
  }
}

Available tools

Tool Description
search_news Search/list published AI news articles
get_news_article Fetch a single news article by slug
list_ai_models List tracked AI models
get_model Fetch a single AI model by slug
get_intelligence_ranking Get the canonical Artificial Analysis Intelligence Index ranking
search_tools Search/list AI tools in the directory
list_tutorials List tutorials

Every tool is a thin wrapper: it validates input, calls a fetchers.tsfunction to read from Postgres (via Supabase's REST API using the publicanon key), maps the row to a stable public contract (mappers.ts /types.ts), and returns JSON.

Files in this repo

src/lib/api-v1/
  mcp-server.ts     tool registration (the 7 tools above)
  fetchers.ts       data-fetching functions (reads only, public anon key)
  mappers.ts        DB row → public contract mapping
  types.ts          public contract types (NewsItem, ModelItem, ...)
src/lib/ranking/
  fetch-aa.ts       canonical Artificial Analysis ranking logic (dedup + sort)
src/lib/benchmark/
  freshness.ts      filters out stale benchmark scores
src/lib/i18n/
  config.ts         locale constants used by the mappers

These are copied byte-for-byte from the production repo. They are kept insync manually; they may lag the deployed version slightly.

Also see

Security

This repo deliberately excludes:

  • auth.ts — API key validation and rate-limiting logic
  • key-crypto.ts — API key hashing
  • Any environment variable, credential, or internal Supabase projectreference beyond the two values that are public by design:NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY (alreadyshipped in every page's browser bundle on swen.ia.br; access is governedby Postgres Row Level Security, not by keeping this value secret).

If you believe you've found a security issue with the hosted endpoint,please report it privately rather than opening a public issue.

License

MIT — see LICENSE.

MCP Server · Populars

MCP Server · New

    fullselfbrowsing

    FSB v0.9.92 Full Self Browsing

    DOM-first AI browser automation for Chrome and MCP clients.

    Community fullselfbrowsing
    kody-hq

    kody

    🐨 Your agents' cloud — the memory, keys, code, and automations your AI agent keeps, portable across every MCP host.

    Community kody-hq
    rootSunc

    CNEquity · 中国市场金融数据湖

    中国 A 股数据基础设施。55个日更数据集:股票行情、基本面、期货数据、资金面、公告事件、指数行业、宏观与风险。行级溯源、PIT 语义、复权与历史成分内置,MCP 原生。自托管,零注册、零 API Token

    Community rootSunc
    VicPitic

    The Brains

    The smartest brains on earth, in an MCP. Cited, searchable MCP servers built from founders' talks, essays and posts.

    Community VicPitic
    metavert-io

    LightCMS

    Self-hosted CMS that works human or headless: full admin UI plus REST and MCP APIs, built-in semantic search and site chat, and content forking, versioning, diff/merge review, templates, approvals, and static page generation.

    Community metavert-io