# Installing Hub Content

> How to browse, install, and configure MCP servers, Skills, and Functions from the Aerostack Hub.

The Hub provides three types of installable content: **MCP servers**, **Skills**, and **Functions**. This page covers how to find, install, and configure each one.

---

## Browsing the Hub

You can discover content in two ways:

- **Hub website** -- Visit [hub.aerostack.dev](https://hub.aerostack.dev) to search and filter by type (MCP, Skill, Function), category, and tags.
- **Admin dashboard** -- In the [Admin](https://app.aerostack.dev), go to the marketplace section to browse and install directly into your workspace.

Each listing shows the name, description, author, install count, and a README with usage instructions.

---

## Installing Functions

Functions are copied into your project as source code. You own the files and can modify them freely.

1. **Find the function**

   Browse [hub.aerostack.dev](https://hub.aerostack.dev) or search by name:

   ```bash
   aerostack functions search rate-limiter
   ```

2. **Install with the CLI**

   Use the `functions install` command with a slug or `author/slug`:

   ```bash
   aerostack functions install rate-limiter
   # Or with a specific author:
   aerostack functions install alice/rate-limiter
   ```

   When you use only a slug, the registry resolves to the most popular matching function. Use `author/slug` when you want a specific author's version.

3. **Review the installed files**

   The CLI writes source files to `services/<slug>/` in your project and registers the function in `aerostack.toml`:

   ```
   your-project/
     services/
       rate-limiter/
         index.ts        # Function source code
         README.md       # Usage instructions (if provided)
     aerostack.toml      # Updated with the new service entry
   ```

4. **Configure environment variables**

   Check the function's README or `aerostack.json` for required environment variables. Add them to your `.dev.vars` file for local development and set them via `aerostack secrets set` for production.

  **You own the code.** Installed functions are plain source files in your project. Edit them, extend them, or use them as a starting point for your own logic.

### Updating an installed function

Because functions are copied as source, there is no automatic update mechanism. To pull a newer version:

```bash
aerostack functions install rate-limiter
```

This overwrites the files in `services/rate-limiter/`. Make sure you commit or stash any local changes first.

---

## Installing MCP Servers

MCP servers connect external services (GitHub, Stripe, Slack, etc.) to your workspace so AI agents can call their tools.

1. **Find the MCP server**

   Browse the Hub or the MCP section of the [Admin dashboard](https://app.aerostack.dev). Each listing shows the available tools and required configuration.

2. **Add to your workspace**

   From the Admin dashboard, click **Add to Workspace** on any MCP server listing. Or use the CLI:

   ```bash
   aerostack mcp install github
   ```

3. **Configure credentials**

   Most MCP servers require an API key or OAuth token for the external service. Add these in your workspace settings under the MCP server's configuration panel.

4. **Verify the connection**

   Once configured, the MCP server's tools appear in your workspace. Any AI bot or agent connected to that workspace can call them immediately.

---

## Installing Skills

Skills are pre-built workflows (scheduled tasks, event handlers) that you can add to your workspace.

1. **Browse available skills**

   Visit the Skills section on [hub.aerostack.dev](https://hub.aerostack.dev) or browse in the Admin dashboard.

2. **Install the skill**

   From the Admin dashboard, click **Install** on the skill listing. This deploys the skill worker and connects it to your workspace.

3. **Configure triggers and secrets**

   Each skill has its own configuration: cron schedules, webhook URLs, API keys for external services. Set these in the skill's settings panel after installation.

---

## Finding content by category

The Hub organizes content into categories to help you find what you need:

| Category | What to expect |
|---|---|
| **auth** | Social logins, OTP, session management |
| **payments** | Stripe integration, subscription handling |
| **ai** | Prompt templates, vector search, RAG pipelines |
| **media** | Image processing, file conversion, CDN tools |
| **email** | Transactional email, templates, newsletter tools |
| **database** | Migration helpers, query builders, seed data |
| **utility** | Rate limiting, slugify, validation, data transforms |
| **analytics** | Event tracking, dashboards, reporting |
| **notifications** | Push notifications, SMS, in-app messaging |
| **storage** | File uploads, storage helpers, asset management |
