Skip to content
Alibaba Cloud AI Agent Handbook 已开源,汇集50+工程师的一手实践经验Know more

Client API

For how to obtain and configure access credentials when using the default auth plugin, see Configure Access Credentials.

0. Client API Notes

0.1. Scope

Client APIs are intended for application runtime access and custom clients. Callers usually already know the namespaceId, groupName, dataId, serviceName, or instance information they need to access.

Good FitNot a Good Fit
Querying a single known configuration.Publishing, deleting, importing, or exporting configurations.
Registering, deregistering, querying, and discovering known services or instances.Querying full configuration lists, full service lists, subscriber lists, or other range-based data.
Searching visible AI resources, retrieving content, discovering Agent/MCP endpoints, and watching Agent changes.Managing AI resource reviews, permissions, and the complete version lifecycle.
Using HTTP for a small amount of runtime access when no suitable SDK is available.Building release platforms, operations platforms, gateway control planes, or audit tools.

Business applications should prefer SDKs. For range-based management capabilities, use Admin API or Maintainer SDK.

0.2. Unified Path Format

Nacos client APIs use a unified path format: [/$nacos.server.contextPath]/v3/client/[module]/[subPath]....

  • $nacos.server.contextPath: Root path of the client APIs. The default value is /nacos, and it can be changed with the nacos.server.contextPath configuration item.
  • module: Client API module name, such as server, cs, ns, or core.
  • subPath: Client API subpath, such as state, namespace, or config. It may contain multiple path levels.

The client APIs listed below use the default $nacos.server.contextPath. If the deployment changes $nacos.server.contextPath, update the request URL accordingly when calling the API.

The examples below also use the default Nacos Web Server port. If the deployment changes $nacos.server.main.port, update the request URL accordingly when calling the API.

0.3. Swagger Documentation

Nacos 3.X client OpenAPI also provides Swagger-style documentation. You can view it at Nacos Swagger HTTP Client API.

0.4. Authentication And Example Setup

Nacos 3.3 enables Client authentication by default. Configuration reads, service registration/discovery, and other protected requests fail without valid credentials and resource permissions.

With the default auth plugin, follow Access Credentials to log in and save the returned accessToken in the NACOS_ACCESS_TOKEN environment variable. Run the examples below in the same terminal. They use Bash (Git Bash or WSL on Windows) and send the token in the accessToken header. This header requirement applies to every protected API and is not repeated in each parameter table.

If authentication fails, check account credentials, token expiration, and resource permissions. Log in again and update the variable after expiration. Logging in to the console does not configure credentials for curl in a separate terminal.

1. Configuration Management

1.1. Get Configuration

Description

Get the specified configuration.

Since

3.0.0

Request Method

GET

Request URL

/nacos/v3/client/cs/config

Request Headers

NameTypeRequiredDescription
User-AgentstringNoUser agent. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.
Client-VersionstringNoClient version. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace. Defaults to public, which is equivalent to ''.
groupNamestringYesConfiguration group name.
dataIdstringYesConfiguration name.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes only the fields in data.

NameTypeDescription
dataConfigQueryResponseConfiguration query result.
data.contentstringConfiguration content.
data.encryptedDataKeystringEncryption/decryption key of the configuration. This value exists only when a configuration encryption plugin is used.
data.contentTypestringConfiguration type, such as TEXT or JSON.
data.md5stringMD5 value of the configuration.
data.lastModifiedintegerLast modification time of the configuration.
data.betabooleanWhether the configuration has a beta configuration.

Other fields are reserved and currently unused. You can ignore them.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/cs/config?dataId=test&groupName=test'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"resultCode": 200,
"errorCode": 0,
"message": null,
"requestId": null,
"content": "test",
"encryptedDataKey": null,
"contentType": "text",
"md5": "098f6bcd4621d373cade4e832627b4f6",
"lastModified": 1743151634823,
"tag": null,
"beta": false,
"success": true
}
}

2. Service Discovery

2.1. Register/Renew Instance

Description

Register or renew an instance.

Since

3.0.0

Request Method

POST

Request URL

/nacos/v3/client/ns/instance

Request Headers

NameTypeRequiredDescription
User-AgentstringNoUser agent. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.
Client-VersionstringNoClient version. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name.
ipstringYesIP address.
portintegerYesPort.
clusterNamestringNoCluster name. Defaults to DEFAULT.
healthybooleanNoWhether the instance is healthy. Defaults to true.
weightnumberNoInstance weight. Defaults to 1.0.
enabledbooleanNoWhether the instance is enabled. Defaults to true.
metadatastringNoInstance metadata as a JSON object string.
heartBeatbooleanNoWhether this is a renewal request. Defaults to false.
ephemeralbooleanNoWhether the instance is ephemeral.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes only the fields in data.

NameTypeDescription
datastringWhether registration or renewal succeeded. Returns ok on success, or the failure reason on failure.

Examples

  • Request example
Terminal window
# Register instance
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X POST "127.0.0.1:8848/nacos/v3/client/ns/instance" -d "serviceName=test1&ip=127.0.0.1&port=3306&ephemeral=true"
# Renew instance
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X POST "127.0.0.1:8848/nacos/v3/client/ns/instance" -d "serviceName=test1&ip=127.0.0.1&port=3306&heartBeat=true&ephemeral=true"
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.2. Deregister Instance

Description

Deregister the specified instance.

Since

3.0.0

Request Method

DELETE

Request URL

/nacos/v3/client/ns/instance

Request Headers

NameTypeRequiredDescription
User-AgentstringNoUser agent. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.
Client-VersionstringNoClient version. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name.
ipstringYesIP address.
portintegerYesPort.
clusterNamestringNoCluster name. Defaults to DEFAULT.
ephemeralbooleanNoWhether the instance is ephemeral.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes only the fields in data.

NameTypeDescription
datastringWhether deregistration succeeded. Returns ok on success, or the failure reason on failure.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X DELETE "127.0.0.1:8848/nacos/v3/client/ns/instance?serviceName=test1&ip=127.0.0.1&port=3306&ephemeral=true"
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.3. List Instances of a Service

Description

Query the detailed instance list under the specified service.

Since

3.0.0

Request Method

GET

Request URL

/nacos/v3/client/ns/instance/list

Request Headers

