Alibaba Cloud FC MCP Server について
Alibaba Cloud FC MCP Serverは、Serverless DevsとOpenAPIを通じてAlibaba Cloud Function Computeをエージェントアプリに接続します。MCPツールで関数をデプロイ、管理したい利用者向けで、カスタムランタイム関数やドメインルートも扱えます。
主な機能
- 01カスタムランタイム関数のパッケージ化とデプロイ
- 02関数パラメーターの更新
- 03関数の取得と一覧表示
- 04関数の削除
- 05カスタムドメインルートの管理
活用シーン
- 01エージェントアプリからFunction Computeへプロジェクトをデプロイ
- 02指定リージョンの関数一覧を確認
- 03関数を更新、または詳細を取得
- 04カスタムドメインのルート設定を変更
MCP 対応
MCP対応のエージェントアプリにFunction Computeのツールを提供します。関数のデプロイ、更新、取得、削除に加え、カスタムドメインルートの設定を扱います。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
12掲載時のツール一覧 · 3 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| location | string | はい | ローカルコードプロジェクトのルートパス。例:/Users/xxx/my-project。zip にパッケージ化する必要はありません。 |
| functionName | string | はい | 関数名。各 region 内で一意である必要があります。 |
| region | enum | いいえ | デプロイ先のリージョンです。現在選択できるリージョンは cn-hangzhou、cn-shanghai、cn-beijing、cn-shenzhen、cn-hongkong、ap-southeast-1、ap-southeast-2、ap-southeast-3、ap-southeast-5、ap-northeast-1、eu-central-1、eu-west-1、us-west-1、us-east-1、ap-south-1、me-east-1、cn-chengdu、cn-wulanchabu、cn-guangzhou です。デフォルトは cn-hangzhou です。cn-hangzhou | cn-shanghai | cn-beijing | cn-shenzhen | cn-hongkong | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-southeast-5 | ap-northeast-1 | eu-central-1 | eu-west-1 | us-west-1 | us-east-1 | ap-south-1 | me-east-1 | cn-chengdu | cn-wulanchabu | cn-guangzhou |
| cpu | number | いいえ | 関数の CPU 仕様です。単位は vCPU で、0.05 vCPU の倍数にする必要があります。diskSize と同時に指定する必要があります。memorySize のみを指定する場合、cpu と diskSize は省略できます。メモリ仕様(GB 単位)と CPU 仕様の比率は 1~4 の範囲である必要があります。たとえば、メモリが 1024MB の場合、CPU は 0.25~1 にする必要があります。デフォルトは 1 です。 |
| memorySize | number | いいえ | 関数のメモリ仕様です。単位は MB、最小値は 128、最大値は 30720 です。選択可能なメモリ仕様は、128、256、512、1024、2048、4096、8192、16384、32768 です。デフォルトは 2048 です。メモリ仕様(GB 単位)と CPU 仕様の比率は 1~4 の範囲である必要があります。たとえば、メモリが 1024MB の場合、CPU は 0.25~1 にする必要があります。 |
| customRuntimeConfig | object | はい | カスタムランタイムの設定です。起動コマンド、引数、および起動する HTTP Server のリスニングポートを定義します。 |
| customRuntimeConfig.command | array | はい | カスタムランタイムの起動コマンドです。コマンドは root ユーザーとして /code ディレクトリで実行されます。例:python3 |
| customRuntimeConfig.args | array | いいえ | カスタムランタイムの起動コマンドの引数です。例:app.py |
| customRuntimeConfig.port | number | いいえ | カスタムランタイムが起動する HTTP Server のリスニングポートです。デフォルトは 9000 です。 |
| description | string | いいえ | 関数の説明です。関数の機能を記述できます。 |
| diskSize | number | はい | ディスクサイズです。単位は MB です。指定可能な値:512 | 10240 |
| instanceConcurrency | number | はい | インスタンスあたりの同時リクエスト数です。単一のインスタンスが同時に処理できるリクエスト数の上限を指定します。カスタムランタイムとカスタムコンテナイメージランタイムにのみ適用されます。範囲:[1, 200] |
| environmentVariables | object | いいえ | ランタイムの環境変数設定です。 |
| internetAccess | boolean | いいえ | 関数インスタンスからインターネットにアクセスできるかどうかを指定します。 |
| logConfig | any | いいえ | ログ配信の設定です。auto に設定すると、SLS ログストアが自動的に作成され、ログが配信されます。ほかの値に設定する場合は、project と logstore を設定する必要があります。 |
| vpcConfig | any | いいえ | 関数の VPC ネットワーク設定です。auto に設定すると、VPC、VSwitch、およびセキュリティグループが自動的に作成されます。ほかの値に設定する場合は、vpcId、vSwitchIds、および securityGroupId を設定する必要があります。関数インスタンスは設定された VPC ネットワーク内で実行されます。 |
| role | string | いいえ | 関数ランタイムのロール設定です。関数コンピューティングに必要な権限を付与する RAM ロールです。用途は次のとおりです。1. 関数が生成したログをログストアに送信する。2. 関数の実行中に他のクラウドリソースへアクセスするための一時アクセス トークンを生成する。通常は aliyunfcdefaultrole を設定できます。ロール ARN は acs:ram::****:role/aliyunfcdefaultrole です。aliyunfcdefaultrole のみ入力してください。 |
| runtime | enum | いいえ | 関数のランタイム環境です。カスタムランタイムでは、現在 debian10、debian11、debian12 がサポートされています。custom.debian10 | custom.debian11 | custom.debian12 |
| timeout | number | いいえ | 関数の実行タイムアウトです。単位は秒、最小値は 1 秒、デフォルトは 3 秒です。この時間を超えると、関数の実行は終了されます。 |
| layers | array | いいえ | 関数コンピューティングのレイヤー設定です。現在、custom.debian10、custom.debian11、custom.debian12 にはデフォルトのパブリックレイヤーが自動的に追加されます。 |
| tags | array | いいえ | 関数タグの key と value の設定です。 |
詳細
英語 | 中文
Alibaba Cloud FC MCP サーバー
このプロジェクトは、Serverless Devs と OpenAPI をベースとした、Alibaba Cloud Function Compute(FC)サービス用の MCP サーバーです。
使用シナリオ
Cursor、Claude、Cline など、MCP クライアントに対応したエージェントアプリケーションに Alibaba Cloud Function Compute の機能を統合します。
前提条件
- Node.js をインストールします(バージョン 18 以上が必要です)。
- Alibaba Cloud の認証情報(
AccessKeyIdとAccessKeySecret)を準備します。以下の権限を推奨します。AdministratorAccess(すべての機能を利用する場合に推奨)、または最低限、以下の権限が必要です。AliyunFCFullAccess(必須)AliyunDevsFullAccess(推奨)AliyunVPCFullAccess(推奨)AliyunLogFullAccess(推奨)AliyunEventBridgeFullAccess(任意)
クイックスタート
方法 1:npm パッケージから起動する[MCP サーバーユーザーに推奨]
次のコマンドを実行すると、stdio モードで MCP サーバーを起動できます。
ALIBABA_CLOUD_ACCESS_KEY_ID=${your-access-key-id} ALIBABA_CLOUD_ACCESS_KEY_SECRET=${your-access-key-secret} npx alibabacloud-fc-mcp-server
Cursor を使用する[推奨]
または Cursor の設定ファイル(ドキュメント)を編集し、次の設定を追加します。
"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}"
}
}

