# MCP tools

Every tool of the Wisp MCP server at https://wispfn.com/api/mcp, with its arguments and required scope.

Endpoint: `https://wispfn.com/api/mcp` (Streamable HTTP, JSON responses). Authenticate with `Authorization: Bearer wisp_sk_...`. Setup: [Wisp MCP server](/wisp-mcp-server).

`project` arguments accept a project id (`p...`) or address (`my-api`). `endpoint` arguments accept a name (`orders`) or id (`e...`).

## list_projects

No arguments. Scope `projects:read`.

## create_project

| Argument | Type |
| --- | --- |
| `name` | string, 1–60 characters |
| `language` | `javascript` \| `python` \| null |

Scope `projects:write`.

## get_project

`project`. Returns its functions (with their HTTP, MCP and schedule settings), URLs and variable/secret names. Scope `projects:read`.

## get_function

`project`, `function`. Returns the code and settings. Scope `functions:read`.

## create_function

| Argument | Type | Default |
| --- | --- | --- |
| `project` | string | — |
| `name` | string | — (`before`/`after` create the [special functions](/before-and-after)) |
| `code` | string | — |
| `http` | boolean | `true` |
| `method` | `GET` \| `POST` \| `PUT` \| `PATCH` \| `DELETE` \| null | `GET` (`POST` without HTTP) |
| `language` | `javascript` \| `python` \| null | project's |
| `description` | string | `""` |
| `input_schema` | object \| null | `null` |
| `output_schema` | object \| null | `null` |
| `visibility` | `public` \| `private` \| `internal` | `public` |
| `mcp` | boolean \| null | public HTTP functions |

Returns the new draft version, `functionId` and, for HTTP functions, a `testUrl`. Scope `functions:write`.

## update_function

| Argument | Type | Description |
| --- | --- | --- |
| `project`, `function` | string | — |
| `code` | string \| null | Complete new code |
| `edits` | `[{ old_text, new_text }]` | Targeted replacements |
| `name`, `method`, `description`, `visibility` | \| null | New values |
| `http`, `mcp`, `before_after` | boolean \| null | Expose over HTTP, offer as an MCP tool, run before/after |
| `input_schema`, `output_schema` | object \| null | New schemas |
| `schedule` | object \| null | `{ cron, timezone, description, enabled }`; `remove_schedule: true` removes it |
| `cache_seconds` | number \| null | Edge caching for GET functions (0 turns it off) |

Scope `functions:write`.

## delete_function

`project`, `function`. Scope `functions:write`.

## set_config

| Argument | Type |
| --- | --- |
| `project` | string |
| `name` | `UPPER_SNAKE_CASE` |
| `kind` | `variable` \| `secret` |
| `value` | string |
| `description` | string |

Scope `config:write`.

## delete_config

`project`, `name`. Scope `config:write`.

## set_mcp_server

`project`, `enabled` (boolean). Scope `projects:write`.

## publish

`project`, `version` (number or null for the draft). Scope `projects:deploy`.

## invoke_function

| Argument | Type | Default |
| --- | --- | --- |
| `project`, `function` | string | — |
| `mode` | `test` \| `live` | `test` |
| `method` | string \| null | the function's |
| `subpath` | string | `""` |
| `query`, `headers` | object | `{}` |
| `body` | string \| null | raw body |

Runs any function — private ones and those without HTTP too (their input is the body). Scope `functions:invoke`. Uses Run credits.

## get_logs

| Argument | Type | Default |
| --- | --- | --- |
| `project` | string | — |
| `function` | string \| null | all |
| `status` | `2xx` \| `4xx` \| `5xx` \| `errors` \| null | all |
| `search` | string \| null | — |
| `limit` | 1–50 | 10 |

Scope `logs:read`.

## ask_wisp

`project`, `message`. Runs a full assistant turn and returns its reply, the changes and the new draft version. Scope `assistant:chat`. Uses AI credits.
