DEVELOPER DOCS

API & MCP Server

Stack intelligence from real Rails apps, in your editor. Connect Claude Code or Cursor via MCP, or use the REST API.

MCP NEW

No API key needed. Connect your AI assistant and ask questions about Rails stacks.

MCP Server

Query BuiltOnRails stack intelligence directly from Claude Code, Cursor, or any MCP-compatible AI assistant. No API key needed — all data is public.

Connect

# Claude Code
claude mcp add builtonrails --transport sse https://builtonrails.com/mcp/sse

# Local development
claude mcp add builtonrails-dev --transport sse http://localhost:3037/mcp/sse

# Product owners: registration with a write-scope API key (enables my_product)
claude mcp add builtonrails-owner --transport sse https://builtonrails.com/mcp/sse \
  --header "Authorization: Bearer YOUR_API_KEY"

# Admins: registration with an admin API key (enables the admin_* tools)
claude mcp add builtonrails-admin --transport sse https://builtonrails.com/mcp/sse \
  --header "Authorization: Bearer YOUR_ADMIN_API_KEY"

A machine-readable manifest is served at /.well-known/mcp.json.

Then just ask your AI natural questions about Rails stacks. It will call the right tools automatically.

Transport

Endpoint Transport Description
/mcp/sse SSE Server-Sent Events (recommended for Claude Code)
/mcp/messages HTTP Standard HTTP transport

No authentication required for the 12 public tools. my_product requires a write-scope API key, and the three admin_* tools an admin key — both sent as a Bearer token (see Tools — Owners and Tools — Admin below).


Tools — Stack Intelligence

search_stacks

Search for technology stacks (gems, frameworks, services) by name or category. Returns real adoption data from production Rails apps.

Parameters:

Name Type Required Description
query string yes Search term (e.g. "sidekiq", "auth", "postgres")
category string no Filter by category: Framework, Database, Frontend, Background, Search, Auth, Payments, DevOps, Testing, Analytics, LLM, AI/ML, Observability, Security, Email

Example response:

{
  "query": "auth",
  "results_count": 3,
  "stacks": [
    {
      "name": "Devise",
      "category": "Auth",
      "products_count": 28,
      "github_stars": 23900,
      "popular": true
    }
  ]
}

compare_stacks

Head-to-head comparison of two stacks. Uses the same scoring algorithm as Stack Showdown — weighted by product adoption, collections, GitHub stars, and community signals.

Parameters:

Name Type Required Description
stack1 string yes First stack name (e.g. "Sidekiq")
stack2 string yes Second stack name (e.g. "Solid Queue")

Example response:

{
  "stack1": {
    "name": "Sidekiq",
    "products_count": 32,
    "github_stars": 13200,
    "score": 385
  },
  "stack2": {
    "name": "Solid Queue",
    "products_count": 47,
    "github_stars": 1900,
    "score": 521
  },
  "winner": {
    "winner": "Solid Queue",
    "score_difference": 136
  }
}

get_stack_recommendations

Get recommendations based on what real Rails apps use together. Given your current stacks and a target category, it finds all products using your stacks and counts which other stacks in that category they use — ranked by frequency.

Parameters:

Name Type Required Description
current_stacks array of strings yes Your current stacks (e.g. ["PostgreSQL", "Hotwire"])
category string yes Category to get recommendations for (e.g. "Background", "Auth")

Example response:

{
  "current_stacks": ["PostgreSQL", "Hotwire"],
  "category": "Background",
  "products_analyzed": 34,
  "recommendations": [
    {
      "name": "Solid Queue",
      "co_occurrence_count": 28,
      "confidence": "82%"
    }
  ]
}

get_stack_trends

Historical adoption trends for a technology stack. Shows how many Rails apps use the stack over time, plus growth percentage.

Parameters:

Name Type Required Description
stack_name string yes Stack name (e.g. "Solid Queue")
days integer no Days of history (default: 90, max: 365)

Example response:

{
  "stack": {
    "name": "Solid Queue",
    "category": "Background",
    "current_products_count": 47
  },
  "trend": {
    "period_growth_percent": 52,
    "recent_30_day_growth_percent": 22,
    "snapshots": [
      { "date": "2025-11-15", "products_count": 31 },
      { "date": "2026-01-15", "products_count": 47 }
    ]
  }
}

get_categories

Get all available stack categories with descriptions and stack counts. Useful for understanding what types of technologies are tracked.

Parameters: None

Example response:

{
  "total_categories": 15,
  "categories": [
    { "name": "Framework", "description": "Web frameworks", "stacks_count": 12 },
    { "name": "Database", "description": "Databases & storage", "stacks_count": 10 },
    { "name": "Auth", "description": "Authentication & authorization", "stacks_count": 8 }
  ]
}

Tools — Products

