diff --git a/app/src/ui/components/code/JsonViewer.tsx b/app/src/ui/components/code/JsonViewer.tsx index b78890f..6c75bea 100644 --- a/app/src/ui/components/code/JsonViewer.tsx +++ b/app/src/ui/components/code/JsonViewer.tsx @@ -42,7 +42,7 @@ export const JsonViewer = ({ copyIconProps = {}, className, }: JsonViewerProps) => { - const size = showSize ? (json === null ? 0 : JSON.stringify(json).length) : undefined; + const size = showSize ? (!json ? 0 : JSON.stringify(json).length) : undefined; const formattedSize = formatNumber.fileSize(size ?? 0); const showContext = size || title || showCopy; diff --git a/app/src/ui/layouts/AppShell/AppShell.tsx b/app/src/ui/layouts/AppShell/AppShell.tsx index 8510695..687c08c 100644 --- a/app/src/ui/layouts/AppShell/AppShell.tsx +++ b/app/src/ui/layouts/AppShell/AppShell.tsx @@ -218,6 +218,7 @@ const SidebarResize = ({ return (
state.feature); const setFeature = useMcpStore((state) => state.setFeature); diff --git a/app/src/ui/routes/tools/mcp/state.ts b/app/src/ui/routes/tools/mcp/state.ts index 85a584a..877f324 100644 --- a/app/src/ui/routes/tools/mcp/state.ts +++ b/app/src/ui/routes/tools/mcp/state.ts @@ -14,7 +14,7 @@ export const useMcpStore = create( content: null as ToolJson | null, history: [] as { type: "request" | "response"; data: any }[], historyLimit: 50, - historyVisible: true, + historyVisible: false, }, (set) => ({ setTools: (tools: ToolJson[]) => set({ tools }), diff --git a/app/src/ui/routes/tools/mcp/tools.tsx b/app/src/ui/routes/tools/mcp/tools.tsx index e16bd79..dbd92ab 100644 --- a/app/src/ui/routes/tools/mcp/tools.tsx +++ b/app/src/ui/routes/tools/mcp/tools.tsx @@ -128,83 +128,82 @@ export function Content() { } catch (e) {} return ( -
-
{ - setPayload(value); - }} - onSubmit={handleSubmit} - > - - setHistoryVisible(!historyVisible)} - /> - -
- } - > - - - Tools / - {" "} - {content?.name} - - -
-
- -
-

{content?.description}

- - {hasInputSchema && } - -
-
+ { + setPayload(value); + }} + onSubmit={handleSubmit} + > + + setHistoryVisible(!historyVisible)} + /> +
- {historyVisible && ( - - - - )} + } + > + + + Tools / + {" "} + {content?.name} + + +
+
+ +
+

{content?.description}