NameTypeRequiredDescription
User-AgentstringNoUser agent. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.
Client-VersionstringNoClient version. It is empty by default and is usually Nacos-${program-language}-Client:v${version}.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name.
clusterNamestringNoCluster name. If not provided, instances of all clusters will be returned.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes only the fields in data.

NameTypeDescription
dataarrayInstance list.
data.[i].ipstringInstance IP.
data.[i].portintegerInstance port.
data.[i].weightnumberInstance weight.
data.[i].healthybooleanWhether the instance is healthy.
data.[i].enabledbooleanWhether the instance is enabled.
data.[i].ephemeralbooleanWhether the instance is ephemeral.
data.[i].clusterNamestringCluster name of the instance.
data.[i].serviceNamestringService name.
data.[i].metadatamap<string, string>Instance metadata.
data.[i].instanceHeartBeatTimeOutintegerInstance heartbeat timeout.
data.[i].ipDeleteTimeoutintegerInstance deletion timeout.
data.[i].instanceHeartBeatIntervalintegerInstance heartbeat interval.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/ns/instance/list?serviceName=test1'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"ip": "127.0.0.1",
"port": 3306,
"weight": 1.0,
"healthy": true,
"enabled": true,
"ephemeral": true,
"clusterName": "DEFAULT",
"serviceName": "DEFAULT_GROUP@@test1",
"metadata": {},
"ipDeleteTimeout": 30000,
"instanceIdGenerator": "simple",
"instanceHeartBeatInterval": 5000,
"instanceHeartBeatTimeOut": 15000
}
]
}

3. AI

This chapter covers AI APIs for application runtime access. See the Unified Lifecycle for version publishing and visibility, and the RAD Integration Guide for Agent integration. Search returns currently visible, enabled resources; newly published resources may be temporarily absent while the index catches up.

3.1. Query Prompt

Description

Query Prompt by version, label, or latest (priority: version > label > latest); supports md5 for 304 conditional response.

Since

3.2.0

Request Method

GET

Request URL

/nacos/v3/client/ai/prompt

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
promptKeystringYesPrompt key
versionstringNoExact version, taking precedence over label; defaults to latest when both are omitted.
labelstringNoVersion label, used when version is omitted.
md5stringNoIf matches server, response is 304

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes only the fields in data.

NameTypeDescription
dataPromptPrompt content and version.
data.promptKeystringPrompt key
data.versionstringVersion
data.templatestringPrompt template content
data.md5stringContent md5 for 304
data.variablesarray<PromptVariable>Variables with name, defaultValue, and description.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/ai/prompt?promptKey=myPrompt'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"promptKey": "myPrompt",
"version": "1.0",
"template": "You are a helpful assistant.",
"md5": "..."
}
}

3.2. Get AgentSpec

Description

This interface allows getting an AgentSpec detail by namespace, name, version, or label.

Since

3.2.0

Request Method

GET

Request URL

/nacos/v3/client/ai/agentspecs

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public
namestringYesAgentSpec name
versionstringNoAgentSpec version
labelstringNoAgentSpec label
md5stringNoAgentSpec content MD5 for exact version matching

Response Data

Return body follows Nacos open API common response format; this table describes fields in data.

NameTypeDescription
dataAgentSpecAgentSpec details.
data.namespaceIdstringNamespace of the AgentSpec
data.namestringAgentSpec name
data.descriptionstringAgentSpec description
data.bizTagsstringAgentSpec business tags
data.contentstringAgentSpec content
data.resourcemap<string, AgentSpecResource>Associated resources with name, type, content, and metadata.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/ai/agentspecs?name=my-agent'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

3.3. Search AgentSpecs

Description

This interface allows paginated searching of AgentSpecs by namespace and keyword.

Since

3.2.0

Request Method

GET

Request URL

/nacos/v3/client/ai/agentspecs/search

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public
keywordstringNoSearch keyword
querystringNoInherited compatibility field, validated only for length (up to 1024 characters); use keyword to filter names.
tagsAllarray<string>NoRepeatable tags that must all match; up to 32 non-empty values.
pageNointegerNoPositive page number; defaults to 1.
pageSizeintegerNoPositive page size; defaults to 100.

Response Data

Return body follows Nacos open API common response format; this table describes fields in data.

NameTypeDescription
dataPage<AgentSpecBasicInfo>AgentSpec search results.
data.totalCountintegerTotal matching resources.
data.pageNumberintegerCurrent page number.
data.pagesAvailableintegerTotal pages.
data.pageItemsarray<AgentSpecBasicInfo>Resource summaries with namespaceId, name, description, bizTags, and updateTime.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/ai/agentspecs/search?keyword=agent&pageNo=1&pageSize=10'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

3.4. Download Skill

Description

This interface allows downloading a Skill ZIP file by namespace, name, version, or label.

Since

3.2.0

Request Method

GET

Request URL

/nacos/v3/client/ai/skills

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public
namestringYesSkill name
versionstringNoSkill version
labelstringNoSkill label
md5stringNoSkill content MD5 for exact version matching

Examples

  • Request example
Terminal window
curl -f -H "accessToken: ${NACOS_ACCESS_TOKEN}" '127.0.0.1:8848/nacos/v3/client/ai/skills?name=my-skill' -o my-skill.zip
  • Response description

A successful response is a Skill ZIP file, saved as my-skill.zip by this command. It is not wrapped in a JSON Result.

Agent Management API note: The Agent APIs in sections 3.5–3.11 are the recommended integration path going forward and are planned to gradually replace the existing A2A management APIs. New users and SDKs should prioritize compatibility with these Agent Management APIs instead of adding new dependencies on the legacy A2A APIs. Existing A2A integrations can migrate in line with future release and migration guidance. This describes the evolution of the management APIs and does not mean that the A2A protocol itself is deprecated.

3.5. Discover Agent

Description

