---
title: "Search With Tool Count"
method: POST
path: "/api/v1/apps/{app_id}/mcp_servers/search"
tags: ["MCP Servers"]
---

# Search With Tool Count

`POST /api/v1/apps/{app_id}/mcp_servers/search`

SearchWithToolCount searches MCP servers with filtering and returns per-server tool state counts.

## Path parameters

- `app_id` string, required — App identifier (required).

## Request body

- C1ApiAiGovernanceV1MCPServerServiceSearchWithToolCountRequestInput — MCPServerServiceSearchWithToolCountRequest searches MCP servers for an app with filters and returns per-server tool counts by state.
  - `includeLastCalledAt` boolean — When true, the server populates MCPServerView.last_called_at on each returned row by querying TSDB for the most recent `mcp_tool_calls` raw emit time per (app_id, connector_id). Costs one Dynamo Limit(1) read per row; callers that don't render the "Last used" value should leave false.
  - `pageSize` integer — Page size (max 100).
  - `pageToken` string — Page token for pagination.
  - `query` string — Optional text query matched against display_name.
  - `toolState` 'MCP_TOOL_STATE_UNSPECIFIED' | 'MCP_TOOL_STATE_PENDING_REVIEW' | 'MCP_TOOL_STATE_APPROVED' | 'MCP_TOOL_STATE_DISABLED' | 'MCP_TOOL_STATE_REMOVED' — Which tool state to return count for on each server.

## Response `200`

MCPServerServiceSearchWithToolCountResponse returns matching MCP servers with tool counts.