search_products

Search and browse Rails applications in the directory. Returns approved products with name, URL, type, votes, and stacks.

Parameters:

Name Type Required Description
query string no Search term to match product name (e.g. "shopify", "hey")
type string no Filter by product type (e.g. "SaaS", "Gem", "DevTool")
sort string no Sort order: "votes" (most upvoted) or "newest" (default)
limit integer no Max results (default: 10, max: 25)

Example response:

{
  "query": "shop",
  "results_count": 2,
  "products": [
    {
      "name": "Shopify",
      "slug": "shopify",
      "url": "https://shopify.com",
      "product_type": "SaaS",
      "votes_count": 127,
      "stacks": [
        { "name": "PostgreSQL", "category": "Database" },
        { "name": "Sidekiq", "category": "Background" }
      ],
      "builtonrails_url": "https://builtonrails.com/products/shopify"
    }
  ]
}

get_product

Get detailed information about a specific Rails application including description, tags, member, and full stack list.

Parameters:

Name Type Required Description
slug string yes Product slug (e.g. "shopify", "hey", "github")

Example response:

{
  "name": "Shopify",
  "slug": "shopify",
  "url": "https://shopify.com",
  "description": "Commerce platform built on Rails",
  "product_type": "SaaS",
  "tags": ["ecommerce", "saas"],
  "votes_count": 127,
  "verified": true,
  "member": { "username": "tobi", "display_name": "Tobi Lutke" },
  "stacks": [
    { "name": "PostgreSQL", "category": "Database", "github_stars": null },
    { "name": "Sidekiq", "category": "Background", "github_stars": 13200 }
  ],
  "builtonrails_url": "https://builtonrails.com/products/shopify"
}

get_products_using_stacks

Find real Rails applications that use specific technology stacks. Returns approved products using all specified stacks.

Parameters:

Name Type Required Description
stacks array of strings yes Stack names to filter by (e.g. ["PostgreSQL", "Sidekiq"])
limit integer no Max results (default: 10, max: 25)

Example response:

{
  "searched_stacks": ["PostgreSQL", "Sidekiq"],
  "total_matches": 18,
  "showing": 3,
  "products": [
    {
      "name": "Shopify",
      "slug": "shopify",
      "votes_count": 127,
      "stacks": [
        { "name": "PostgreSQL", "category": "Database" },
        { "name": "Sidekiq", "category": "Background" }
      ],
      "builtonrails_url": "https://builtonrails.com/products/shopify"
    }
  ]
}

Tools — Detection

detect_stacks

Detect technology stacks from a Gemfile, package.json, or importmap.rb content. Paste your dependency file and get matched stacks with adoption data. The killer feature for coding agents — understand your project's stack landscape instantly.

Parameters:

Name Type Required Description
gemfile string no Raw Gemfile content
package_json string no Raw package.json content
importmap string no Raw config/importmap.rb content

At least one parameter is required.

Example response:

{
  "matched_count": 8,
  "stacks": [
    { "name": "PostgreSQL", "category": "Database", "products_count": 89, "popular": true },
    { "name": "Sidekiq", "category": "Background", "products_count": 32, "popular": true },
    { "name": "Devise", "category": "Auth", "products_count": 28, "popular": true }
  ]
}

get_collection

Retrieve a curated stack collection by slug. Collections are hand-picked sets of stacks with notes and optional LLM prompts — ready-made context for AI coding sessions.

Parameters:

Name Type Required Description
slug string yes Collection slug (e.g. "modern-rails-2024")

Example response:

{
  "name": "Modern Rails 2024",
  "slug": "modern-rails-2024",
  "description": "The essential stack for new Rails projects",
  "llm_prompt": "Build a Rails 8 app with these technologies...",
  "stacks": [
    { "name": "Ruby on Rails", "category": "Framework", "note": "Use Rails 8 with Solid Queue" },
    { "name": "PostgreSQL", "category": "Database", "note": null }
  ],
  "builtonrails_url": "https://builtonrails.com/collections/modern-rails-2024"
}

Tools — Submissions

submit_product

Submit a new Rails application to the directory. Created with "pending" status — goes through admin approval. Pasting your dependency files (gemfile / package_json / importmap) is the recommended path: the real stack is detected and attached automatically, and verified stacks are the whole point of the directory.

Parameters:

Name Type Required Description
name string yes Product name (e.g. "Shopify")
url string yes Product website URL
description string yes Short description
product_type string no Type: SaaS, DevTool, Gem, Marketplace, E-commerce, Fintech, Template, and more
stacks array of strings no Stack names to associate (e.g. ["PostgreSQL", "Sidekiq"])
gemfile string no Raw Gemfile content — stacks auto-detected and attached
package_json string no Raw package.json content — stacks auto-detected and attached
importmap string no Raw config/importmap.rb content — stacks auto-detected and attached