Discovers one exact visible Agent version and its currently matching endpoint sets. Supplying X-Nacos-Client-Id renews only an already-existing HTTP Client and cannot replace Publisher heartbeat.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/agents

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringNoOptional stable identifier of an existing logical HTTP client. When present, it must contain 1 to 256 characters matching [A-Za-z0-9._:-]+ and use the same value as the client’s endpoint publisher requests. Search and Discover renew only the existing Client lifecycle; they never create an empty Client or renew Publisher liveness, so they cannot replace Publisher heartbeat.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace of the Agent. Defaults to public.
agentNamestringYesName of the Agent to discover.
versionstringNoExact Agent version to discover; mutually exclusive with label.
labelstringNoLabel used to select an Agent version; mutually exclusive with version.
protocolarray<string>NoRepeatable protocol filter used to match call interfaces.
protocolVersionstringNoProtocol version used to match call interfaces.
transportarray<string>NoRepeatable transport filter used to match endpoints.
endpointSourcearray<string>NoRepeatable endpoint-source filter whose values are RUNTIME or DECLARED.
metadataSelectorstringNoURL-encoded JSON object used to select endpoint metadata.

When both version and label are omitted, the response contains the latest definition metadata and Runtime Endpoints compatible with any currently online version. Explicit label=latest keeps only Runtime Endpoints matching the latest version.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes data and its fields.

NameTypeDescription
dataAgentDiscoveryResultAgent discovery result.
data.namespaceIdstringNamespace of the Agent.
data.agentNamestringAgent name.
data.versionstringAgent version selected by this discovery request.
data.contentDigeststringDigest of the Agent definition content.
data.descriptionstringCurrent public description of the Agent.
data.tagsarray<string>Current public tags of the Agent.
data.callInterfacesarray<AgentCallInterface>Agent call interfaces and their matching endpoint sets.
data.callInterfaces[i].protocolstringCall interface protocol.
data.callInterfaces[i].protocolVersionstringCall interface protocol version.
data.callInterfaces[i].descriptorMediaTypestringMedia type of the protocol-native descriptor.
data.callInterfaces[i].nativeDescriptorobjectProtocol-native descriptor content.
data.callInterfaces[i].endpointSetsarray<EndpointSet>Endpoint sets grouped by source.
data.callInterfaces[i].endpointSets[i].sourcestringEndpoint source: RUNTIME or DECLARED.
data.callInterfaces[i].endpointSets[i].sourceRevisionstringRevision identifier of the endpoint source.
data.callInterfaces[i].endpointSets[i].endpointsarray<Endpoint>Endpoints matched from this source.
data.callInterfaces[i].endpointSets[i].endpoints[i].uristringEndpoint URI.
data.callInterfaces[i].endpointSets[i].endpoints[i].transportstringEndpoint transport.
data.callInterfaces[i].endpointSets[i].endpoints[i].priorityintegerEndpoint priority.
data.callInterfaces[i].endpointSets[i].endpoints[i].weightnumberEndpoint weight.
data.callInterfaces[i].endpointSets[i].endpoints[i].metadatamap<string, string>Endpoint metadata.
data.callInterfaces[i].endpointSets[i].endpoints[i].healthybooleanWhether the endpoint is healthy.
data.callInterfaces[i].endpointSets[i].endpoints[i].enabledbooleanWhether the endpoint is enabled.
data.callInterfaces[i].endpointSets[i].endpoints[i].bindingsarray<RuntimeVersionBinding>Runtime version bindings of the endpoint.
data.callInterfaces[i].endpointSets[i].endpoints[i].bindings[i].runtimeVersionstringPublisher runtime version.
data.callInterfaces[i].endpointSets[i].endpoints[i].bindings[i].versionRangestringAgent version range supported by the runtime.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/ai/agents?namespaceId=public&agentName=my-agent&version=1.0.0&protocol=a2a' \
-H 'X-Nacos-Client-Id: 550e8400-e29b-41d4-a716-446655440000'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"namespaceId": "public",
"agentName": "my-agent",
"version": "1.0.0",
"contentDigest": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"callInterfaces": [
{
"protocol": "a2a",
"protocolVersion": "1.0",
"descriptorMediaType": "application/json",
"nativeDescriptor": {
"name": "my-agent",
"version": "1.0.0",
"description": "Example Agent",
"protocolVersion": "1.0",
"supportedInterfaces": [
{
"url": "https://example.com/my-agent/jsonrpc",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0",
"transport": "JSONRPC"
}
],
"capabilities": {
"streaming": true,
"extendedAgentCard": true
}
},
"endpointSets": [
{
"source": "RUNTIME",
"sourceRevision": "1",
"endpoints": [
{
"uri": "http://127.0.0.1:8081/a2a",
"transport": "HTTP+JSON",
"priority": 0,
"weight": 1.0,
"metadata": {},
"healthy": true,
"bindings": [
{
"runtimeVersion": "1.0.0",
"versionRange": "[1.0.0]"
}
]
}
]
}
]
}
]
}
}

3.6. Publish Agent Definition

Description

Publishes one exact Agent version from application code, optionally submitting it for review.

Since

3.3.0

Request Method

POST

Request parameters are encoded as an application/x-www-form-urlencoded form.

Request URL

/nacos/v3/client/ai/agents

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace of the Agent. Defaults to public.
agentNamestringYesName of the Agent to publish.
versionstringYesAgent version to publish.
displayNamestringNoAgent display name.
descriptionstringNoAgent description.
iconUrlstringNoAgent icon URL.
providerstringNoAgentProvider JSON object string with name and url.
tagsstringNoAgent tags as a JSON array string.
extensionsstringNoAgent extensions as a JSON object string.
callInterfacesstringNoJSON string containing array<AgentCallInterface>; use either this field or basedOnVersion. Required when creating an Agent.
authorstringNoAuthor of the Agent version.
changeDescriptionstringNoDescription of the changes in this version.
basedOnVersionstringNoExact Agent version whose content is copied; use either this field or callInterfaces. It cannot be used when creating an Agent.
autoSubmitbooleanNoWhether to run the ordinary submit flow; defaults to false. Creating the first version forces submission.

This API creates or fully replaces an editable Agent draft. Creating the first version submits it automatically; subsequent versions and existing drafts use autoSubmit. Submission may require review, so a successful response does not imply that the version is online. Existing non-draft versions are neither overwritten nor brought online again. See Agent Management.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes data and its fields.