- C1ApiAiGovernanceV1MCPServerServiceSearchWithToolCountResponse — MCPServerServiceSearchWithToolCountResponse returns matching MCP servers with tool counts.
  - `list` C1ApiAiGovernanceV1MCPServerSearchWithToolCountResult[], nullable — Matching servers with counts.
    - `mcpServer` C1ApiAiGovernanceV1MCPServerView — MCPServerView is the API representation of an MCP server (backed by a Connector).
      - `appId` string — App identifier that owns this MCP server.
      - `authMethod` 'MCP_SERVER_AUTH_METHOD_UNSPECIFIED' | 'MCP_SERVER_AUTH_METHOD_NONE' | 'MCP_SERVER_AUTH_METHOD_BEARER_TOKEN' | 'MCP_SERVER_AUTH_METHOD_OAUTH2' | 'MCP_SERVER_AUTH_METHOD_CUSTOM_HEADER' | 'MCP_SERVER_AUTH_METHOD_AWS_SIGV4' | 'MCP_SERVER_AUTH_METHOD_BASIC_AUTH' — Authentication method in use. Read-only; derived from stored config.
      - `awsAccessKeyId` string — AWS SigV4 access key ID (the public half of the credential pair). Read-only; derived from stored config. Surfaced so the edit form can pre-fill the field on load without exposing the sealed secret.
      - `awsSecretAccessKeyConfigured` boolean — Whether an AWS SigV4 secret access key is configured. Read-only.
      - `awsSessionTokenConfigured` boolean — Whether an AWS SigV4 session token is configured (optional, only for STS temporary credentials). Read-only.
      - `basicAuthPasswordConfigured` boolean — Whether a basic-auth password is configured (admin-supplied for SHARED, irrelevant for PER_USER). Read-only; derived from stored config.
      - `basicAuthUsername` string — The username configured for basic-auth. Read-only.
      - `bearerTokenConfigured` boolean — Whether a bearer-token credential is configured (admin-supplied for SHARED, irrelevant for PER_USER). Read-only; derived from stored config. Mirrors oauth2_credentials_configured for the bearer-token auth method so the edit form can render the password input as "configured" without exposing the sealed bytes.
      - `configFieldValues` object — Non-secret configuration field values keyed by catalog config field name. Read-only; populated from the stored config. Secret fields are omitted.
      - `connectorId` string — Unique identifier (connector ID).
      - `createdAt` string, date-time, nullable
      - `credentialsSetupUrl` string — Deep link to the server's detail page in the C1 admin UI, where an admin enters or rotates credentials in the browser. Lets an agent hand its human a clickable link for credential entry so the secret value never transits the agent transcript. Empty when the tenant frontend URL can't be resolved. Read-only.
      - `customHeaderName` string — The HTTP header name configured for custom-header auth. Read-only; derived from stored config. Surfaced so the admin edit form can pre-fill the field on load — without this, the form shows blank and the admin has to retype it on every edit (which loses the value if they only meant to flip token_sharing).
      - `customHeaderValueConfigured` boolean — Whether a custom-header value is configured (admin-supplied for SHARED, irrelevant for PER_USER). Read-only; derived from stored config.
      - `dataSensitivity` 'MCP_SERVER_DATA_SENSITIVITY_UNSPECIFIED' | 'MCP_SERVER_DATA_SENSITIVITY_PUBLIC' | 'MCP_SERVER_DATA_SENSITIVITY_INTERNAL' | 'MCP_SERVER_DATA_SENSITIVITY_CONFIDENTIAL' | 'MCP_SERVER_DATA_SENSITIVITY_RESTRICTED' — Data sensitivity classification.
      - `defaultToolPrefix` string — Default tool-name prefix used when tool_prefix is unset (the hosted impl's server_prefix / service name); empty for external or legacy servers. Read-only.
      - `description` string — Admin-provided description.
      - `displayName` string — Admin-provided display name.
      - `endpointUrl` string — Endpoint URL for external MCP servers. Read-only.
      - `lastCalledAt` string, date-time, nullable
      - `mcpServerCatalogId` string — Opaque catalog entry ID for hosted MCP servers (27-character KSUID). Obtain valid IDs from the ListCatalog or GetCatalog RPCs.
      - `oauth2AuthorizeUrl` string — OAuth2 authorization URL. Read-only; derived from stored config.
      - `oauth2ClientId` string — OAuth2 client ID (non-secret). Read-only; derived from stored config.
      - `oauth2ClientIdMode` 'MCP_SERVER_AUTH_OAUTH2_CLIENT_ID_MODE_UNSPECIFIED' | 'MCP_SERVER_AUTH_OAUTH2_CLIENT_ID_MODE_DCR' | 'MCP_SERVER_AUTH_OAUTH2_CLIENT_ID_MODE_CIMD' — How the OAuth2 client_id was acquired (manual / DCR / CIMD). Read-only; derived from stored config. Empty for non-authorization_code servers.
      - `oauth2ClientSecretExpiresAt` string, int64 — RFC 7591 client_secret expiry (unix seconds; 0 = never). Read-only; derived from stored config. Surfaced for display only.
      - `oauth2CodeChallengeMethodsSupported` string[], nullable — PKCE code-challenge methods the IdP advertised at registration. Read-only; derived from stored config. Surfaced so the edit form's change detection can compare against the saved value rather than an implicit empty default — without this, re-running Discover on a server with stable methods always reports the field as changed and fires a spurious UpdateCredentials.
      - `oauth2CredentialsConfigured` boolean — Whether OAuth2 client credentials (client_id + client_secret) are configured. Read-only.
      - `oauth2ExtraAuthorizeParams` object — Static query params appended to the OAuth2 authorize URL. Read-only on the view; the edit form surfaces this as an editable key/value list. Empty for non-authorization_code servers.
      - `oauth2ExtraTokenParams` object — Extra body params POSTed to the OAuth2 token endpoint. Read-only on the view; the edit form takes this value and surfaces it as an editable key/value list. Empty for non-OAuth2 / non-client-credentials servers.
      - `oauth2IssuerUrl` string — OAuth2 issuer URL. Read-only; derived from stored config. Surfaced so the registration UI can prefill the Discover input box on edit.
      - `oauth2JwtAudience` string — JWT audience claim. Read-only.
      - `oauth2JwtIssuer` string — JWT issuer (service account email). Read-only.
      - `oauth2JwtPrivateKeyConfigured` boolean — Whether a JWT private key is configured. Read-only.
      - `oauth2JwtSubject` string — JWT subject (domain-wide delegation). Read-only.
      - `oauth2Mode` 'MCP_SERVER_AUTH_OAUTH2_MODE_UNSPECIFIED' | 'MCP_SERVER_AUTH_OAUTH2_MODE_SERVICE' | 'MCP_SERVER_AUTH_OAUTH2_MODE_PASSTHROUGH' | 'MCP_SERVER_AUTH_OAUTH2_MODE_CLIENT_CREDENTIALS' | 'MCP_SERVER_AUTH_OAUTH2_MODE_JWT_BEARER' | 'MCP_SERVER_AUTH_OAUTH2_MODE_GOOGLE_SERVICE_ACCOUNT' | 'MCP_SERVER_AUTH_OAUTH2_MODE_AUTHORIZATION_CODE' — OAuth2 mode in use. Read-only; derived from stored config.
      - `oauth2Pkce` string — PKCE behavior for authorization_code mode: "discover" (or empty), "s256", or "disabled". Read-only on the view. Empty for non-authorization_code servers.
      - `oauth2Scopes` string[], nullable — OAuth2 scopes. Read-only; derived from stored config.
      - `oauth2ScopesSupported` string[], nullable — OAuth scopes the IdP advertised in its discovery doc at the most recent Discover. Read-only; derived from stored config. Surfaced so the edit form can populate the Scopes chips-input autocomplete from a previously-discovered list without forcing the admin to re-run Discover. Distinct from oauth2_scopes (= the requested subset).
      - `oauth2ServiceAuthorized` boolean — Whether a service-mode OAuth2 credential exists. Read-only.
      - `oauth2ServiceAuthorizedAsEmail` string — Email of the external identity authorized (from ID token). Read-only.
      - `oauth2ServiceAuthorizedAsName` string — Display name of the external identity authorized (from ID token). Read-only.
      - `oauth2ServiceAuthorizedAt` string, date-time, nullable
      - `oauth2ServiceAuthorizedBy` string — Passport user ID of who authorized the service-mode OAuth2 credential. Read-only.
      - `oauth2TokenEndpointAuthMethod` string — RFC 7591 token_endpoint_auth_method the authorization server assigned ("none" for public PKCE-only clients). Read-only; server-set from the DCR result. Empty for manual / non-DCR servers.
      - `oauth2TokenUrl` string — OAuth2 token URL. Read-only; derived from stored config.
      - `requireToolApproval` 'OPTIONAL_BOOL_UNSPECIFIED' | 'OPTIONAL_BOOL_TRUE' | 'OPTIONAL_BOOL_FALSE' — Per-server override for tool auto-approval.
      - `serverType` 'MCP_SERVER_TYPE_UNSPECIFIED' | 'MCP_SERVER_TYPE_HOSTED' | 'MCP_SERVER_TYPE_EXTERNAL' — Whether this is a hosted MCP server.
      - `sourceAppId` string — Source app ID (hosted servers only).
      - `tokenSharing` 'MCP_SERVER_TOKEN_SHARING_UNSPECIFIED' | 'MCP_SERVER_TOKEN_SHARING_SHARED' | 'MCP_SERVER_TOKEN_SHARING_PER_USER' — Token sharing model in use. Read-only; derived from stored config. For rows stored under the legacy SERVICE/PASSTHROUGH OAuth2 modes, this is synthesized as SHARED/PER_USER respectively.
      - `toolPrefix` string — Admin-configured prefix for tool names in the C1 MCP server. Tools are exposed as "<tool_prefix>_<tool_name>". When empty, the system uses an auto-derived prefix (service name or hostname).
      - `transportType` 'MCP_SERVER_TRANSPORT_TYPE_UNSPECIFIED' | 'MCP_SERVER_TRANSPORT_TYPE_STREAMABLE_HTTP' | 'MCP_SERVER_TRANSPORT_TYPE_SSE' — Transport type for external MCP servers. Read-only.
      - `tunnelApplianceId` string — Credential id (cutename) used to route tool calls through the bridge. Set only when tunneled == true. Read-only.
      - `tunnelBridgeId` string — ID of the bridge (TunnelConnection.id, a KSUID) that proxies this server. Set only when tunneled == true. Read-only.
      - `tunnelServiceName` string — Bridge-announced service name used to route to this server. Set only when tunneled == true. Read-only.
      - `tunneled` boolean — Whether the MCP server is reached over a tunnel to a private bridge appliance instead of a public URL. Read-only.
      - `updatedAt` string, date-time, nullable
    - `toolCount` string, int64 — The toolCount field.
  - `nextPageToken` string — Token for next page.

---

[API](https://skmtc.net/conductorone/apis/c1-api.md) · [All operations](https://skmtc.net/conductorone/apis/c1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/conductorone/c1-api/revisions/f2cf3228f366/schema)
