---
title: "Return the GitHub HTTPS clone URL for an existing vault. Authentication is via the user's normal GitHub credentials (PAT or gh CLI)."
method: POST
path: "/api/mcp/tools/vault_clone"
tags: ["vaults"]
---

# Return the GitHub HTTPS clone URL for an existing vault. Authentication is via the user's normal GitHub credentials (PAT or gh CLI).

`POST /api/mcp/tools/vault_clone`

## Request

- Base URL: `https://api.ainote.dev`
- URL: `https://api.ainote.dev/api/mcp/tools/vault_clone`
- Auth: API key in header `Authorization`

Return the GitHub HTTPS clone URL for an existing vault. Authentication is via the user's normal GitHub credentials (PAT or gh CLI).

## Request body

- object
  - `name` string, required: Vault name or slug.
  - `target_path` string: Preferred local clone path for the returned instructions.

## Response `200`

Tool executed successfully

- ToolSuccessResponse: Successful tool invocation. `content` mirrors the MCP `tools/call` result shape: an array of content blocks (text and optionally a structured resource payload).
  - `content` object[]
    - `type` 'text' | 'resource'
    - `text` string

## Other responses

- `400`: Invalid arguments or business-rule violation
- `401`: Missing or invalid McpKey

---

[API](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror.md) · [All operations](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/llms.txt) · [OpenAPI document](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/revisions/f6c91d85e027?raw)