NameTypeDescription
dataAgentVersionDetailAgent version details after the operation.
data.namespaceIdstringNamespace of the Agent.
data.agentNamestringAgent name.
data.versionstringAgent version.
data.statusstringAgent version status.
data.callInterfacesarray<AgentCallInterface>Agent call interface definitions.
data.callInterfaces[i].protocolstringCall interface protocol.
data.callInterfaces[i].protocolVersionstringCall interface protocol version.
data.callInterfaces[i].descriptorMediaTypestringMedia type of the protocol-native descriptor.
data.callInterfaces[i].nativeDescriptorobjectProtocol-native descriptor content.
data.callInterfaces[i].endpointSourceOrderarray<string>Order in which endpoint sources are queried.
data.callInterfaces[i].endpointSetsarray<EndpointSet>Declared endpoint sets in the definition.
data.callInterfaces[i].endpointSets[i].sourcestringDECLARED in a definition.
data.callInterfaces[i].endpointSets[i].endpointsarray<Endpoint>Declared endpoints.
data.callInterfaces[i].endpointSets[i].endpoints[i].uristringEndpoint URI.
data.callInterfaces[i].endpointSets[i].endpoints[i].transportstringEndpoint transport.
data.callInterfaces[i].endpointSets[i].endpoints[i].priorityintegerEndpoint priority.
data.callInterfaces[i].endpointSets[i].endpoints[i].weightnumberEndpoint weight.
data.callInterfaces[i].endpointSets[i].endpoints[i].metadatamap<string, string>Endpoint metadata.
data.authorstringAuthor of the Agent version.
data.changeDescriptionstringDescription of the Agent version changes.
data.contentDigeststringDigest of the Agent definition content.
data.createTimeintegerCreation time.
data.updateTimeintegerLast update time.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X POST '127.0.0.1:8848/nacos/v3/client/ai/agents' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'namespaceId=public' \
-d 'agentName=my-agent' \
-d 'version=1.0.0' \
--data-urlencode 'callInterfaces=[{"protocol":"a2a","protocolVersion":"1.0","descriptorMediaType":"application/json","nativeDescriptor":{"name":"my-agent","version":"1.0.0","description":"Example Agent","protocolVersion":"1.0","supportedInterfaces":[{"url":"https://example.com/my-agent/jsonrpc","protocolBinding":"JSONRPC","protocolVersion":"1.0","transport":"JSONRPC"}],"capabilities":{"streaming":true,"extendedAgentCard":true}},"endpointSourceOrder":["DECLARED","RUNTIME"],"endpointSets":[{"source":"DECLARED","endpoints":[{"uri":"https://example.com/my-agent/jsonrpc","transport":"JSONRPC"}]}]}]' \
-d 'author=demo' \
-d 'changeDescription=initial version' \
-d 'autoSubmit=true'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"namespaceId": "public",
"agentName": "my-agent",
"version": "1.0.0",
"status": "online",
"callInterfaces": [
{
"protocol": "a2a",
"protocolVersion": "1.0",
"descriptorMediaType": "application/json",
"nativeDescriptor": {
"name": "my-agent",
"version": "1.0.0",
"description": "Example Agent",
"protocolVersion": "1.0",
"supportedInterfaces": [
{
"url": "https://example.com/my-agent/jsonrpc",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0",
"transport": "JSONRPC"
}
],
"capabilities": {
"streaming": true,
"extendedAgentCard": true
}
},
"endpointSourceOrder": ["DECLARED", "RUNTIME"],
"endpointSets": [
{
"source": "DECLARED",
"endpoints": [
{
"uri": "https://example.com/my-agent/jsonrpc",
"transport": "JSONRPC"
}
]
}
]
}
],
"author": "demo",
"changeDescription": "initial version",
"contentDigest": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"createTime": 1785897600000,
"updateTime": 1785897600000
}
}

3.7. Register Agent Endpoints

Description

Replaces one HTTP publisher’s complete runtime endpoint batch for an Agent protocol. Reuse one stable X-Nacos-Client-Id for every batch owned by the same logical client in its bound namespace. The returned ClientLivenessInfo is the effective server policy: schedule one heartbeat task for this client id at heartbeatIntervalMillis, not one task per endpoint or batch.

Since

3.3.0

Request Method

POST

Request parameters are encoded as an application/x-www-form-urlencoded form; endpoints is a JSON array string.

Request URL

/nacos/v3/client/ai/agents/endpoints

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesRequired stable opaque identifier of the logical HTTP client. Generate one unique value per client or SDK instance, preferably with at least 96 bits of random entropy; a UUID is valid, and the value must contain 1 to 256 characters matching [A-Za-z0-9._:-]+. Reuse it for endpoint registration, deregistration, heartbeat, retries, server switches, and redo, and generate a new value after that client instance or process restarts. Do not share one id between unrelated clients or processes. The first endpoint write binds the id to the authenticated identity and namespace. The id owns all endpoint publications of that client and is a routing identifier, not a credential.
Request-ModulestringYesRequired for endpoint publisher lifecycle operations. Set Request-Module to AI.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace of the Agent. Defaults to public.
agentNamestringYesName of the Agent whose endpoints are being registered.
runtimeVersionstringYesRuntime version of the Publisher.
versionRangestringNoAgent version range supported by these endpoints.
protocolstringYesAgent protocol associated with this endpoint publication.
endpointsstringYesComplete Endpoint batch of the current Publisher as a JSON array string.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes data and its fields.

NameTypeDescription
dataClientLivenessInfoEffective HTTP Client liveness policy returned by the server.
data.heartbeatIntervalMillisintegerRecommended client heartbeat interval in milliseconds.
data.unhealthyTimeoutMillisintegerTimeout in milliseconds before the client becomes unhealthy.
data.expireTimeoutMillisintegerTimeout in milliseconds before the client and its publications expire.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X POST '127.0.0.1:8848/nacos/v3/client/ai/agents/endpoints' \
-H 'X-Nacos-Client-Id: 550e8400-e29b-41d4-a716-446655440000' \
-H 'Request-Module: AI' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'namespaceId=public' \
-d 'agentName=my-agent' \
-d 'runtimeVersion=1.0.0' \
--data-urlencode 'versionRange=[1.0.0]' \
-d 'protocol=a2a' \
--data-urlencode 'endpoints=[{"uri":"http://127.0.0.1:8081/a2a","transport":"HTTP+JSON","priority":0,"weight":1.0,"metadata":{}}]'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"heartbeatIntervalMillis": 5000,
"unhealthyTimeoutMillis": 15000,
"expireTimeoutMillis": 30000
}
}

3.8. Deregister Agent Endpoints

Description

