# hangar_create_project

Create a project (or reuse it if this key already reaches one with that slug). With data: true, also enable the Postgres data layer in PREVIEW and wait until it is ready (can take a few minutes; if it times out, call again — it continues). The production data layer is enabled by a person in the console, not by this tool. Returns the preview/production URLs and, with data, the preview apiUrl + anonKey to put in the app's env before building. Nothing is published. Slug rules: lowercase a-z, 0-9 and "-", at most 63 characters, starting and ending with a letter or digit; unique across all of Hangar (the slug is the site address); must not end in "-preview" (that is the preview address); and must not be a reserved name (e.g. www, api, admin, console, login, docs, …) or contain hangar/2tl/thecommit. / slug 는 소문자·숫자·"-" 63자 이내, Hangar 전체에서 유일(사이트 주소), "-preview" 로 끝나면 안 되고, 주요 예약어(예: www, api, admin, console, login, docs, …)와 hangar·2tl·thecommit 이 들어간 이름은 쓸 수 없습니다.

Agent View of the PolicyLayer registry record for `hangar_create_project`. HTML page: https://policylayer.com/tools/2tl-hangar-mcp/hangar-create-project

## Facts

- Tool: `hangar_create_project`
- Server: Hangar (`@2tl/hangar-mcp`) — https://policylayer.com/tools/2tl-hangar-mcp.md
- Install: `npx -y @2tl/hangar-mcp`
- Homepage: https://www.npmjs.com/package/@2tl/hangar-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 3 (1 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | boolean | no | Enable the data layer (database + auth) in preview. Default false. The production data layer is enabled by a person in the console, not by this tool. |
| `name` | string | no | Display name (default: the slug). |
| `slug` | string | yes | Project slug (= site address). / 프로젝트 slug (사이트 주소) |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "hangar_create_project",
    "arguments": {
      "slug": "<slug>"
    }
  }
}
```

## Why hangar_create_project is rated Medium

An AI agent can call hangar_create_project faster than any human can review: one bad instruction and it creates or modifies resources in Hangar by the hundred, each call as confident as the last.

Risk signals: Admin/system-level operation

## Use case

AI agents use hangar_create_project to create or update resources in Hangar, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Hangar environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Hangar:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "hangar_create_project": {
      "limits": [
        {
          "counter": "hangar_create_project_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Hangar (10)

- `hangar_whoami` — Destructive — https://policylayer.com/tools/2tl-hangar-mcp/hangar-whoami.md
- `hangar_job_runs` — Execute — https://policylayer.com/tools/2tl-hangar-mcp/hangar-job-runs.md
- `hangar_check_project` — Read — https://policylayer.com/tools/2tl-hangar-mcp/hangar-check-project.md
- `hangar_get_data_keys` — Read — https://policylayer.com/tools/2tl-hangar-mcp/hangar-get-data-keys.md
- `hangar_list_jobs` — Read — https://policylayer.com/tools/2tl-hangar-mcp/hangar-list-jobs.md
- `hangar_list_projects` — Read — https://policylayer.com/tools/2tl-hangar-mcp/hangar-list-projects.md
- `hangar_production_handoff` — Read — https://policylayer.com/tools/2tl-hangar-mcp/hangar-production-handoff.md
- `hangar_release_status` — Read — https://policylayer.com/tools/2tl-hangar-mcp/hangar-release-status.md
- `hangar_activate_preview` — Write — https://policylayer.com/tools/2tl-hangar-mcp/hangar-activate-preview.md
- `hangar_publish` — Write — https://policylayer.com/tools/2tl-hangar-mcp/hangar-publish.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=2tl-hangar-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/2tl-hangar-mcp
