Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/Notes/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Read [**What’s new in 4D 21 R6**](https://blog.4d.com/whats-new-in-4d-21-r6/),
- MCP clients authenticate with Fine-Grained Tokens managed with the new [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken), [`ds.listFineGrainedTokens()`](../API/DataStoreClass.md#listfinegrainedtokens), and [`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken) functions. The reserved [`mcpAuthenticated()`](../ORDA/ordaClasses.md#function-mcpauthenticated) DataStore class function prepares each MCP session, whose [`Session.info.type`](../API/SessionClass.md#info) is "mcp".
- Optional [OAuth 2.1 mode](../WebServer/mcp-server.md#oauth-21-mode) of the MCP server, enabled by the reserved [`mcpGrant()`](../ORDA/ordaClasses.md#function-mcpgrant) DataStore class function. Grants are managed with the new [`ds.listOAuthGrants()`](../API/DataStoreClass.md#listoauthgrants) and [`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant) functions.
- New [`MCP`](../commands/mcp) command and [`4D.MCPContext`](../API/MCPContextClass.md) class to [ask the user for a confirmation](../WebServer/mcp-server.md#asking-the-user-for-confirmation) in MCP tools.
- A reference [MCP Bundle](../WebServer/mcp-server.md#claude-desktop-bundle) lets Claude Desktop connect to a 4D MCP server on the local network.

#### Behavior changes

Expand Down
26 changes: 1 addition & 25 deletions docs/WebServer/mcp-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Every request (except `server/discover` and `ping`) carries a token in its `Auth
|Privileges|Given when the token is generated|Returned by `ds.mcpGrant()`|
|Lifetime|Expiry date chosen at generation (366 days at most)|15 minutes, renewed with a refresh token|
|Revocation|[`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken)|[`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant)|
|Typical use|Services, the [Claude Desktop bundle](#claude-desktop-bundle), applications with their own login|Interactive login of each user in their AI client|
|Typical use|Services, applications with their own login|Interactive login of each user in their AI client|

### Fine-Grained Tokens

Expand Down Expand Up @@ -548,30 +548,6 @@ var $webServer : 4D.WebServer:=WEB Server
$webServer.quotas.nbRequestsPerMinPerSession:=60
```

## Claude Desktop bundle

Claude Desktop runs local MCP servers over stdio and does not speak the `2026-07-28` revision. To let it reach a 4D server on the local network without exposing this server on the internet, 4D provides a reference **MCP Bundle** (`.mcpb` file). The bundle is a small Node.js adapter run by Claude Desktop:

- it answers `initialize` and `ping` itself, and relays the other requests to the 4D `/mcp` URL,
- it authenticates with a Fine-Grained Token when one is entered, otherwise with the [OAuth mode](#oauth-21-mode) (dynamic client registration and login in the browser),
- it displays the forms of [confirmation requests](#asking-the-user-for-confirmation), such as the `dropEntity` confirmation, in a browser page on `127.0.0.1`, since Claude Desktop does not display them,
- when Claude Desktop cancels a request, it cancels the matching request to 4D.

To install it, open the `.mcpb` file (or drag it in **Settings > Extensions** of Claude Desktop), then fill in the installation form:

|Field|Description|
|---|---|
|4D MCP server URL|The `/mcp` URL of the 4D web server, for example `https://myserver.local/mcp`|
|Fine-Grained Token|A token generated by the application with [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken). Claude Desktop stores it in the keychain of the system. Leave it empty to log in with OAuth|
|CA certificate|A PEM certificate to trust, for a server whose certificate is self-signed or issued by a private authority|
|Allow insecure connection|**For tests only.** Allows `http://` URLs to another machine and disables the certificate check|

The bundle refuses to start, and logs why, when the URL is an `http://` URL to another machine and **Allow insecure connection** is not checked, or when no token is entered and the server does not offer OAuth login with dynamic client registration.

In OAuth mode, the client and its tokens are stored in the `.4d-mcp-bundle` folder of the user's home folder: delete its subfolder to log out.

Software editors can rebrand the bundle (name, icon, default server URL in its `manifest.json` file) and repackage it for their customers with the `mcpb` tool, as described in its README file.

## See also

- [`WebServer.mcp`](../API/WebServerClass.md#mcp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Lea [**Novedades en 4D 21 R6**](https://blog.4d.com/whats-new-in-4d-21-r6/), la
- MCP clients authenticate with Fine-Grained Tokens managed with the new [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken), [`ds.listFineGrainedTokens()`](../API/DataStoreClass.md#listfinegrainedtokens), and [`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken) functions. The reserved [`mcpAuthenticated()`](../ORDA/ordaClasses.md#function-mcpauthenticated) DataStore class function prepares each MCP session, whose [`Session.info.type`](../API/SessionClass.md#info) is "mcp".
- Optional [OAuth 2.1 mode](../WebServer/mcp-server.md#oauth-21-mode) of the MCP server, enabled by the reserved [`mcpGrant()`](../ORDA/ordaClasses.md#function-mcpgrant) DataStore class function. Grants are managed with the new [`ds.listOAuthGrants()`](../API/DataStoreClass.md#listoauthgrants) and [`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant) functions.
- New [`MCP`](../commands/mcp) command and [`4D.MCPContext`](../API/MCPContextClass.md) class to [ask the user for a confirmation](../WebServer/mcp-server.md#asking-the-user-for-confirmation) in MCP tools.
- A reference [MCP Bundle](../WebServer/mcp-server.md#claude-desktop-bundle) lets Claude Desktop connect to a 4D MCP server on the local network.

#### Cambios de comportamiento

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Every request (except `server/discover` and `ping`) carries a token in its `Auth
| Privilegios | Given when the token is generated | Returned by `ds.mcpGrant()` |
| Lifetime | Expiry date chosen at generation (366 days at most) | 15 minutes, renewed with a refresh token |
| Revocation | [`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken) | [`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant) |
| Typical use | Services, the [Claude Desktop bundle](#claude-desktop-bundle), applications with their own login | Interactive login of each user in their AI client |
| Typical use | Services, applications with their own login | Interactive login of each user in their AI client |

### Fine-Grained Tokens

Expand Down Expand Up @@ -548,30 +548,6 @@ var $webServer : 4D.WebServer:=WEB Server
$webServer.quotas.nbRequestsPerMinPerSession:=60
```

## Claude Desktop bundle

Claude Desktop runs local MCP servers over stdio and does not speak the `2026-07-28` revision. To let it reach a 4D server on the local network without exposing this server on the internet, 4D provides a reference **MCP Bundle** (`.mcpb` file). The bundle is a small Node.js adapter run by Claude Desktop:

- it answers `initialize` and `ping` itself, and relays the other requests to the 4D `/mcp` URL,
- it authenticates with a Fine-Grained Token when one is entered, otherwise with the [OAuth mode](#oauth-21-mode) (dynamic client registration and login in the browser),
- it displays the forms of [confirmation requests](#asking-the-user-for-confirmation), such as the `dropEntity` confirmation, in a browser page on `127.0.0.1`, since Claude Desktop does not display them,
- when Claude Desktop cancels a request, it cancels the matching request to 4D.

To install it, open the `.mcpb` file (or drag it in **Settings > Extensions** of Claude Desktop), then fill in the installation form:

| Campo | Descripción |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 4D MCP server URL | The `/mcp` URL of the 4D web server, for example `https://myserver.local/mcp` |
| Fine-Grained Token | A token generated by the application with [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken). Claude Desktop stores it in the keychain of the system. Leave it empty to log in with OAuth |
| CA certificate | A PEM certificate to trust, for a server whose certificate is self-signed or issued by a private authority |
| Allow insecure connection | **For tests only.** Allows `http://` URLs to another machine and disables the certificate check |

The bundle refuses to start, and logs why, when the URL is an `http://` URL to another machine and **Allow insecure connection** is not checked, or when no token is entered and the server does not offer OAuth login with dynamic client registration.

In OAuth mode, the client and its tokens are stored in the `.4d-mcp-bundle` folder of the user's home folder: delete its subfolder to log out.

Software editors can rebrand the bundle (name, icon, default server URL in its `manifest.json` file) and repackage it for their customers with the `mcpb` tool, as described in its README file.

## Ver también

- [`WebServer.mcp`](../API/WebServerClass.md#mcp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Read [**What’s new in 4D 21 R6**](https://blog.4d.com/whats-new-in-4d-21-r6/),
- MCP clients authenticate with Fine-Grained Tokens managed with the new [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken), [`ds.listFineGrainedTokens()`](../API/DataStoreClass.md#listfinegrainedtokens), and [`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken) functions. The reserved [`mcpAuthenticated()`](../ORDA/ordaClasses.md#function-mcpauthenticated) DataStore class function prepares each MCP session, whose [`Session.info.type`](../API/SessionClass.md#info) is "mcp".
- Optional [OAuth 2.1 mode](../WebServer/mcp-server.md#oauth-21-mode) of the MCP server, enabled by the reserved [`mcpGrant()`](../ORDA/ordaClasses.md#function-mcpgrant) DataStore class function. Grants are managed with the new [`ds.listOAuthGrants()`](../API/DataStoreClass.md#listoauthgrants) and [`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant) functions.
- New [`MCP`](../commands/mcp) command and [`4D.MCPContext`](../API/MCPContextClass.md) class to [ask the user for a confirmation](../WebServer/mcp-server.md#asking-the-user-for-confirmation) in MCP tools.
- A reference [MCP Bundle](../WebServer/mcp-server.md#claude-desktop-bundle) lets Claude Desktop connect to a 4D MCP server on the local network.

#### Changements de comportement

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Every request (except `server/discover` and `ping`) carries a token in its `Auth
| Privilèges | Given when the token is generated | Returned by `ds.mcpGrant()` |
| Lifetime | Expiry date chosen at generation (366 days at most) | 15 minutes, renewed with a refresh token |
| Revocation | [`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken) | [`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant) |
| Typical use | Services, the [Claude Desktop bundle](#claude-desktop-bundle), applications with their own login | Interactive login of each user in their AI client |
| Typical use | Services, applications with their own login | Interactive login of each user in their AI client |

### Fine-Grained Tokens

Expand Down Expand Up @@ -548,30 +548,6 @@ var $webServer : 4D.WebServer:=WEB Server
$webServer.quotas.nbRequestsPerMinPerSession:=60
```

## Claude Desktop bundle

Claude Desktop runs local MCP servers over stdio and does not speak the `2026-07-28` revision. To let it reach a 4D server on the local network without exposing this server on the internet, 4D provides a reference **MCP Bundle** (`.mcpb` file). The bundle is a small Node.js adapter run by Claude Desktop:

- it answers `initialize` and `ping` itself, and relays the other requests to the 4D `/mcp` URL,
- it authenticates with a Fine-Grained Token when one is entered, otherwise with the [OAuth mode](#oauth-21-mode) (dynamic client registration and login in the browser),
- it displays the forms of [confirmation requests](#asking-the-user-for-confirmation), such as the `dropEntity` confirmation, in a browser page on `127.0.0.1`, since Claude Desktop does not display them,
- when Claude Desktop cancels a request, it cancels the matching request to 4D.

To install it, open the `.mcpb` file (or drag it in **Settings > Extensions** of Claude Desktop), then fill in the installation form:

| Champ | Description |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 4D MCP server URL | The `/mcp` URL of the 4D web server, for example `https://myserver.local/mcp` |
| Fine-Grained Token | A token generated by the application with [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken). Claude Desktop stores it in the keychain of the system. Leave it empty to log in with OAuth |
| CA certificate | A PEM certificate to trust, for a server whose certificate is self-signed or issued by a private authority |
| Allow insecure connection | **For tests only.** Allows `http://` URLs to another machine and disables the certificate check |

The bundle refuses to start, and logs why, when the URL is an `http://` URL to another machine and **Allow insecure connection** is not checked, or when no token is entered and the server does not offer OAuth login with dynamic client registration.

In OAuth mode, the client and its tokens are stored in the `.4d-mcp-bundle` folder of the user's home folder: delete its subfolder to log out.

Software editors can rebrand the bundle (name, icon, default server URL in its `manifest.json` file) and repackage it for their customers with the `mcpb` tool, as described in its README file.

## Voir également

- [`WebServer.mcp`](../API/WebServerClass.md#mcp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Read [**What’s new in 4D 21 R6**](https://blog.4d.com/whats-new-in-4d-21-r6/),
- MCP clients authenticate with Fine-Grained Tokens managed with the new [`ds.generateFineGrainedToken()`](../API/DataStoreClass.md#generatefinegrainedtoken), [`ds.listFineGrainedTokens()`](../API/DataStoreClass.md#listfinegrainedtokens), and [`ds.revokeFineGrainedToken()`](../API/DataStoreClass.md#revokefinegrainedtoken) functions. The reserved [`mcpAuthenticated()`](../ORDA/ordaClasses.md#function-mcpauthenticated) DataStore class function prepares each MCP session, whose [`Session.info.type`](../API/SessionClass.md#info) is "mcp".
- Optional [OAuth 2.1 mode](../WebServer/mcp-server.md#oauth-21-mode) of the MCP server, enabled by the reserved [`mcpGrant()`](../ORDA/ordaClasses.md#function-mcpgrant) DataStore class function. Grants are managed with the new [`ds.listOAuthGrants()`](../API/DataStoreClass.md#listoauthgrants) and [`ds.revokeOAuthGrant()`](../API/DataStoreClass.md#revokeoauthgrant) functions.
- New [`MCP`](../commands/mcp) command and [`4D.MCPContext`](../API/MCPContextClass.md) class to [ask the user for a confirmation](../WebServer/mcp-server.md#asking-the-user-for-confirmation) in MCP tools.
- A reference [MCP Bundle](../WebServer/mcp-server.md#claude-desktop-bundle) lets Claude Desktop connect to a 4D MCP server on the local network.

#### 動作の変更

Expand Down
Loading
Loading