Removes one HTTP publisher’s complete runtime endpoint publication for an Agent protocol owned by the supplied X-Nacos-Client-Id. Keep one client-level heartbeat while any publication owned by this client remains, and stop it after the last publication is removed.

This endpoint binds the ordinary namespaceId, agentName, and protocol request parameters through a dedicated form. It does not accept Endpoint natural keys or a JSON request body.

Since

3.3.0

Request Method

DELETE

Request URL

/nacos/v3/client/ai/agents/endpoints

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesRequired stable opaque identifier of the logical HTTP client. Generate one unique value per client or SDK instance, preferably with at least 96 bits of random entropy; a UUID is valid, and the value must contain 1 to 256 characters matching [A-Za-z0-9._:-]+. Reuse it for endpoint registration, deregistration, heartbeat, retries, server switches, and redo, and generate a new value after that client instance or process restarts. Do not share one id between unrelated clients or processes. The first endpoint write binds the id to the authenticated identity and namespace. The id owns all endpoint publications of that client and is a routing identifier, not a credential.
Request-ModulestringYesRequired for endpoint publisher lifecycle operations. Set Request-Module to AI.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace of the Agent. Defaults to public.
agentNamestringYesName of the Agent whose endpoints are being deregistered.
protocolstringYesAgent protocol whose endpoints are being deregistered.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes data.

NameTypeDescription
dataVoidNo business data is returned on success; the value is null.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X DELETE '127.0.0.1:8848/nacos/v3/client/ai/agents/endpoints?namespaceId=public&agentName=my-agent&protocol=a2a' \
-H 'X-Nacos-Client-Id: 550e8400-e29b-41d4-a716-446655440000' \
-H 'Request-Module: AI'
  • Response example
{
"code": 0,
"message": "success",
"data": null
}

3.9. Heartbeat Agent Endpoints

Description

Refreshes the HTTP Client and every Agent endpoint publication owned by its X-Nacos-Client-Id. Send one heartbeat task per client id regardless of endpoint, Agent, protocol, or batch count; never schedule heartbeats per endpoint. Use heartbeatIntervalMillis returned by registration or the latest heartbeat as the delay before the next heartbeat, and reschedule when a later response changes it instead of hard-coding the current defaults. unhealthyTimeoutMillis and expireTimeoutMillis are effective server thresholds and cannot be overridden by the request. Search and Discover do not renew Publisher liveness. On HTTP_CLIENT_NOT_FOUND (50404), re-register every complete desired batch before continuing heartbeats.

Since

3.3.0

Request Method

PUT

Request URL

/nacos/v3/client/ai/agents/endpoints/heartbeat

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesRequired stable opaque identifier of the logical HTTP client. Generate one unique value per client or SDK instance, preferably with at least 96 bits of random entropy; a UUID is valid, and the value must contain 1 to 256 characters matching [A-Za-z0-9._:-]+. Reuse it for endpoint registration, deregistration, heartbeat, retries, server switches, and redo, and generate a new value after that client instance or process restarts. Do not share one id between unrelated clients or processes. The first endpoint write binds the id to the authenticated identity and namespace. The id owns all endpoint publications of that client and is a routing identifier, not a credential.
Request-ModulestringYesRequired for endpoint publisher lifecycle operations. Set Request-Module to AI.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes data and its fields.

NameTypeDescription
dataClientLivenessInfoEffective HTTP Client liveness policy returned by the server.
data.heartbeatIntervalMillisintegerRecommended client heartbeat interval in milliseconds.
data.unhealthyTimeoutMillisintegerTimeout in milliseconds before the client becomes unhealthy.
data.expireTimeoutMillisintegerTimeout in milliseconds before the client and its publications expire.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X PUT '127.0.0.1:8848/nacos/v3/client/ai/agents/endpoints/heartbeat' \
-H 'X-Nacos-Client-Id: 550e8400-e29b-41d4-a716-446655440000' \
-H 'Request-Module: AI'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"heartbeatIntervalMillis": 5000,
"unhealthyTimeoutMillis": 15000,
"expireTimeoutMillis": 30000
}
}

3.10. Search Agent Catalog

Description

Searches visible Agent catalog entries by name, tags, protocols, and pagination. Supplying X-Nacos-Client-Id renews only an already-existing HTTP Client and never its endpoint Publisher liveness.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/agents/search

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringNoOptional stable identifier of an existing logical HTTP client. When present, it must contain 1 to 256 characters matching [A-Za-z0-9._:-]+ and use the same value as the client’s endpoint publisher requests. Search and Discover renew only the existing Client lifecycle; they never create an empty Client or renew Publisher liveness, so they cannot replace Publisher heartbeat.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace of the Agent. Defaults to public.
agentNameContainsstringNoLiteral, case-sensitive text that the Agent name must contain.
tagsAllarray<string>NoRepeatable parameter; a catalog entry must contain every supplied tag.
protocolsAnyarray<string>NoRepeatable parameter; a catalog entry may match any supplied protocol.
pageNointegerNoPage number starting at 1; defaults to 1.
pageSizeintegerNoPage size from 1 to 100; defaults to 20.

Response Data

The response body follows the Nacos OpenAPI common response format. The following table describes data and its fields.

NameTypeDescription
dataPage<AgentSummary>Paginated Agent catalog result.
data.totalCountintegerTotal number of matching catalog entries.
data.pageNumberintegerCurrent page number.
data.pagesAvailableintegerTotal number of available pages.
data.pageItemsarray<AgentSummary>Public metadata and online version information for the current page.
data.pageItems[i].agentNamestringAgent name.
data.pageItems[i].displayNamestringAgent display name.
data.pageItems[i].descriptionstringAgent description.
data.pageItems[i].iconUrlstringAgent icon URL.
data.pageItems[i].providerAgentProviderAgent provider.
data.pageItems[i].provider.namestringProvider name.
data.pageItems[i].provider.urlstringProvider URL.
data.pageItems[i].tagsarray<string>Agent tags.
data.pageItems[i].versionInfoAgentVersionInfoOnline versions and label mappings.
data.pageItems[i].versionInfo.labelsmap<string, string>Labels mapped to online versions, including latest.
data.pageItems[i].versionInfo.onlineVersionsarray<AgentVersionSummary>Online version summaries.
data.pageItems[i].versionInfo.onlineVersions[i].versionstringAgent version.
data.pageItems[i].versionInfo.onlineVersions[i].labelsarray<string>Custom version labels, excluding latest.
data.pageItems[i].versionInfo.onlineVersions[i].protocolsarray<string>Protocols supported by the version.