Example response:

{
  "status": "submitted",
  "message": "Product submitted for admin approval",
  "product": {
    "name": "My App",
    "slug": "my-app",
    "status": "pending",
    "stacks_attached": 3
  }
}

Tools — News

get_news

Read curated Rails ecosystem news — the same pipeline behind builtonrails.com/daily.

Parameters:

Name Type Required Description
category string no article, release, podcast, video, news
date string no Specific day, YYYY-MM-DD
query string no Search term matched against title and summary
limit integer no Max results (default 15, max 50)

Tools — Owners (write-scope key required)

my_product

Manage your own products conversationally. Requires a write-scope API key sent as a Bearer token; you can only touch products you submitted or founded (via the product team).

Actions:

Action Description
list Your products with votes, views, and update counts
update Edit a product by slug: description, url, product_type, tags, github_repo_path (linking a GitHub repo auto-syncs its stacks)
post_update Publish a product update: title + update_type (release, feature, announcement, blog, video, milestone …), optional content, url, version
updates A product's 20 most recent updates

Status and featuring stay admin-only — update refuses them, and unowned slugs return an error.


Example Prompts

Once connected, ask your AI natural questions. It will call the right tools automatically:

  • "What background job library should I use with PostgreSQL and Hotwire?" — calls get_stack_recommendations
  • "Compare Devise vs Rodauth for authentication" — calls compare_stacks
  • "Show me production Rails apps using Solid Queue and Turbo" — calls get_products_using_stacks
  • "Is Solid Queue adoption growing?" — calls get_stack_trends
  • "What testing libraries are most popular for Rails?" — calls search_stacks
  • "Get the modern-rails-2024 collection" — calls get_collection
  • "What stacks does Shopify use?" — calls get_product
  • "Find the top Rails SaaS apps" — calls search_products
  • "Scan my Gemfile and tell me what stacks I'm using" — calls detect_stacks
  • "What categories of stacks do you track?" — calls get_categories
  • "What's new in Rails this week?" — calls get_news
  • "Submit my Rails app to the directory" — calls submit_product
  • "Post a release note for my app: v2.1 shipped" — calls my_product (write key)

Tools — Admin (Bearer token required)

admin_moderation

Moderate the directory over MCP. Requires an admin API key sent as a Bearer token — the same keys as the internal API. Without a valid admin token the tool refuses.

Actions: pending (review queue), approve / reject (by product slug), feature / unfeature, stats.

Configure your MCP client to send the header:

Authorization: Bearer <your-admin-api-key>

admin_news

Batch-review the curated news queue (the pipeline behind /daily and the newsletter).

Actions: queue (list pending items; filter by feed name or query), select / reject (batch by ids, max 100 per call), stats (queue counts by status and feed).

admin_sponsors

Manage site sponsors end to end.

Actions: list (with impressions/clicks/CTR), create / update (name, url, position, tagline, cta_text, starts_at, ends_at), activate / deactivate, inquiries + inquiry_status (pending → contacted → converted/declined), orders (self-serve Stripe orders).

REST

Traditional REST endpoints. Requires an API key — get one from your API Keys page.

REST API

Programmatic access to the BuiltOnRails directory. Query stacks, detect dependencies, and export collections.

Base URL: https://builtonrails.com/api/v1

Authentication

All endpoints require an API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" https://builtonrails.com/api/v1/stacks

Get your API key by signing in and visiting the API Keys page. Free tier: 100 requests/hour.


Stacks

List All Stacks

GET /api/v1/stacks

Parameters:

Name Type Description
category string Filter by category (e.g. "Framework", "Database")
featured boolean Only featured stacks

Example response:

{
  "stacks": [
    {
      "id": 1,
      "name": "Devise",
      "slug": "devise",
      "description": "Flexible authentication solution for Rails",
      "category": "authentication",
      "website_url": "https://github.com/heartcombo/devise",
      "products_count": 42
    }
  ],
  "meta": { "total": 150, "page": 1, "per_page": 25 }
}

Get Stack

GET /api/v1/stacks/:slug

Returns details for a specific stack including related products and collections.

List Categories

GET /api/v1/stacks/categories

Returns all available stack categories with counts.

{
  "categories": [
    { "name": "authentication", "count": 12 },
    { "name": "background_jobs", "count": 8 },
    { "name": "payments", "count": 15 }
  ]
}

Detect Stacks

POST /api/v1/stacks/detect

Detect stacks from a Gemfile or package.json. Three input options:

Option Type Description
github_repo string Repo full name (e.g. "owner/repo"). Uses your connected GitHub account — works with private repos.
github_url string Public GitHub repo URL. No GitHub connection needed.
content string Raw Gemfile or package.json content.
curl -X POST https://builtonrails.com/api/v1/stacks/detect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"github_repo": "mycompany/my-private-app"}'

