Skip to content

MCP Service / Access Functions

Added in version 7.5.0

The MCP service is a feature of DataFlux Func designed to support AI Agent tool calls.

Users can provide some functions that exist in DataFlux Func to AI Agents via the MCP service.

1. Access Steps

Follow the steps below to connect an MCP client / AI Agent to the MCP service of DataFlux Func.

1.1 Create Access Token

Accessing the MCP service of DataFlux Func requires creating an Access Token and enabling the 'MCP Functions' feature.

You can also specify the category of the functions to be exposed in the rules.

add-access-token.png

add-access-token-2.png

1.2 Configure MCP Client

The MCP service of DataFlux Func complies with the MCP specification.

Before actual integration, it is recommended to use MCP Inspector for debugging.

Add the following configuration in the MCP client / AI Agent:

Configuration Item Value
URL Address {DataFlux Func access URL}/mcp
or /mcp2, /mcp3
For specific differences, see 'MCP Service Modes' below.
Request Headers Authorization: Bearer atk-xxxxx:xxxxx
Example: OpenCode Configuration
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "mcp": {
    "dataflux-func-mcp": {
      "enabled": true,
      "type"   : "remote",
      "url"    : "{DataFlux Func access URL}/mcp",
      "headers": {
        "Authorization": "Bearer atk-xxxxx:xxxxx"
      }
    },
  }
}

2. MCP Service Modes

The MCP service of DataFlux Func supports 3 modes based on the access path:

Path Mode
/mcp Basic Mode
/mcp2 List-Call Mode
/mcp3 Search-Call Mode (Recommended)

Assuming the Access Token is configured as follows, and the following functions exist in the code library:

Deny category:test, Allow category:math
1
2
!category:test
category:math

code.png

2.1 /mcp Basic Mode

Lists all available functions directly as Tools.

Note: When the function list changes, the client needs to reconnect to update the list.

2.2 /mcp2 List-Call Mode

Provides only two Tools:

  • list-func: Lists functions.
  • call-func: Calls a function.

Enables dynamic function listing. Requires the AI Agent / model to correctly follow the List-Call method for invocation.

2.3 /mcp3 Search-Call Mode

Provides only two Tools:

  • search-func: Searches for functions.
  • call-func: Calls a function.

Enables querying for required functions based on keywords. Requires the AI Agent / model to correctly follow the Search-Call method for invocation.

When there are many functions, this can significantly reduce the context length.