Examples

  • Request example
Terminal window
curl -H "accessToken: ${NACOS_ACCESS_TOKEN}" -X GET '127.0.0.1:8848/nacos/v3/client/ai/agents/search?namespaceId=public&agentNameContains=agent&tagsAll=assistant&protocolsAny=a2a&pageNo=1&pageSize=10' \
-H 'X-Nacos-Client-Id: 550e8400-e29b-41d4-a716-446655440000'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"totalCount": 1,
"pageNumber": 1,
"pagesAvailable": 1,
"pageItems": [
{
"agentName": "my-agent",
"displayName": "My Agent",
"description": "Example Agent",
"iconUrl": "https://example.com/icon.png",
"provider": {
"name": "example-provider",
"url": "https://example.com"
},
"tags": ["assistant"],
"versionInfo": {
"labels": {"latest": "1.0.0"},
"onlineVersions": [
{
"version": "1.0.0",
"labels": [],
"protocols": ["a2a"]
}
]
}
}
]
}
}

3.11. Watch Agent Discovery Changes

Description

Perform one batch long poll for the complete current watch set. The response only identifies changed watches; call Discover again to retrieve their complete results, then start the next poll. Prefer the RAD SDK for continuous subscriptions.

Since

3.3.0

Request Method

POST, with an application/x-www-form-urlencoded body.

Request URL

/nacos/v3/client/ai/agents/watch

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesStable client identifier, 1–256 characters matching [A-Za-z0-9._:-]+.
Request-ModulestringYesMust be AI.

Request Parameters

NameTypeRequiredDescription
generationintegerYesNon-negative, monotonically increasing watch-set generation maintained by the client to identify stale responses.
timeoutMillisintegerYesLong-poll timeout, 1000–60000 milliseconds.
watchesstringYesJSON string containing array<AgentWatchBatchItem>, with 1–1000 items in the same effective namespace.

Each watch item contains these fields:

FieldTypeDescription
clientWatchIdstringUnique within the batch, 1–128 characters matching [A-Za-z0-9._:-]+.
discoveryRequestAgentDiscoveryRequestComplete discovery request with namespaceId, reference (agentName and optional version/label), and optional filter; filters use model fields such as protocols, transports, and endpointSources.
materializedFingerprintstringRequired canonical fingerprint of the last stored complete discovery snapshot: sha256-canonical-json-v1: followed by 64 lowercase hexadecimal characters.

Java clients can calculate the fingerprint with AgentDiscoveryCanonicalizer.fingerprint(snapshot). It is neither the definition’s contentDigest nor a SHA-256 hash of the raw HTTP JSON. Replace the previous poll when the watch set changes, and ignore responses for stale generations or cancelled items.

Response Data

NameTypeDescription
dataAgentWatchBatchResponseResult of this long poll.
data.generationintegerSame generation as the request.
data.changedbooleanWhether changes occurred; false on a normal timeout.
data.changedClientWatchIdsarray<string>Watch IDs requiring another Discover, without discovery content or new fingerprints.

Examples

Save the current snapshot fingerprint for this discovery request in NACOS_AGENT_FINGERPRINT before running:

Terminal window
curl -sS -X POST 'http://127.0.0.1:8848/nacos/v3/client/ai/agents/watch' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
-H 'X-Nacos-Client-Id: agent-consumer-1' \
-H 'Request-Module: AI' \
-d 'generation=1' -d 'timeoutMillis=30000' \
--data-urlencode "watches=[{\"clientWatchId\":\"watch-1\",\"discoveryRequest\":{\"namespaceId\":\"public\",\"reference\":{\"agentName\":\"my-agent\",\"version\":\"1.0.0\"}},\"materializedFingerprint\":\"${NACOS_AGENT_FINGERPRINT}\"}]"

Normal timeout example:

{"code":0,"message":"success","data":{"generation":1,"changed":false,"changedClientWatchIds":[]}}

3.12. Query an MCP Server Version

Description

Retrieve an online MCP server version and its endpoints. Omitting the version selects latest. The optional client identifier renews only an existing HTTP Client and cannot replace endpoint heartbeats.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/mcp

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringNoStable identifier of an existing HTTP Client, 1–256 characters matching [A-Za-z0-9._:-]+.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
mcpNamestringYesMCP server name.
versionstringNoExact version; selects latest when omitted.

Response Data

NameTypeDescription
dataMcpServerDetailInfoMCP server version details.
data.namespaceIdstringNamespace.
data.idstringServer ID.
data.namestringServer name.
data.descriptionstringServer description.
data.protocolstringBackend protocol.
data.frontProtocolstringExposed protocol.
data.versionDetailServerVersionDetailVersion information with version, release_date, and is_latest.
data.versionstringVersion number.
data.remoteServerConfigMcpServerRemoteServiceConfigRemote service reference, export path, and frontend endpoint configuration.
data.localServerConfigmap<string, object>Local process configuration.
data.enabledbooleanWhether the server is enabled.
data.statusstringVersion status.
data.capabilitiesarray<string>Server capabilities.
data.backendEndpointsarray<McpEndpointInfo>Backend endpoints with protocol, address, port, path, and headers.
data.frontendEndpointsarray<McpEndpointInfo>Exposed endpoints with the same fields as backend endpoints.
data.toolSpecMcpToolSpecificationTool definitions.
data.resourceSpecMcpResourceSpecificationResource definitions.
data.allVersionsarray<ServerVersionDetail>Version list.
data.repositoryRepositorySource repository information.
data.packagesarray<Package>Distribution packages.
data.iconsarray<Icon>Icons.
data.websiteUrlstringProject website.

Examples

Terminal window
curl -sS -G 'http://127.0.0.1:8848/nacos/v3/client/ai/mcp' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
--data-urlencode 'namespaceId=public' \
--data-urlencode 'mcpName=my-mcp' \
--data-urlencode 'version=1.0.0'

3.13. Publish an MCP Version

Description

Publish an MCP version from an application. By default, the version goes directly online. With createDraft=true, only a draft is created; the resource must already use lifecycle management. Then follow the lifecycle workflow to submit and publish it.