Pro tip: Connect your GitHub account in Settings to analyze private repos.

List GitHub Repos

GET /api/v1/stacks/repos

List your GitHub repos (requires connected GitHub account). Use this to select which repo to analyze.

Stack Products

GET /api/v1/stacks/:id/products

Returns products using a specific stack.


Collections

List Collections

GET /api/v1/collections

Parameters:

Name Type Description
featured boolean Only featured collections
sort string "popular" or "recent"

Get Collection

GET /api/v1/collections/:slug

Returns a collection with all stacks. Supports ?format=markdown for LLM prompts.

{
  "collection": {
    "id": 5,
    "name": "My Rails 8 Stack",
    "slug": "my-rails-8-stack",
    "description": "Essential gems for new Rails 8 projects",
    "member": { "username": "naumantariq", "name": "Nauman Tariq" },
    "stacks": [
      { "name": "Devise", "slug": "devise" },
      { "name": "Sidekiq", "slug": "sidekiq" }
    ],
    "likes_count": 42
  }
}

Products

List Products

GET /api/v1/products

Parameters:

Name Type Description
type string Filter by product type (e.g. "SaaS", "Gem")
sort string Sort order: "votes" (most upvoted) or default (newest)
page integer Page number (default: 1)

Scope behavior:
- Read scope: Returns approved products only
- Write scope: Also includes your own products (any status)

Example response:

{
  "data": [
    {
      "id": 1,
      "name": "Shopify",
      "slug": "shopify",
      "url": "https://shopify.com",
      "status": "approved",
      "product_type": "SaaS",
      "votes_count": 127,
      "created_at": "2025-06-15T12:00:00Z"
    }
  ],
  "meta": { "total": 250, "page": 1, "per_page": 25 }
}

Get Product

GET /api/v1/products/:slug

Returns detailed product info including description, tags, member, and stacks.

{
  "data": {
    "id": 1,
    "name": "Shopify",
    "slug": "shopify",
    "url": "https://shopify.com",
    "status": "approved",
    "product_type": "SaaS",
    "votes_count": 127,
    "description": "Commerce platform built on Rails",
    "tags": ["ecommerce", "saas"],
    "verified": true,
    "featured": true,
    "member": { "username": "tobi", "display_name": "Tobi Lutke" },
    "stacks": [
      { "id": 1, "name": "PostgreSQL", "category": "Database" },
      { "id": 2, "name": "Sidekiq", "category": "Background" }
    ],
    "created_at": "2025-06-15T12:00:00Z"
  }
}

Create Product

POST /api/v1/products

Requires: Write scope

Create a new product (status: pending, goes through same approval workflow as web).

Name Type Required Description
name string yes Product name
url string yes Product website URL
description string yes Product description
product_type string no Type (SaaS, Gem, etc.)
tags_string string no Comma-separated tags
stack_ids array no Array of stack IDs to associate
curl -X POST https://builtonrails.com/api/v1/products \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My App", "url": "https://myapp.com", "description": "A cool Rails app"}'

Product Updates

List Updates

GET /api/v1/products/:slug/updates

Returns updates/releases for a product, newest first.

{
  "data": [
    {
      "id": 1,
      "update_type": "release",
      "title": "v2.0 Launch",
      "content": "Major redesign with new features",
      "version": "2.0.0",
      "url": "https://blog.example.com/v2",
      "created_at": "2026-03-01T12:00:00Z"
    }
  ],
  "meta": { "total": 5, "page": 1, "per_page": 25 }
}

Create Update

POST /api/v1/products/:slug/updates

Requires: Write scope + product ownership

Name Type Required Description
update_type string yes Type: release, update, feature, blog, video, announcement, milestone, listing, episode, issue
title string yes Update title
content string no Description/body
version string no Version number (for releases)
url string no Link to blog/video
curl -X POST https://builtonrails.com/api/v1/products/my-app/updates \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"update_type": "release", "title": "v2.0", "version": "2.0.0", "content": "Major update"}'

Product Stacks

List Product Stacks

GET /api/v1/product_stacks

Returns product-stack associations with approval status.

Submit Product Stack

POST /api/v1/product_stacks

Requires: Write scope

Submit a product-stack association (goes through approval workflow).

Name Type Required Description
product_id integer yes Product ID
stack_id integer yes Stack ID

Errors

All errors follow a consistent format:

{
  "error": {
    "code": "not_found",
    "message": "Stack not found",
    "status": 404
  }
}
Code Description
401 Unauthorized (missing/invalid API key)
404 Resource not found
429 Rate limit exceeded
500 Server error

Learn More

Ready to Build?

Connect MCP or get your API key and start integrating.

Get API Key