MCP Service / AI Programming
Added in version 7.6.0
The MCP Service is a feature of DataFlux Func designed to support AI Agent tool invocation.
Users can allow AI Agents to participate in writing functions within DataFlux Func via the MCP Service.
1. Access Steps
Follow the steps below to connect an MCP client / AI Agent to DataFlux Func's MCP Coding service.
1.1 Create Access Token
Accessing DataFlux Func's MCP Coding service requires creating an Access Token and enabling the "MCP Programming" feature.
You can also specify the functions to be exposed in the rules (e.g., by Script Set ID).
1.2 Permission Rules
Permission rules can be manually edited. They are matched sequentially from top to bottom, and the first matching rule determines the permissions.
Examples are as follows:
| Rule (Exact ID Match) | Matching Method |
|---|---|
category:math:r |
Functions where category is math |
scriptSet:mytest |
Functions belonging to Script Set mytest |
script:mytest__demo |
Functions belonging to Script mytest__demo |
func:mytest__demo.func |
Function with ID mytest__demo.func |
| Rule (Wildcard ID) | Matching Method |
|---|---|
scriptSet:myte* |
Functions matching Script Set ID wildcard myte* |
script:mytest__de* |
Functions matching Script ID wildcard mytest__de* |
func:mytest__demo.fu* |
Functions matching Function ID wildcard mytest__demo.fu* |
| Rule (Deny) | Matching Method |
|---|---|
!category:math:r |
Deny functions where category is math |
1.3 Configure MCP Client
DataFlux Func's MCP service adheres to the MCP specification
It is recommended to use MCP Inspector for debugging before actual integration.
Add the following configuration to your MCP client / AI Agent:
| Configuration Item | Value |
|---|---|
| URL Address | {DataFlux Func Access URL}/mcp/coding |
| Request Headers | Authorization: Bearer atk-xxxxx:xxxxx |
| Example: OpenCode Configuration | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 | |
2. Practical Operation Example
First, confirm whether the AI Agent has successfully connected to DataFlux Func's MCP Coding service:
Then, proceed to input prompts normally.
After the AI Agent completes its task, refresh in DataFlux Func to see the code written by the AI.