Since

3.3.0

Request Method

POST, with an application/x-www-form-urlencoded body.

Request URL

/nacos/v3/client/ai/mcp

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
mcpNamestringNoMust equal serverSpecification.name when supplied.
serverSpecificationstringYesMcpServerBasicInfo JSON object string with server name, protocol, version, and configuration.
toolSpecificationstringNoMcpToolSpecification JSON object string.
resourceSpecificationstringNoMcpResourceSpecification JSON object string.
endpointSpecificationstringNoMcpEndpointSpec JSON object string: data contains address/port for type=DIRECT, or namespaceId/groupName/serviceName for type=REF. Supply it according to the remote server’s endpoint binding.
createDraftstringNotrue or false; defaults to false.

Response Data

NameTypeDescription
datastringMCP server ID.

Examples

This publishes a stdio server definition; it does not start the process on Nacos Server.

Terminal window
curl -sS -X POST 'http://127.0.0.1:8848/nacos/v3/client/ai/mcp' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
-d 'namespaceId=public' \
--data-urlencode 'serverSpecification={"name":"my-mcp","protocol":"stdio","frontProtocol":"stdio","versionDetail":{"version":"1.0.0"},"localServerConfig":{"command":"python","args":["server.py"]}}' \
-d 'createDraft=false'

3.14. Register an MCP Endpoint

Description

Register a runtime endpoint for a published remote MCP server configured with a service reference (REF). Prepare the remote definition and version using MCP Management; this example uses version 1.0.0 of my-remote-mcp. After registration, send heartbeats at the returned interval.

Within one identity and namespace, a logical client’s Agent/MCP publications share a stable Client ID and one heartbeat task.

Since

3.3.0

Request Method

POST, with an application/x-www-form-urlencoded body.

Request URL

/nacos/v3/client/ai/mcp/endpoints

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesStable client identifier, 1–256 characters matching [A-Za-z0-9._:-]+.
Request-ModulestringYesMust be AI.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
mcpNamestringYesMCP server name.
addressstringYesValid IPv4 or IPv6 address.
portintegerYesRuntime endpoint port, from 1 to 65535.
versionstringNoServer version for the endpoint; specify it explicitly and use the same value when deregistering.

Response Data

NameTypeDescription
dataClientLivenessInfoClient liveness settings.
data.heartbeatIntervalMillisintegerHeartbeat interval in milliseconds.
data.unhealthyTimeoutMillisintegerTimeout before being marked unhealthy, in milliseconds.
data.expireTimeoutMillisintegerExpiration timeout in milliseconds.

Examples

Terminal window
curl -sS -X POST 'http://127.0.0.1:8848/nacos/v3/client/ai/mcp/endpoints' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
-H 'X-Nacos-Client-Id: mcp-publisher-1' \
-H 'Request-Module: AI' \
-d 'namespaceId=public' -d 'mcpName=my-remote-mcp' \
-d 'address=127.0.0.1' -d 'port=9999' -d 'version=1.0.0'

Example response (use the interval from the actual response for subsequent heartbeats):

{"code":0,"message":"success","data":{"heartbeatIntervalMillis":5000,"unhealthyTimeoutMillis":15000,"expireTimeoutMillis":30000}}

3.15. Deregister an MCP Endpoint

Description

Deregister an MCP runtime endpoint owned by this HTTP Client. Use the same Client ID, server, version, address, and port as registration. This does not delete the server definition.

Since

3.3.0

Request Method

DELETE, with an application/x-www-form-urlencoded body.

Request URL

/nacos/v3/client/ai/mcp/endpoints

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesSame stable client identifier as registration.
Request-ModulestringYesMust be AI.

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
mcpNamestringYesMCP server name.
addressstringYesRegistered endpoint address.
portintegerYesRegistered endpoint port.
versionstringNoSame version as registration.

Response Data

Returns the common Result with data=null on success.

Examples

Terminal window
curl -sS -X DELETE 'http://127.0.0.1:8848/nacos/v3/client/ai/mcp/endpoints' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
-H 'X-Nacos-Client-Id: mcp-publisher-1' \
-H 'Request-Module: AI' \
-d 'namespaceId=public' -d 'mcpName=my-remote-mcp' \
-d 'address=127.0.0.1' -d 'port=9999' -d 'version=1.0.0'
{"code":0,"message":"success","data":null}

3.16. MCP Endpoint Heartbeat

Description

Renew the shared HTTP Client and all Agent/MCP publications it owns. Schedule one heartbeat task using the latest heartbeatIntervalMillis. Re-register the desired endpoints on HTTP_CLIENT_NOT_FOUND. Queries and Watch cannot replace publisher heartbeats.

Since

3.3.0

Request Method

PUT

Request URL

/nacos/v3/client/ai/mcp/endpoints/heartbeat

Request Headers

NameTypeRequiredDescription
X-Nacos-Client-IdstringYesSame stable client identifier as registration.
Request-ModulestringYesMust be AI.

Request Parameters

None.

Response Data

NameTypeDescription
dataClientLivenessInfoClient liveness settings.
data.heartbeatIntervalMillisintegerNext heartbeat interval in milliseconds.
data.unhealthyTimeoutMillisintegerTimeout before being marked unhealthy, in milliseconds.
data.expireTimeoutMillisintegerExpiration timeout in milliseconds.

Examples

Terminal window
curl -sS -X PUT 'http://127.0.0.1:8848/nacos/v3/client/ai/mcp/endpoints/heartbeat' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
-H 'X-Nacos-Client-Id: mcp-publisher-1' \
-H 'Request-Module: AI'

3.17. Search MCP Resources

Description

Search currently visible, enabled MCP resources by text, tags, protocols, and capabilities. An empty query lists resources. All tagsAll values must match; protocolsAny and capabilitiesAny each require any matching value. Different conditions are combined with AND.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/mcp/search

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
querystringNoSearch text, up to 1024 characters.
tagsAllarray<string>NoRepeatable tags that must all match; up to 32 non-empty values.
protocolsAnyarray<string>NoRepeatable protocols, any of which may match; up to 32 non-empty values.
capabilitiesAnyarray<string>NoRepeatable capabilities, any of which may match, such as TOOL, PROMPT, or RESOURCE; up to 32 non-empty values.
pageNointegerNoPositive integer; defaults to 1.
pageSizeintegerNoPositive integer; defaults to 100.

