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 c...
This record as markdown: /tools/2tl-hangar-mcp/hangar-create-project.md
What hangar_create_project does on Hangar
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | boolean | — | 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 | — | Display name (default: the slug). |
slug | string | Yes | Project slug (= site address). / 프로젝트 slug (사이트 주소) |
Parameters from the server's own tool schema.
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 signalsAdmin/system-level operation
Attacks that exploit this kind of access
The rule that runs hangar_create_project safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Hangar, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For hangar_create_project, this is the rule to start with:
hangar_create_project stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Hangar, apply this rule, and every hangar_create_project call is checked against it from then on.
Questions about 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 이 들어간 이름은 쓸 수 없습니다. It is categorised as a Write tool in the Hangar MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
hangar_create_project accepts 3 parameters: data, name, slug. Required: slug. The full parameter table on this page comes from the server's own tool schema.
Register the Hangar MCP server in PolicyLayer and add a rule for hangar_create_project: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Hangar. Nothing to install.
hangar_create_project is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the hangar_create_project rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for hangar_create_project. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
hangar_create_project is provided by the Hangar MCP server (@2tl/hangar-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Hangar, and thousands of servers like it.
This server
Across the catalogue