ESA MCP Server is an implementation of the Model Context Protocol (MCP) server, designed to facilitate communication between AI models and Edge Security Acceleration (ESA) services. This server acts as a bridge, allowing models to leverage ESA features through a standardized protocol.
Configure in your MCP-enabled client config:
{
"mcpServers": {
"esa-mcp-server": {
"command": "npx",
"args": ["-y", "mcp-server-esa"],
"env": {
"ESA_ACCESS_KEY_ID": "your AK",
"ESA_ACCESS_KEY_SECRET": "your SK"
}
}
}
}
Claude Demo
Cline Demo
Cline configured successfully:
Claude configured successfully:
The server provides the following ESA tools callable via the MCP protocol:
Create a Routine
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Routine name, supports lowercase letters, numbers, and hyphens, must start with a lowercase letter, min 2 chars |
description | string | No | Routine description, no spaces allowed |
code | string | Yes | Routine source code, e.g.:export default { async fetch(request) { return handleRequest(request); } } |
Delete a Routine
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the Routine to delete |
List all Routines
No parameters required.
Get Routine details
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the Routine to query |
Commit Routine code
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Routine name |
code | string | Yes | Routine source code |
Deploy Routine code
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Routine name |
codeVersion | string | Yes | Routine version, must be valid semver |
env | string | Yes | Routine environment: "production" or "staging" |
canaryAreaList | array | No | Canary release areas, must be valid area names (see canary_area_list) |
canaryCodeVersion | string | No | Canary version, must be valid semver |
List all available canary areas for Routine deployment
No parameters required.
Delete a deployment
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Deployment name |
Create a route for a Routine
Parameter | Type | Required | Description |
---|---|---|---|
siteId | number | Yes | Site ID |
mode | string | Yes | Route mode: 'simple' or 'custom' |
route | string | Required by mode | Route path (required if mode is 'simple') |
rule | string | Yes | Route rule (required if mode is 'custom') |
routineName | string | Yes | Routine name |
routeName | string | Yes | Route name |
bypass | string | Yes | Bypass: 'on' or 'off' (default 'off') |
routeEnable | string | Yes | Enable: 'on' or 'off' (default 'on') |
sequence | number | No | Route sequence (default: current count) |
Update a Routine route
Parameter | Type | Required | Description |
---|---|---|---|
siteId | number | Yes | Site ID |
configId | number | Yes | Config ID |
routeName | string | Yes | Route name |
routeEnable | string | Yes | Enable: 'on' or 'off' |
rule | string | Yes | Route rule |
routineName | string | Yes | Routine name |
bypass | string | Yes | Bypass: 'on' or 'off' |
sequence | number | No | Route sequence |
Delete a Routine route
Parameter | Type | Required | Description |
---|---|---|---|
siteId | number | Yes | Site ID |
configId | number | Yes | Config ID |
Get a Routine-related route
Parameter | Type | Required | Description |
---|---|---|---|
siteId | number | Yes | Site ID |
configId | number | Yes | Config ID |
List all routes of a Routine
Parameter | Type | Required | Description |
---|---|---|---|
routineName | string | Yes | Routine name |
routeName | string | No | Route name, used to filter list results |
pageNumber | number | No | Route page number |
pageSize | number | No | Routes per page |
List all routes of a site
Parameter | Type | Required | Description |
---|---|---|---|
siteId | number | Yes | Site ID |
routeName | string | No | Route name, used to filter list results |
pageNumber | number | No | Route page number |
pageSize | number | No | Routes per page |
Create a record
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | The name of the routine |
siteId | number | Yes | The ID of the site |
recordName | string | Yes | The name of the record |
Delete a record
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | The name of the routine |
siteId | number | Yes | The ID of the site |
recordName | string | Yes | The name of the record |
recordId | number | No | The ID of the record |
List all records
Parameter | Type | Required | Description |
---|---|---|---|
Name | string | Yes | The name of the routine |
PageNumber | number | No | The page number of the records |
PageSize | number | No | The page size of the records |
SearchKeyWord | string | No | The search key word |
List all active sites
No parameters required.
Check which site under the account matches the user input
Parameter | Type | Required | Description |
---|---|---|---|
recordName | string | Yes | The name of the site to match |
Create an A record for a site
Parameter | Type | Required | Description |
---|---|---|---|
recordName | string | Yes | The name of the DNS record (e.g., subdomain or full domain) |
siteId | number | Yes | The ID of the site, obtained from the ListSites operation |
data | object | Yes | The data for the DNS record, with value property |
data.value | string | Yes | The IP address of the A record (e.g., "2.2.2.2") |
Create a CNAME domain record for a site
Parameter | Type | Required | Description |
---|---|---|---|
recordName | string | Yes | The name of the DNS record (e.g., subdomain or full domain) |
siteId | number | Yes | The ID of the site, obtained from the ListSites operation |
data | object | Yes | The data for the DNS record, with value property |
data.value | string | Yes | The domain value for the CNAME record |
List all records in a site
Parameter | Type | Required | Description |
---|---|---|---|
SiteId | number | Yes | The ID of the site, obtained from the ListSites operation |
npm run build
- Build the project using rslibnpm run dev
- Run build in watch mode for developmentnpm run format
- Format code using Prettiernpm run lint
- Check code using ESLintsrc/index.ts
- Main entry pointsrc/tools/
- ESA tool implementationssrc/utils/
- Utilities and helpersISC
For Alibaba internal contributors, please follow the standard contribution workflow for the project.
Seamless access to top MCP servers powering the future of AI integration.