Response Data

NameTypeDescription
dataPage<McpServerBasicInfo>Paginated MCP resource results.
data.totalCountintegerTotal matching resources.
data.pageNumberintegerCurrent page number.
data.pagesAvailableintegerTotal pages.
data.pageItemsarray<McpServerBasicInfo>Server summaries on this page; use the MCP query API for endpoints and complete definitions.

Examples

Terminal window
curl -sS -G 'http://127.0.0.1:8848/nacos/v3/client/ai/mcp/search' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
--data-urlencode 'namespaceId=public' --data-urlencode 'query=weather' \
--data-urlencode 'capabilitiesAny=TOOL' \
--data-urlencode 'pageNo=1' --data-urlencode 'pageSize=20'

3.18. Search Skill Resources

Description

Search currently visible, enabled Skills by text and tags. An empty query lists resources. Use the Skill download API to retrieve content.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/skills/search

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
querystringNoSearch text, up to 1024 characters.
tagsAllarray<string>NoRepeatable tags that must all match; up to 32 non-empty values.
pageNointegerNoPositive integer; defaults to 1.
pageSizeintegerNoPositive integer; defaults to 100.

Response Data

NameTypeDescription
dataPage<SkillBasicInfo>Paginated Skill results.
data.totalCountintegerTotal matching resources.
data.pageNumberintegerCurrent page number.
data.pagesAvailableintegerTotal pages.
data.pageItemsarray<SkillBasicInfo>Summaries with namespaceId, name, description, and updateTime.

Examples

Terminal window
curl -sS -G 'http://127.0.0.1:8848/nacos/v3/client/ai/skills/search' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
--data-urlencode 'namespaceId=public' --data-urlencode 'query=travel' \
--data-urlencode 'pageNo=1' --data-urlencode 'pageSize=20'

3.19. Search Prompt Resources

Description

Search currently visible, enabled Prompts by text and tags. An empty query lists resources. Use the Prompt query API to retrieve template content.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/prompt/search

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
querystringNoSearch text, up to 1024 characters.
tagsAllarray<string>NoRepeatable tags that must all match; up to 32 non-empty values.
pageNointegerNoPositive integer; defaults to 1.
pageSizeintegerNoPositive integer; defaults to 100.

Response Data

NameTypeDescription
dataPage<PromptMetaSummary>Paginated Prompt results.
data.totalCountintegerTotal matching resources.
data.pageNumberintegerCurrent page number.
data.pagesAvailableintegerTotal pages.
data.pageItemsarray<PromptMetaSummary>Metadata summaries including promptKey, description, business tags, and version information.

Examples

Terminal window
curl -sS -G 'http://127.0.0.1:8848/nacos/v3/client/ai/prompt/search' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
--data-urlencode 'namespaceId=public' --data-urlencode 'query=assistant' \
--data-urlencode 'pageNo=1' --data-urlencode 'pageSize=20'

3.20. Search Across AI Resource Types

Description

Search currently visible, enabled AI resources using cursor pagination. A blank query lists resources; a non-blank query searches by relevance. Newly published content may be temporarily absent while the index catches up. Results are summaries; use the corresponding resource APIs to invoke or download content.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/resources/search

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace; defaults to public.
querystringNoSearch text, up to 1024 characters.
resourceTypesarray<string>NoRepeatable agent, agentspec, skill, prompt, or mcp; searches all supported types when omitted.
tagsAllarray<string>NoRepeatable tags that must all match.
capabilitiesAnyarray<string>NoRepeatable capabilities, any of which may match.
cursorstringNoPrevious page’s nextCursor, passed unchanged; omit on the first request. Up to 2048 characters.
limitintegerNoPage size from 1 to 100; defaults to 20.

Each array filter allows up to 32 non-empty values. Different conditions are combined with AND. Keep search conditions unchanged when paging; an absent nextCursor means the last page.

Response Data

NameTypeDescription
dataAiResourceSearchResponseCursor page without page numbers or totals.
data.itemsarray<AiResourceSearchItem>Resource summaries on this page.
data.nextCursorstringNext-page cursor; omitted on the last page.
data.items[i].namespaceIdstringNamespace.
data.items[i].resourceTypestringResource type.
data.items[i].resourceNamestringResource name.
data.items[i].resourceVersionstringCurrent version.
data.items[i].displayNamestringDisplay name.
data.items[i].descriptionstringDescription.
data.items[i].tagsarray<string>Tags.
data.items[i].capabilitiesarray<string>Capabilities.
data.items[i].representativeQueriesarray<string>Representative query text.
data.items[i].metadatamap<string, object>Extended resource metadata.
data.items[i].createTimeintegerCreation time.
data.items[i].updateTimeintegerUpdate time.
data.items[i].scoreintegerRelevance score.

Examples

Terminal window
curl -sS -G 'http://127.0.0.1:8848/nacos/v3/client/ai/resources/search' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}" \
--data-urlencode 'namespaceId=public' --data-urlencode 'query=travel' \
--data-urlencode 'resourceTypes=agent' --data-urlencode 'resourceTypes=skill' \
--data-urlencode 'limit=20'

Example with no matching resources:

{"code":0,"message":"success","data":{"items":[]}}

3.21. Query AI HTTP Capabilities

Description

Query this node’s Client HTTP capabilities to select a client binding. This follows Client authentication settings and checks identity without requiring permissions for specific AI resources. The result grants no resource access and does not imply support across all nodes or completed migration.

Since

3.3.0

Request Method

GET

Request URL

/nacos/v3/client/ai/capabilities

Request Parameters

None.

Response Data

NameTypeDescription
datamap<string, object>This node’s capability declaration.
data.schemaVersionintegerDeclaration format version, currently 1.
data.capabilitiesmap<string, boolean>Capability flags: radV1, mcp, skill, prompt, and agentSpec.

Examples

Terminal window
curl -sS 'http://127.0.0.1:8848/nacos/v3/client/ai/capabilities' \
-H "accessToken: ${NACOS_ACCESS_TOKEN}"
{"code":0,"message":"success","data":{"schemaVersion":1,"capabilities":{"radV1":true,"mcp":true,"skill":true,"prompt":true,"agentSpec":true}}}