+ + {hasInputSchema && } + +
+
- -
+ {historyVisible && ( + + + + )} +
+ ); } diff --git a/docs/components/McpTool.tsx b/docs/components/McpTool.tsx index a99087e..cee4003 100644 --- a/docs/components/McpTool.tsx +++ b/docs/components/McpTool.tsx @@ -21,6 +21,29 @@ export function McpTool({ tool }: { tool: ReturnType }) { ); } +const getType = (value: JSONSchemaDefinition) => { + if (value === undefined || value === null) { + return "any"; + } + + if (value.type) { + if (Array.isArray(value.type)) { + return value.type.join(" | "); + } + return value.type; + } + + if ("anyOf" in value) { + return value.anyOf.map(getType).join(" | "); + } + + if ("oneOf" in value) { + return value.oneOf.map(getType).join(" | "); + } + + return "any"; +}; + export function JsonSchemaTypeTable({ schema }: { schema: JSONSchemaDefinition }) { const properties = schema.properties ?? {}; const required = schema.required ?? []; @@ -44,8 +67,8 @@ export function JsonSchemaTypeTable({ schema }: { schema: JSONSchemaDefinition } typeDescription: ( ), - type: value.type, - default: value.default ? JSON.stringify(value.default) : undefined, + type: getType(value), + default: value.default !== undefined ? JSON.stringify(value.default) : undefined, required: required.includes(key), }, ]), diff --git a/docs/components/misc/Wrapper.tsx b/docs/components/misc/Wrapper.tsx new file mode 100644 index 0000000..d72c875 --- /dev/null +++ b/docs/components/misc/Wrapper.tsx @@ -0,0 +1,16 @@ +import { cn } from "@/lib/cn"; +import type { HTMLAttributes } from "react"; + +export function Wrapper(props: HTMLAttributes) { + return ( +
+ {props.children} +
+ ); +} diff --git a/docs/content/docs/(documentation)/meta.json b/docs/content/docs/(documentation)/meta.json index bcd6ef0..b2d5db7 100644 --- a/docs/content/docs/(documentation)/meta.json +++ b/docs/content/docs/(documentation)/meta.json @@ -15,6 +15,7 @@ "./usage/sdk", "./usage/react", "./usage/elements", + "./usage/mcp/", "---Extending---", "./extending/config", "./extending/events", diff --git a/docs/content/docs/(documentation)/modules/server/overview.mdx b/docs/content/docs/(documentation)/modules/server.mdx similarity index 100% rename from docs/content/docs/(documentation)/modules/server/overview.mdx rename to docs/content/docs/(documentation)/modules/server.mdx diff --git a/docs/content/docs/(documentation)/modules/server/meta.json b/docs/content/docs/(documentation)/modules/server/meta.json deleted file mode 100644 index 29f47f5..0000000 --- a/docs/content/docs/(documentation)/modules/server/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "pages": ["overview", "mcp"] -} diff --git a/docs/content/docs/(documentation)/usage/mcp/meta.json b/docs/content/docs/(documentation)/usage/mcp/meta.json new file mode 100644 index 0000000..b85e570 --- /dev/null +++ b/docs/content/docs/(documentation)/usage/mcp/meta.json @@ -0,0 +1,4 @@ +{ + "title": "MCP", + "pages": ["overview", "tools-resources"] +} diff --git a/docs/content/docs/(documentation)/usage/mcp/overview.mdx b/docs/content/docs/(documentation)/usage/mcp/overview.mdx new file mode 100644 index 0000000..9085814 --- /dev/null +++ b/docs/content/docs/(documentation)/usage/mcp/overview.mdx @@ -0,0 +1,208 @@ +--- +title: "Overview" +description: "Built-in full featured MCP server." +tags: ["documentation"] +--- +import { ImageZoom } from "fumadocs-ui/components/image-zoom"; +import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'; + + + + The MCP server is currently experimental and may change in the future. During this period, it is disabled by default. To stabilize it, and make **bknd MCP native**, all configuration changes you can make today with the integrated Admin UI will be migrated to use the MCP server. + + +bknd includes a fully featured MCP server that can be used to interact with the bknd instance. It uses a lightweight MCP implementation that works in any environment bknd works in. Unlike other MCP servers, the exposed tools and resources are mainly dynamically generated from the schema, extracted from defined hono routes, and manually defined ones. This means exposed tools and resources are always up to date, and requires little overhead to maintain. + +- Fully featured, always up to date MCP server natively integrated with bknd +- Integrated MCP UI accessible from the Admin UI +- Built-in MCP client directly usable from your app instance +- CLI command to run an MCP server on stdio transport + + +## Integrated MCP UI + + +Once enabled, you can access the MCP UI at `/mcp` or choose "MCP" from the top right user menu. + +## Enable MCP + +If you're using `initialConfig`, you can enable the MCP server by setting the `server.mcp.enabled` property to `true`. + +```typescript +import type { BkndConfig } from "bknd"; + +export default { + initialConfig: { + server: { + mcp: { + enabled: true, + } + } + } +} satisfies BkndConfig; +``` + +Using the Admin UI, you can either navigate to `/settings/server` or click top right on the user menu, select "Settings", then "Server". Enable the MCP server by checking the "Enabled" checkbox under "Mcp". + +## Using the MCP Client + +The implementation is closely following the [MCP spec 2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18) powered by [jsonv-ts](https://github.com/jsonv-ts/jsonv-ts), therefore any spec compliant client will work. However, there is a built-in MCP client: + +```typescript +import { McpClient } from "bknd/utils"; + +const client = new McpClient({ + url: "http://localhost:1337/mcp", +}); +``` + +Alternatively, similar to the `getApi` function, you can use the `getMcpClient` function to get the client from your app instance that doesn't travel through the network. + +```typescript +import { createApp } from "bknd"; + +const app = createApp(); +const client = app.getMcpClient(); +``` + +Unlike the official spec requires, there is no initialization required, but supported. Without connecting, initialization or fetching the list of tools, you can directly call them. For example, you could fetch a list of `posts`: + +```typescript +const result = await client.callTool({ + name: "data_entity_read_many", + arguments: { + entity: "posts", + limit: 3, + select: ["id", "title"], + }, +}); +// { +// data: [ +// { id: 1, title: "Post 1" }, +// { id: 2, title: "Post 2" }, +// { id: 3, title: "Post 3" } +// ], +// } +``` + +Refer to the [jsonv-ts docs](https://github.com/dswbx/jsonv-ts#mcp-client) for more information. + +## STDIO Transport + +To start an MCP server on stdio transport, you can use the `mcp` CLI command. This is useful when you want to use it with IDEs or other tools that support stdio transport. + +```bash +npx bknd mcp +``` + +If you want have the Streamable HTTP endpoint disabled, you can still use the STDIO transport by passing the `--force` option. + +```bash +npx bknd mcp --force +``` + +## Usage in external tools + +You can also use the MCP server in external tools, such as VS Code, Cursor, or other IDEs that support MCP. This list is not exhaustive, and will be updated. + + + +Go to: `Settings` -> `Cursor Settings` -> `Tools & Integrations` -> `Add a custom MCP server` + +Pasting the following config into your Cursor `~/.cursor/mcp.json` file is the recommended approach. You can also install in a specific project by creating `.cursor/mcp.json` in your project folder. See [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) for more info. + +```json tab="Local" +{ + "mcpServers": { + "bknd": { + "command": "npx", + "args": ["-y", "bknd@latest", "mcp"] + } + } +} +``` + +```json tab="Remote" +{ + "mcpServers": { + "bknd": { + "url": "http://localhost:1337/mcp" + } + } +} +``` + + + +Add this to your VS Code MCP config. See [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more info. + +```json tab="Local" +{ + "servers": { + "bknd": { + "type": "stdio", + "command": "npx", + "args": ["-y", "bknd@latest", "mcp"] + } + } +} +``` + +```json tab="Remote" +{ + "servers": { + "bknd": { + "type": "http", + "url": "http://localhost:1337/mcp" + } + } +} +``` + + + +Add this to your Claude Desktop `claude_desktop_config.json` file. See [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) for more info. + +```json title="claude_desktop_config.json" +{ + "mcpServers": { + "bknd": { + "command": "npx", + "args": ["-y", "bknd@latest", "mcp"] + } + } +} +``` + + + +If a tool you're using is not listed here, please let us know by [opening an issue](https://github.com/bknd-dev/bknd/issues/new) or [contacting us on Discord](https://discord.com/invite/Qjz9nNHYTB). + +## Authentication + +Both the Streamable HTTP and STDIO transport support authentication. The same authentication mechanism as the API is used, so permissions work the exact same way. + +When using the Streamable HTTP transport, you can pass the `Authorization` header to the client. + +```typescript +const client = new McpClient({ + url: "http://localhost:1337/mcp", + headers: { + Authorization: `Bearer ${token}`, + }, +}); +``` + +When using the STDIO transport, you can pass an `--token` option to the CLI command. + +```bash +npx bknd mcp --token +``` + +Alternatively, you can also use the `BEARER_TOKEN` environment variable. + +```bash +BEARER_TOKEN= npx bknd mcp +``` diff --git a/docs/content/docs/(documentation)/modules/server/mcp.mdx b/docs/content/docs/(documentation)/usage/mcp/tools-resources.mdx similarity index 55% rename from docs/content/docs/(documentation)/modules/server/mcp.mdx rename to docs/content/docs/(documentation)/usage/mcp/tools-resources.mdx index 437c024..6cb798e 100644 --- a/docs/content/docs/(documentation)/modules/server/mcp.mdx +++ b/docs/content/docs/(documentation)/usage/mcp/tools-resources.mdx @@ -1,6 +1,6 @@ --- title: "MCP" -description: "Built-in full featured MCP server." +description: "Tools & Resources of the built-in full featured MCP server." tags: ["documentation"] --- import { JsonSchemaTypeTable } from '@/components/McpTool'; @@ -8,354 +8,348 @@ import { JsonSchemaTypeTable } from '@/components/McpTool'; ## Tools -### data_sync - -Sync database schema - - - -### data_entity_fn_count - -Count entities - - - -### data_entity_fn_exists - -Check if entity exists - - - -### data_entity_read_one - -Read one - - - -### data_entity_read_many - -Query entities - - - -### data_entity_insert - -Insert one or many - - - -### data_entity_update_many - -Update many - - - -### data_entity_update_one - -Update one - - - -### data_entity_delete_one - -Delete one - - - -### data_entity_delete_many - -Delete many - - - -### data_entity_info - -Retrieve entity info - - - -### auth_me +### `auth_me` Get the current user -### auth_strategies +### `auth_strategies` Get the available authentication strategies -### system_config - -Get the config for a module - - - -### system_build - -Build the app - - - -### system_ping - -Ping the server - - - -### system_info - -Get the server info - - - -### auth_user_create +### `auth_user_create` Create a new user -### auth_user_token - -Get a user token - - - -### auth_user_password_change +### `auth_user_password_change` Change a user's password - + -### auth_user_password_test +### `auth_user_password_test` Test a user's password -### config_server_get +### `auth_user_token` -Get Server configuration +Get a user token - + -### config_server_update +### `data_entity_delete_many` -Update Server configuration +Delete many - + -### config_data_get +### `data_entity_delete_one` +Delete one + - +### `data_entity_fn_count` -### config_data_update +Count entities + +### `data_entity_fn_exists` - +Check if entity exists -### config_data_entities_get + +### `data_entity_info` +Retrieve entity info - + -### config_data_entities_add +### `data_entity_insert` +Insert one or many + - +### `data_entity_read_many` -### config_data_entities_update +Query entities + +### `data_entity_read_one` - +Read one -### config_data_entities_remove + +### `data_entity_update_many` +Update many - + -### config_data_relations_get +### `data_entity_update_one` +Update one + - +### `data_sync` -### config_data_relations_add +Sync database schema + +### `system_build` - +Build the app -### config_data_relations_update + +### `system_config` +Get the config for a module - + -### config_data_relations_remove +### `system_info` +Get the server info + - +### `system_ping` -### config_data_indices_get +Ping the server + - - - -### config_data_indices_add - - - - - -### config_data_indices_update - - - - - -### config_data_indices_remove - - - - - -### config_auth_get +### `config_auth_get` -### config_auth_update +### `config_auth_roles_add` - + -### config_auth_strategies_get - - - - - -### config_auth_strategies_add - - - - - -### config_auth_strategies_update - - - - - -### config_auth_strategies_remove - - - - - -### config_auth_roles_get +### `config_auth_roles_get` -### config_auth_roles_add +### `config_auth_roles_remove` - + -### config_auth_roles_update +### `config_auth_roles_update` - + -### config_auth_roles_remove +### `config_auth_strategies_add` - + -### config_media_get +### `config_auth_strategies_get` - + -### config_media_update +### `config_auth_strategies_remove` - + -### config_media_adapter_get +### `config_auth_strategies_update` + + + + + +### `config_auth_update` + + + + + +### `config_data_entities_add` + + + + + +### `config_data_entities_get` + + + + + +### `config_data_entities_remove` + + + + + +### `config_data_entities_update` + + + + + +### `config_data_get` + + + + + +### `config_data_indices_add` + + + + + +### `config_data_indices_get` + + + + + +### `config_data_indices_remove` + + + + + +### `config_data_relations_add` + + + + + +### `config_data_relations_get` + + + + + +### `config_data_relations_remove` + + + + + +### `config_data_relations_update` + + + + + +### `config_data_update` + + + + + +### `config_media_adapter_get` -### config_media_adapter_update +### `config_media_adapter_update` - + + +### `config_media_get` + + + + + +### `config_media_update` + + + + + +### `config_server_get` + +Get Server configuration + + + +### `config_server_update` + +Update Server configuration + + ## Resources -### data_entities +### `data_entities` Retrieve all entities -### data_relations +### `data_relations` Retrieve all relations -### data_indices +### `data_indices` Retrieve all indices -### system_config +### `system_config` -### system_config_module +### `system_config_module` -### system_schema +### `system_schema` -### system_schema_module +### `system_schema_module` diff --git a/docs/mcp.json b/docs/mcp.json index 6f50b5a..df16c4b 100644 --- a/docs/mcp.json +++ b/docs/mcp.json @@ -1,23 +1,187 @@ { "tools": [ { - "name": "data_sync", - "description": "Sync database schema", + "name": "auth_me", + "description": "Get the current user", + "inputSchema": { + "type": "object" + } + }, + { + "name": "auth_strategies", + "description": "Get the available authentication strategies", "inputSchema": { "type": "object", "properties": { - "force": { - "type": "boolean", - "$target": "query" - }, - "drop": { + "include_disabled": { "type": "boolean", "$target": "query" } } - }, - "annotations": { - "destructiveHint": true + } + }, + { + "name": "auth_user_create", + "description": "Create a new user", + "inputSchema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "minLength": 8 + }, + "role": { + "type": "string", + "enum": [] + } + }, + "required": [ + "email", + "password" + ] + } + }, + { + "name": "auth_user_password_change", + "description": "Change a user's password", + "inputSchema": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "number", + "title": "Integer" + }, + { + "type": "string", + "title": "UUID" + } + ] + }, + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "minLength": 8 + } + }, + "required": [ + "password" + ] + } + }, + { + "name": "auth_user_password_test", + "description": "Test a user's password", + "inputSchema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "minLength": 8 + } + }, + "required": [ + "email", + "password" + ] + } + }, + { + "name": "auth_user_token", + "description": "Get a user token", + "inputSchema": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "number", + "title": "Integer" + }, + { + "type": "string", + "title": "UUID" + } + ] + }, + "email": { + "type": "string", + "format": "email" + } + } + } + }, + { + "name": "data_entity_delete_many", + "description": "Delete many", + "inputSchema": { + "type": "object", + "required": [ + "entity", + "json" + ], + "properties": { + "entity": { + "type": "string", + "enum": [ + "users", + "media" + ], + "$target": "param" + }, + "json": { + "type": "object", + "$synthetic": true, + "$target": "json", + "properties": {} + } + } + } + }, + { + "name": "data_entity_delete_one", + "description": "Delete one", + "inputSchema": { + "type": "object", + "required": [ + "entity", + "id" + ], + "properties": { + "entity": { + "type": "string", + "enum": [ + "users", + "media" + ], + "$target": "param" + }, + "id": { + "anyOf": [ + { + "type": "number", + "title": "Integer" + }, + { + "type": "string", + "title": "UUID" + } + ], + "$target": "param" + } + } } }, { @@ -103,13 +267,33 @@ } }, { - "name": "data_entity_read_one", - "description": "Read one", + "name": "data_entity_info", + "description": "Retrieve entity info", + "inputSchema": { + "type": "object", + "required": [ + "entity" + ], + "properties": { + "entity": { + "type": "string", + "enum": [ + "users", + "media" + ], + "$target": "param" + } + } + } + }, + { + "name": "data_entity_insert", + "description": "Insert one or many", "inputSchema": { "type": "object", "required": [ "entity", - "id" + "json" ], "properties": { "entity": { @@ -120,35 +304,22 @@ ], "$target": "param" }, - "id": { + "json": { "anyOf": [ { - "type": "number", - "title": "Integer" + "type": "object", + "properties": {} }, { - "type": "string", - "title": "UUID" + "type": "array", + "items": { + "type": "object", + "properties": {} + } } ], - "$target": "param" - }, - "offset": { - "type": "number", - "default": 0, - "$target": "query" - }, - "sort": { - "type": "string", - "default": "id", - "$target": "query" - }, - "select": { - "type": "array", - "$target": "query", - "items": { - "type": "string" - } + "$synthetic": true, + "$target": "json" } } } @@ -229,13 +400,13 @@ } }, { - "name": "data_entity_insert", - "description": "Insert one or many", + "name": "data_entity_read_one", + "description": "Read one", "inputSchema": { "type": "object", "required": [ "entity", - "json" + "id" ], "properties": { "entity": { @@ -246,22 +417,35 @@ ], "$target": "param" }, - "json": { + "id": { "anyOf": [ { - "type": "object", - "properties": {} + "type": "number", + "title": "Integer" }, { - "type": "array", - "items": { - "type": "object", - "properties": {} - } + "type": "string", + "title": "UUID" } ], - "$synthetic": true, - "$target": "json" + "$target": "param" + }, + "offset": { + "type": "number", + "default": 0, + "$target": "query" + }, + "sort": { + "type": "string", + "default": "id", + "$target": "query" + }, + "select": { + "type": "array", + "$target": "query", + "items": { + "type": "string" + } } } } @@ -340,100 +524,36 @@ } }, { - "name": "data_entity_delete_one", - "description": "Delete one", + "name": "data_sync", + "description": "Sync database schema", "inputSchema": { "type": "object", - "required": [ - "entity", - "id" - ], "properties": { - "entity": { - "type": "string", - "enum": [ - "users", - "media" - ], - "$target": "param" + "force": { + "type": "boolean", + "$target": "query" }, - "id": { - "anyOf": [ - { - "type": "number", - "title": "Integer" - }, - { - "type": "string", - "title": "UUID" - } - ], - "$target": "param" + "drop": { + "type": "boolean", + "$target": "query" } } + }, + "annotations": { + "destructiveHint": true } }, { - "name": "data_entity_delete_many", - "description": "Delete many", + "name": "system_build", + "description": "Build the app", "inputSchema": { "type": "object", - "required": [ - "entity", - "json" - ], "properties": { - "entity": { - "type": "string", - "enum": [ - "users", - "media" - ], - "$target": "param" + "sync": { + "type": "boolean", + "$target": "query" }, - "json": { - "type": "object", - "$synthetic": true, - "$target": "json", - "properties": {} - } - } - } - }, - { - "name": "data_entity_info", - "description": "Retrieve entity info", - "inputSchema": { - "type": "object", - "required": [ - "entity" - ], - "properties": { - "entity": { - "type": "string", - "enum": [ - "users", - "media" - ], - "$target": "param" - } - } - } - }, - { - "name": "auth_me", - "description": "Get the current user", - "inputSchema": { - "type": "object" - } - }, - { - "name": "auth_strategies", - "description": "Get the available authentication strategies", - "inputSchema": { - "type": "object", - "properties": { - "include_disabled": { + "fetch": { "type": "boolean", "$target": "query" } @@ -468,20 +588,10 @@ } }, { - "name": "system_build", - "description": "Build the app", + "name": "system_info", + "description": "Get the server info", "inputSchema": { - "type": "object", - "properties": { - "sync": { - "type": "boolean", - "$target": "query" - }, - "fetch": { - "type": "boolean", - "$target": "query" - } - } + "type": "object" } }, { @@ -492,114 +602,8 @@ } }, { - "name": "system_info", - "description": "Get the server info", - "inputSchema": { - "type": "object" - } - }, - { - "name": "auth_user_create", - "description": "Create a new user", - "inputSchema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - }, - "password": { - "type": "string", - "minLength": 8 - }, - "role": { - "type": "string", - "enum": [] - } - }, - "required": [ - "email", - "password" - ] - } - }, - { - "name": "auth_user_token", - "description": "Get a user token", - "inputSchema": { - "type": "object", - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "email": { - "type": "string", - "format": "email" - } - } - } - }, - { - "name": "auth_user_password_change", - "description": "Change a user's password", - "inputSchema": { - "type": "object", - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "email": { - "type": "string", - "format": "email" - }, - "password": { - "type": "string", - "minLength": 8 - } - }, - "required": [ - "password" - ] - } - }, - { - "name": "auth_user_password_test", - "description": "Test a user's password", - "inputSchema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - }, - "password": { - "type": "string", - "minLength": 8 - } - }, - "required": [ - "email", - "password" - ] - } - }, - { - "name": "config_server_get", - "description": "Get Server configuration", + "name": "config_auth_get", + "title": "Get Authentication", "inputSchema": { "type": "object", "additionalProperties": false, @@ -627,157 +631,41 @@ } }, { - "name": "config_server_update", - "description": "Update Server configuration", + "name": "config_auth_roles_add", "inputSchema": { "type": "object", "additionalProperties": false, "properties": { - "full": { - "type": "boolean", - "default": false - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "cors": { - "type": "object", - "additionalProperties": false, - "properties": { - "origin": { - "type": "string", - "default": "*" - }, - "allow_methods": { - "type": "array", - "default": [ - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "uniqueItems": true, - "items": { - "type": "string", - "enum": [ - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ] - } - }, - "allow_headers": { - "type": "array", - "default": [ - "Content-Type", - "Content-Length", - "Authorization", - "Accept" - ], - "items": { - "type": "string" - } - }, - "allow_credentials": { - "type": "boolean", - "default": true - } - } - }, - "mcp": { - "type": "object", - "additionalProperties": false, - "properties": { - "enabled": { - "type": "boolean", - "default": false - } - } - } - } - } - }, - "required": [ - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_data_get", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "path": { + "key": { "type": "string", - "title": "Path", - "description": "Path to the property to get, e.g. `key.subkey`", - "pattern": "^[a-zA-Z0-9_.]{0,}$" - }, - "depth": { - "type": "number", - "description": "Limit the depth of the response" - }, - "secrets": { - "type": "boolean", - "description": "Include secrets in the response config", - "default": false - } - } - }, - "annotations": { - "readOnlyHint": true, - "destructiveHint": false - } - }, - { - "name": "config_data_update", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "full": { - "type": "boolean", - "default": false - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false + "description": "key to add" }, "value": { "type": "object", "additionalProperties": false, "properties": { - "basepath": { - "type": "string", - "default": "/api/data" + "permissions": { + "type": "array", + "items": { + "type": "string" + } }, - "default_primary_format": { - "type": "string", - "enum": [ - "integer", - "uuid" - ], - "default": "integer" + "is_default": { + "type": "boolean" + }, + "implicit_allow": { + "type": "boolean" } } + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false } }, "required": [ + "key", "value" ] }, @@ -787,7 +675,7 @@ } }, { - "name": "config_data_entities_get", + "name": "config_auth_roles_get", "inputSchema": { "type": "object", "additionalProperties": false, @@ -813,6 +701,362 @@ "destructiveHint": false } }, + { + "name": "config_auth_roles_remove", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to remove" + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + } + }, + "required": [ + "key" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, + { + "name": "config_auth_roles_update", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to update" + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "is_default": { + "type": "boolean" + }, + "implicit_allow": { + "type": "boolean" + } + } + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + } + }, + "required": [ + "key", + "value" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, + { + "name": "config_auth_strategies_add", + "title": "Add Strategies", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to add" + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string" + }, + "enabled": { + "type": "boolean", + "default": true + }, + "config": { + "type": "object", + "properties": {} + } + }, + "required": [ + "type", + "config" + ] + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + } + }, + "required": [ + "key", + "value" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, + { + "name": "config_auth_strategies_get", + "title": "Get Strategies", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to get" + }, + "secrets": { + "type": "boolean", + "description": "(optional) include secrets in the response config", + "default": false + }, + "schema": { + "type": "boolean", + "description": "(optional) include the schema in the response", + "default": false + } + } + }, + "annotations": { + "readOnlyHint": true, + "destructiveHint": false + } + }, + { + "name": "config_auth_strategies_remove", + "title": "Get Strategies", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to remove" + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + } + }, + "required": [ + "key" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, + { + "name": "config_auth_strategies_update", + "title": "Update Strategies", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to update" + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string" + }, + "enabled": { + "type": "boolean", + "default": true + }, + "config": { + "type": "object", + "properties": {} + } + } + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + } + }, + "required": [ + "key", + "value" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, + { + "name": "config_auth_update", + "title": "Update Authentication", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "full": { + "type": "boolean", + "default": false + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean", + "default": false + }, + "basepath": { + "type": "string", + "default": "/api/auth" + }, + "entity_name": { + "type": "string", + "default": "users" + }, + "allow_register": { + "type": "boolean", + "default": true + }, + "jwt": { + "type": "object", + "default": {}, + "additionalProperties": false, + "properties": { + "secret": { + "type": "string", + "default": "" + }, + "alg": { + "type": "string", + "enum": [ + "HS256", + "HS384", + "HS512" + ], + "default": "HS256" + }, + "expires": { + "type": "number" + }, + "issuer": { + "type": "string" + }, + "fields": { + "type": "array", + "default": [ + "id", + "email", + "role" + ], + "items": { + "type": "string" + } + } + } + }, + "cookie": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "default": "/" + }, + "sameSite": { + "type": "string", + "enum": [ + "strict", + "lax", + "none" + ], + "default": "lax" + }, + "secure": { + "type": "boolean", + "default": true + }, + "httpOnly": { + "type": "boolean", + "default": true + }, + "expires": { + "type": "number", + "default": 604800 + }, + "partitioned": { + "type": "boolean", + "default": false + }, + "renew": { + "type": "boolean", + "default": true + }, + "pathSuccess": { + "type": "string", + "default": "/" + }, + "pathLoggedOut": { + "type": "string", + "default": "/" + } + } + }, + "guard": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": false + } + } + } + } + } + }, + "required": [ + "value" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, { "name": "config_data_entities_add", "inputSchema": { @@ -1920,6 +2164,58 @@ "idempotentHint": true } }, + { + "name": "config_data_entities_get", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to get" + }, + "secrets": { + "type": "boolean", + "description": "(optional) include secrets in the response config", + "default": false + }, + "schema": { + "type": "boolean", + "description": "(optional) include the schema in the response", + "default": false + } + } + }, + "annotations": { + "readOnlyHint": true, + "destructiveHint": false + } + }, + { + "name": "config_data_entities_remove", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to remove" + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + } + }, + "required": [ + "key" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, { "name": "config_data_entities_update", "inputSchema": { @@ -3028,207 +3324,24 @@ } }, { - "name": "config_data_entities_remove", + "name": "config_data_get", "inputSchema": { "type": "object", "additionalProperties": false, "properties": { - "key": { + "path": { "type": "string", - "description": "key to remove" + "title": "Path", + "description": "Path to the property to get, e.g. `key.subkey`", + "pattern": "^[a-zA-Z0-9_.]{0,}$" }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_data_relations_get", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to get" + "depth": { + "type": "number", + "description": "Limit the depth of the response" }, "secrets": { "type": "boolean", - "description": "(optional) include secrets in the response config", - "default": false - }, - "schema": { - "type": "boolean", - "description": "(optional) include the schema in the response", - "default": false - } - } - }, - "annotations": { - "readOnlyHint": true, - "destructiveHint": false - } - }, - { - "name": "config_data_relations_add", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to add" - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "1:1", - "n:1", - "m:n", - "poly" - ] - }, - "source": { - "type": "string" - }, - "target": { - "type": "string" - }, - "config": { - "type": "object", - "properties": {} - } - }, - "required": [ - "type", - "source", - "target" - ] - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key", - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_data_relations_update", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to update" - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "1:1", - "n:1", - "m:n", - "poly" - ] - }, - "source": { - "type": "string" - }, - "target": { - "type": "string" - }, - "config": { - "type": "object", - "properties": {} - } - } - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key", - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_data_relations_remove", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to remove" - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_data_indices_get", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to get" - }, - "secrets": { - "type": "boolean", - "description": "(optional) include secrets in the response config", - "default": false - }, - "schema": { - "type": "boolean", - "description": "(optional) include the schema in the response", + "description": "Include secrets in the response config", "default": false } } @@ -3288,6 +3401,33 @@ "idempotentHint": true } }, + { + "name": "config_data_indices_get", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "key to get" + }, + "secrets": { + "type": "boolean", + "description": "(optional) include secrets in the response config", + "default": false + }, + "schema": { + "type": "boolean", + "description": "(optional) include the schema in the response", + "default": false + } + } + }, + "annotations": { + "readOnlyHint": true, + "destructiveHint": false + } + }, { "name": "config_data_indices_remove", "inputSchema": { @@ -3314,206 +3454,7 @@ } }, { - "name": "config_auth_get", - "title": "Get Authentication", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "title": "Path", - "description": "Path to the property to get, e.g. `key.subkey`", - "pattern": "^[a-zA-Z0-9_.]{0,}$" - }, - "depth": { - "type": "number", - "description": "Limit the depth of the response" - }, - "secrets": { - "type": "boolean", - "description": "Include secrets in the response config", - "default": false - } - } - }, - "annotations": { - "readOnlyHint": true, - "destructiveHint": false - } - }, - { - "name": "config_auth_update", - "title": "Update Authentication", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "full": { - "type": "boolean", - "default": false - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "enabled": { - "type": "boolean", - "default": false - }, - "basepath": { - "type": "string", - "default": "/api/auth" - }, - "entity_name": { - "type": "string", - "default": "users" - }, - "allow_register": { - "type": "boolean", - "default": true - }, - "jwt": { - "type": "object", - "default": {}, - "additionalProperties": false, - "properties": { - "secret": { - "type": "string", - "default": "" - }, - "alg": { - "type": "string", - "enum": [ - "HS256", - "HS384", - "HS512" - ], - "default": "HS256" - }, - "expires": { - "type": "number" - }, - "issuer": { - "type": "string" - }, - "fields": { - "type": "array", - "default": [ - "id", - "email", - "role" - ], - "items": { - "type": "string" - } - } - } - }, - "cookie": { - "type": "object", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "default": "/" - }, - "sameSite": { - "type": "string", - "enum": [ - "strict", - "lax", - "none" - ], - "default": "lax" - }, - "secure": { - "type": "boolean", - "default": true - }, - "httpOnly": { - "type": "boolean", - "default": true - }, - "expires": { - "type": "number", - "default": 604800 - }, - "partitioned": { - "type": "boolean", - "default": false - }, - "renew": { - "type": "boolean", - "default": true - }, - "pathSuccess": { - "type": "string", - "default": "/" - }, - "pathLoggedOut": { - "type": "string", - "default": "/" - } - } - }, - "guard": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "default": false - } - } - } - } - } - }, - "required": [ - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_auth_strategies_get", - "title": "Get Strategies", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to get" - }, - "secrets": { - "type": "boolean", - "description": "(optional) include secrets in the response config", - "default": false - }, - "schema": { - "type": "boolean", - "description": "(optional) include the schema in the response", - "default": false - } - } - }, - "annotations": { - "readOnlyHint": true, - "destructiveHint": false - } - }, - { - "name": "config_auth_strategies_add", - "title": "Add Strategies", + "name": "config_data_relations_add", "inputSchema": { "type": "object", "additionalProperties": false, @@ -3527,11 +3468,19 @@ "additionalProperties": false, "properties": { "type": { + "type": "string", + "enum": [ + "1:1", + "n:1", + "m:n", + "poly" + ] + }, + "source": { "type": "string" }, - "enabled": { - "type": "boolean", - "default": true + "target": { + "type": "string" }, "config": { "type": "object", @@ -3540,7 +3489,8 @@ }, "required": [ "type", - "config" + "source", + "target" ] }, "return_config": { @@ -3560,77 +3510,7 @@ } }, { - "name": "config_auth_strategies_update", - "title": "Update Strategies", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to update" - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string" - }, - "enabled": { - "type": "boolean", - "default": true - }, - "config": { - "type": "object", - "properties": {} - } - } - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key", - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_auth_strategies_remove", - "title": "Get Strategies", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to remove" - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_auth_roles_get", + "name": "config_data_relations_get", "inputSchema": { "type": "object", "additionalProperties": false, @@ -3657,95 +3537,7 @@ } }, { - "name": "config_auth_roles_add", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to add" - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "permissions": { - "type": "array", - "items": { - "type": "string" - } - }, - "is_default": { - "type": "boolean" - }, - "implicit_allow": { - "type": "boolean" - } - } - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key", - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_auth_roles_update", - "inputSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "key to update" - }, - "value": { - "type": "object", - "additionalProperties": false, - "properties": { - "permissions": { - "type": "array", - "items": { - "type": "string" - } - }, - "is_default": { - "type": "boolean" - }, - "implicit_allow": { - "type": "boolean" - } - } - }, - "return_config": { - "type": "boolean", - "description": "If the new configuration should be returned", - "default": false - } - }, - "required": [ - "key", - "value" - ] - }, - "annotations": { - "destructiveHint": true, - "idempotentHint": true - } - }, - { - "name": "config_auth_roles_remove", + "name": "config_data_relations_remove", "inputSchema": { "type": "object", "additionalProperties": false, @@ -3770,35 +3562,58 @@ } }, { - "name": "config_media_get", + "name": "config_data_relations_update", "inputSchema": { "type": "object", "additionalProperties": false, "properties": { - "path": { + "key": { "type": "string", - "title": "Path", - "description": "Path to the property to get, e.g. `key.subkey`", - "pattern": "^[a-zA-Z0-9_.]{0,}$" + "description": "key to update" }, - "depth": { - "type": "number", - "description": "Limit the depth of the response" + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "1:1", + "n:1", + "m:n", + "poly" + ] + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "config": { + "type": "object", + "properties": {} + } + } }, - "secrets": { + "return_config": { "type": "boolean", - "description": "Include secrets in the response config", + "description": "If the new configuration should be returned", "default": false } - } + }, + "required": [ + "key", + "value" + ] }, "annotations": { - "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": true, + "idempotentHint": true } }, { - "name": "config_media_update", + "name": "config_data_update", "inputSchema": { "type": "object", "additionalProperties": false, @@ -3816,28 +3631,17 @@ "type": "object", "additionalProperties": false, "properties": { - "enabled": { - "type": "boolean", - "default": false - }, "basepath": { "type": "string", - "default": "/api/media" + "default": "/api/data" }, - "entity_name": { + "default_primary_format": { "type": "string", - "default": "media" - }, - "storage": { - "type": "object", - "default": {}, - "additionalProperties": false, - "properties": { - "body_max_size": { - "type": "number", - "description": "Max size of the body in bytes. Leave blank for unlimited." - } - } + "enum": [ + "integer", + "uuid" + ], + "default": "integer" } } } @@ -4004,6 +3808,206 @@ "destructiveHint": true, "idempotentHint": true } + }, + { + "name": "config_media_get", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "title": "Path", + "description": "Path to the property to get, e.g. `key.subkey`", + "pattern": "^[a-zA-Z0-9_.]{0,}$" + }, + "depth": { + "type": "number", + "description": "Limit the depth of the response" + }, + "secrets": { + "type": "boolean", + "description": "Include secrets in the response config", + "default": false + } + } + }, + "annotations": { + "readOnlyHint": true, + "destructiveHint": false + } + }, + { + "name": "config_media_update", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "full": { + "type": "boolean", + "default": false + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean", + "default": false + }, + "basepath": { + "type": "string", + "default": "/api/media" + }, + "entity_name": { + "type": "string", + "default": "media" + }, + "storage": { + "type": "object", + "default": {}, + "additionalProperties": false, + "properties": { + "body_max_size": { + "type": "number", + "description": "Max size of the body in bytes. Leave blank for unlimited." + } + } + } + } + } + }, + "required": [ + "value" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } + }, + { + "name": "config_server_get", + "description": "Get Server configuration", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "title": "Path", + "description": "Path to the property to get, e.g. `key.subkey`", + "pattern": "^[a-zA-Z0-9_.]{0,}$" + }, + "depth": { + "type": "number", + "description": "Limit the depth of the response" + }, + "secrets": { + "type": "boolean", + "description": "Include secrets in the response config", + "default": false + } + } + }, + "annotations": { + "readOnlyHint": true, + "destructiveHint": false + } + }, + { + "name": "config_server_update", + "description": "Update Server configuration", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "full": { + "type": "boolean", + "default": false + }, + "return_config": { + "type": "boolean", + "description": "If the new configuration should be returned", + "default": false + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "cors": { + "type": "object", + "additionalProperties": false, + "properties": { + "origin": { + "type": "string", + "default": "*" + }, + "allow_methods": { + "type": "array", + "default": [ + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ] + } + }, + "allow_headers": { + "type": "array", + "default": [ + "Content-Type", + "Content-Length", + "Authorization", + "Accept" + ], + "items": { + "type": "string" + } + }, + "allow_credentials": { + "type": "boolean", + "default": true + } + } + }, + "mcp": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean", + "default": false + } + } + } + } + } + }, + "required": [ + "value" + ] + }, + "annotations": { + "destructiveHint": true, + "idempotentHint": true + } } ], "resources": [ diff --git a/docs/mdx-components.tsx b/docs/mdx-components.tsx index 339807f..09e5219 100644 --- a/docs/mdx-components.tsx +++ b/docs/mdx-components.tsx @@ -5,11 +5,12 @@ import type { MDXComponents } from "mdx/types"; import * as FilesComponents from "fumadocs-ui/components/files"; import * as TabsComponents from "fumadocs-ui/components/tabs"; import { Accordion, Accordions } from "fumadocs-ui/components/accordion"; +import { ImageZoom } from "fumadocs-ui/components/image-zoom"; import { - CalloutInfo, - CalloutPositive, - CalloutCaution, - CalloutDanger, + CalloutInfo, + CalloutPositive, + CalloutCaution, + CalloutDanger, } from "./app/_components/Callout"; import { StackBlitz } from "./app/_components/StackBlitz"; import { Icon } from "@iconify/react"; @@ -18,29 +19,30 @@ import * as Twoslash from "fumadocs-twoslash/ui"; import { createGenerator } from "fumadocs-typescript"; import { AutoTypeTable } from "fumadocs-typescript/ui"; +import { Wrapper } from "@/components/misc/Wrapper"; const generator = createGenerator({ - tsconfigPath: "../tsconfig.json", + tsconfigPath: "../tsconfig.json", }); export function getMDXComponents(components?: MDXComponents): MDXComponents { - return { - ...defaultMdxComponents, - ...TabsComponents, - ...FilesComponents, - ...Twoslash, - Accordion, - Accordions, - CalloutInfo, - CalloutPositive, - CalloutCaution, - CalloutDanger, - StackBlitz, - Icon, - APIPage: (props) => , - AutoTypeTable: (props) => ( - - ), - ...components, - }; + return { + ...defaultMdxComponents, + ...TabsComponents, + ...FilesComponents, + ...Twoslash, + Accordion, + Accordions, + CalloutInfo, + CalloutPositive, + CalloutCaution, + CalloutDanger, + StackBlitz, + Icon, + Wrapper, + img: (props) => , + APIPage: (props) => , + AutoTypeTable: (props) => , + ...components, + }; } diff --git a/docs/public/content/mcp/bknd_mcp_ui.png b/docs/public/content/mcp/bknd_mcp_ui.png new file mode 100644 index 0000000..e242ad7 Binary files /dev/null and b/docs/public/content/mcp/bknd_mcp_ui.png differ diff --git a/docs/public/content/mcp/v0.17_mcp_o.mp4 b/docs/public/content/mcp/v0.17_mcp_o.mp4 new file mode 100644 index 0000000..08f3c21 Binary files /dev/null and b/docs/public/content/mcp/v0.17_mcp_o.mp4 differ diff --git a/docs/public/content/mcp/v0.17_mcp_o_frame_12.5s.jpg b/docs/public/content/mcp/v0.17_mcp_o_frame_12.5s.jpg new file mode 100644 index 0000000..e4e1fd6 Binary files /dev/null and b/docs/public/content/mcp/v0.17_mcp_o_frame_12.5s.jpg differ diff --git a/docs/scripts/generate-mcp.ts b/docs/scripts/generate-mcp.ts index 3da6c05..1cb440c 100644 --- a/docs/scripts/generate-mcp.ts +++ b/docs/scripts/generate-mcp.ts @@ -6,18 +6,12 @@ import { writeFile, readFile } from "node:fs/promises"; const config = { mcpConfig: "./mcp.json", - outFile: "./content/docs/(documentation)/modules/server/mcp.mdx", + outFile: "./content/docs/(documentation)/usage/mcp/tools-resources.mdx", }; async function generate() { console.info("Generating MCP documentation..."); - try { - console.log("bun version", Bun.version); - } catch (e) { - console.log("bun failed"); - } - await cleanup(); const mcpConfig = JSON.parse(await readFile(config.mcpConfig, "utf-8")); const document = await generateDocument(mcpConfig); @@ -34,7 +28,7 @@ async function generateDocument({ }) { return `--- title: "MCP" -description: "Built-in full featured MCP server." +description: "Tools & Resources of the built-in full featured MCP server." tags: ["documentation"] --- import { JsonSchemaTypeTable } from '@/components/McpTool';