home / mcp / alibaba cloud fc mcp server

Alibaba Cloud FC MCP Server

Provides an MCP server that bridges Alibaba Cloud FC with MCP clients to deploy and manage FC functions.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aliyun-alibabacloud-fc-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "alibabacloud-fc-mcp-server"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "${your-access-key-id}",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "${your-access-key-secret}"
      }
    }
  }
}

You deploy and run an MCP server that bridges Alibaba Cloud Function Compute (FC) with MCP clients, enabling you to manage FC functions from MCP-enabled agents like Cursor or Cline. This server handles deployment, function management, and custom-domain routing, simplifying how you build serverless workflows with FC.

How to use

Use this MCP server with MCP clients to deploy, manage, and invoke Alibaba Cloud Function Compute functions from your agent applications. You can run the server locally in stdio mode and connect via Cursor or Cline. The server exposes tools for creating, updating, listing, and deleting FC functions, as well as configuring custom-domain routes.

How to install

Prerequisites you must have before installing and running the server:

  • Node.js version 18 or above must be installed on your system
  • Prepare Alibaba Cloud credentials: AccessKeyId and AccessKeySecret
  • Set up the following permissions for full functionality: AdministratorAccess (recommended) or at minimum AliyunFCFullAccess, AliyunDevsFullAccess, AliyunVPCFullAccess, AliyunLogFullAccess, AliyunEventBridgeFullAccess (optional)

Two recommended methods to start the MCP server are provided. Follow one of them to begin.

ALIBABA_CLOUD_ACCESS_KEY_ID=${your-access-key-id} ALIBABA_CLOUD_ACCESS_KEY_SECRET=${your-access-key-secret} npx alibabacloud-fc-mcp-server

Method 1: Start from npm package (Recommended for MCP Server users)

Run the server in stdio mode using your Alibaba Cloud credentials. This method is quick to get started without building from source.

ALIBABA_CLOUD_ACCESS_KEY_ID=${your-access-key-id} ALIBABA_CLOUD_ACCESS_KEY_SECRET=${your-access-key-secret} npx alibabacloud-fc-mcp-server

Using Cursor (Recommended)

Add the MCP server configuration to Cursor to connect automatically. You can either click an install link or manually configure the MCP server entry in Cursor’s configuration file.

"alibabacloud-fc-mcp-server": {
  "command": "npx",
  "args": ["-y", "alibabacloud-fc-mcp-server"],
  "env": {
    "ALIBABA_CLOUD_ACCESS_KEY_ID": "${your-access-key-id}",
    "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "${your-access-key-secret}"
  }
}

Using Cline

Edit the Cline configuration to connect the MCP server in stdio mode using the same environment variables.

"alibabacloud-fc-mcp-server": {
  "command": "npx",
  "args": ["-y", "alibabacloud-fc-mcp-server"],
  "env": {
    "ALIBABA_CLOUD_ACCESS_KEY_ID": "${your-access-key-id}",
    "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "${your-access-key-secret}"
  }
}

Method 2: Start from source code (Recommended for MCP Server developers)

If you prefer building from source, follow these steps to build and run the server in stdio mode. The final start command uses the built file.

git clone https://github.com/alibaba/alibabacloud-fc-mcp-server.git
cd alibabacloud-fc-mcp-server
npm install
npm run build
```

```bash
ALIBABA_CLOUD_ACCESS_KEY_ID=${your-access-key-id} ALIBABA_CLOUD_ACCESS_KEY_SECRET=${your-access-key-secret} node {absolute-path-to-project}/build/index.js

Configure clients after starting

After starting the server, configure Cursor or Cline as in Method 1 to connect to the local stdio MCP server and begin managing FC functions.

Notes on credentials

Keep your Alibaba Cloud credentials secure. Do not expose AccessKeyId and AccessKeySecret in public or shared environments. Use environment isolation or secret management where possible.

Available tools

put-custom-runtime-function

Package a project that meets Alibaba Cloud custom runtime requirements, create or update the target function, and deploy the code.

update-custom-runtime-function

Update a custom runtime function with provided parameters while leaving other settings unchanged.

get-function

Retrieve detailed information about a specified function.

list-functions

List all functions in the specified region, returning function names and partial info.

delete-function

Delete a specified function.

get-custom-domain-config

Query the custom domain route configuration.

update-custom-domain-config

Update the custom domain route configuration.

create-custom-domain-config

Create a custom domain route configuration; the domain must already be CNAMEed to the public FC domain.

delete-custom-domain-config

Delete the custom domain route configuration.

get-custom-runtime-prompt

Get the custom runtime prompt; will be moved to Prompts in the future.