- 新しい空のプロジェクトを作成し、Cursor で開きます。エージェントモードで Cursor とチャットし、会話をガイドするために以下の
Promptsを入力します。

- Cursor エージェントに 2048 ゲームのプロジェクトを生成するよう依頼し、次に Alibaba Cloud Function Compute にデプロイするよう依頼します。

- エージェントがプロジェクトを生成し、Alibaba Cloud Function Compute にデプロイするまで待ちます。

Cline を使用する
Cline の設定ファイル(ドキュメント)を編集し、次の設定を追加します。
"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}"
}
}
方法 2:ソースコードから起動する[MCP サーバー開発者に推奨]
- まず、プロジェクトをクローンしてビルドします。
git clone https://github.com/alibaba/alibabacloud-fc-mcp-server.git
cd alibabacloud-fc-mcp-server
npm install
npm run build
- 次に、
stdioモードで MCP サーバーを起動します。
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
- 最後に、方法 1 と同様に、Cursor または Cline で MCP サーバーを設定します。
コンポーネント
ツール
put-custom-runtime-function: Alibaba Cloud のカスタムランタイム要件を満たすプロジェクトをパッケージ化し、関数を作成して、その関数にコードをデプロイします。関数がすでに存在する場合は、対象の関数を上書きして更新しようとします。この方法を使用する前に関数が存在するか確認し、必要に応じて更新を確認することをおすすめします。update-custom-runtime-function: カスタムランタイム関数を更新します。指定したパラメーターのみが更新され、その他は変更されません。get-function: 指定した関数の詳細情報を取得します。list-functions: 指定したリージョンのすべての関数を一覧表示します。関数名と一部の情報のみが返されます。詳細を確認するには、get-functionを使用してください。delete-function: 指定した関数を削除します。get-custom-domain-config: カスタムドメインのルート設定を照会します。update-custom-domain-config: カスタムドメインのルート設定を更新します。create-custom-domain-config: カスタムドメインのルート設定を作成します。ドメインはあらかじめ、パブリックな Function Compute ドメイン(形式:${uid}.${regionId}.fc.aliyuncs.com、例:14**49.cn-hangzhou.fc.aliyuncs.com)に CNAME 設定しておく必要があります。設定されていない場合、作成に失敗します。delete-custom-domain-config: カスタムドメインのルート設定を削除します。get-custom-runtime-prompt: カスタムランタイムのプロンプトを取得します。将来的に Prompts に移動する予定です。
プロンプト
# Role
You are a professional Alibaba Cloud Function Compute (FC) Copilot, focused on providing customers with advice on building and deploying code to Function Compute.
## Function Compute Build Constraints
- The project must be built before it can be deployed to Function Compute. For languages like Python, dependencies should be installed in ./python at the project root; for Node, dependencies should be installed in ./node_modules at the project root; for Java, use Maven or Gradle to package the project as a Jar with dependencies. This ensures runtime dependencies can be found.
- The project build must meet the Function Compute runtime constraints.
- You do not need to package the project; after building, you can directly use the MCP Server tools for deployment.
## Function Compute Runtime Constraints
- The user must expose a port to provide an HTTP service at runtime.
- The runtime environment is debian10, with Python 3.10, Node 20, and OpenJDK JRE 21 pre-installed.
- Function Compute provides specific runtime environments for Python, Node, Java, and Golang. Python 3.10 is installed at /opt/python3.10, and /opt/python3.10/bin as well as /code/python in the code package are added to the PATH environment variable by default. Node 20 is installed at /opt/nodejs20, and /opt/nodejs20/bin as well as /code/node_modules in the code package are added to the PATH by default. OpenJDK 21 is installed at /opt/java21, and /opt/java21/bin is added to the PATH by default, with JAVA_HOME set to /opt/java21. If you modify the PATH, you should include the above contents. Golang does not require a runtime environment.
## Skills
### Skill 1: Problem Decomposition and Analysis
- Able to deeply decompose user questions, clarify the core requirements and possible steps or commands involved.
- Provide clear task breakdown steps to ensure each step leads to the final solution.
- Organize answers in tabular form whenever possible.
### Skill 2: alibabacloud-fc-mcp-server MCP Tool Usage
- Proficient in using the alibabacloud-fc-mcp-server MCP tools to obtain function information or perform related operations.
- Task decomposition must be completed before tool invocation, ensuring the logic is clear and meets customer needs.
- Select the appropriate MCP module based on the user's specific problem, such as creating or updating custom runtime functions.
## Constraints
- **Task Decomposition First**: Detailed task breakdown steps must be provided first.
- **Clear Tool Dependency**: All operations requiring MCP tool invocation should be based on clear task requirements and logical reasoning.
- **Code Generation and Build**: Code must be built locally before being deployed and run on Function Compute. Code generation and build must meet the Function Compute build and runtime constraints.
MCP MarketPlace との統合
このプロジェクトは Alibaba Cloud MCP MarketPlace に統合されています。以下のリンクからアクセスできます。
ライセンス
このプロジェクトは MIT License のもとでライセンスされています。詳細については LICENSE ファイルを参照してください。
本プロジェクトは MIT License のもとでオープンソース化されています。詳細については LICENSE ファイルを参照してください。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。