You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Function Management
Managing functions by using veFaaS MCP
Copy page
Download PDF
Managing functions by using veFaaS MCP
This topic describes how to use the Model Context Protocol (MCP) for Volcano Engine Function as a Service (veFaaS) in an AI integrated development environment (IDE) or AI command-line interface (CLI) that supports MCP to manage the full lifecycle of veFaaS functions, including function creation, code synchronization, dependency installation, online release, and API Gateway (APIG) configuration.​
Considerations​
  • Credential management: The access key ID (AK) and secret access key (SK) contain sensitive information about your account. Please keep them confidential.​
  • Service activation: To generate a public access URL, you need to activate APIG first. Make sure that the required resources are available in your account. For instructions on activating APIG, see Quick guide.​
  • Code package and runtime: For compiled languages, you need to generate a Linux executable file in your local environment and then upload the file. For interpreted languages such as Python and Node.js, you only need to keep the startup script and dependency declaration file (requirements.txt/package.json) complete. AI calls the platform API to automatically install dependencies based on veFaaS MCP prompts.​
  • Model and agent performance: The execution performance of MCP is affected by the selected model and agent policy. If the task results do not meet your business requirements, you may try to provide more specific context, adjust the prompt, or switch the model or agent to achieve more stable output.​
Installing veFaaS MCP​
  • We recommend that you integrate Local MCP with AI IDE or command-line tools. The veFaaS MCP is in the following JSON format:​
tip​
Replace the values of VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY with the AK and SK of your account.​
​
{​
"mcpServers": {​
"vefaas": {​
"command": "uvx",​
"args": [​
"--from",​
"git+https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_vefaas_function",​
"mcp-server-vefaas-function"​
],​
"env": {​
"VOLCENGINE_ACCESS_KEY": "xxx",​
"VOLCENGINE_SECRET_KEY": "xxx"​
}​
}​
}​
​
​
​
Integration with IDE​
This topic provides an example on how to integrate Local MCP with Trae. You can use one of the following methods to install veFaaS Local MCP in your IDE, such as Trae or Cursor.​
  • Method 1: Search for veFaaS MCP in the MCP marketplace and add veFaaS MCP based on Configure MCP Server.​
  • Method 2: In the veFaaS console, go to the target function details page, then navigate to Code > Local development > veFaaS MCP, and follow the prompts to integrate it into Trae with a few clicks.​
Integration with CLI​
AI CLIs such as veCLI and Claude Code allow you to add MCP servers as extension tools. You can add MCP tools based on the documentation of the corresponding CLI.​
tip​
This topic takes veCLI as an example. After you add the preceding JSON format to ~/.ve/settings.json, start veCLI. Then, you can use veCLI with the MCP tool. For detailed operations, see veCLI MCP server.​
Using veFaaS MCP​
Example 1: Create a project on your on-premises computer and deploy it to veFaaS​
Open an empty folder by using an IDE, generate a project, and then deploy the project to veFaaS. The sample prompt is as follows.​
​
Create a hello world web page using the Flask framework and deploy it on veFaaS.​
​
Example 2: Import an online function into your on-premises computer for continuous development and deployment​
  1. Open an empty folder by using an IDE and then download the code of an existing online function to your on-premises computer. The sample prompt is as follows, where xxx is your function ID.​
  • ​
    Download the code of function xxx to the root directory of the current project.​
    ​
  1. After you download the code and perform local development, upload the modified code and release it on veFaaS by using veFaaS MCP. The sample prompt is as follows.​
  • ​
    Upload the code and publish it to veFaaS.​
    ​
Sample prompt​
You can also use veFaaS MCP based on the following prompts to meet different business requirements.​
tip​
{function ID} in the prompt is a function ID used for illustration.​
  • Generate a minimal FastAPI template based on the current directory, release it to veFaaS, and generate an accessible URL.​
  • Help me query the details of the function {function ID} in the cn-beijing region.​
  • Download the code of the veFaaS function {function ID} in the cn-beijing region to the current directory.​
  • Upload and deploy the latest code to veFaaS. If the task fails, extract the key error messages from the logs for me.​
  • Configure public access for the function {function ID}. Reuse existing gateways if possible. If no gateways are available, create a new one and return the domain name and default route information.​
Last updated: 2026.08.19 14:06:07