> ## Documentation Index
> Fetch the complete documentation index at: https://smithery.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user's namespaces or search namespaces

> When called without query params, returns the authenticated user's namespaces (backwards compatible). When query params are provided, searches public namespaces with pagination. Use ownerId to filter by owner, hasServers/hasSkills to filter by content, q for text search.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/smithery/openapi.documented.yml get /namespaces
openapi: 3.1.0
info:
  title: Smithery Platform API
  description: >-
    API for the Smithery platform — discover, deploy, and manage MCP (Model
    Context Protocol) servers. Provides endpoints for browsing the server
    registry, managing deployments, creating scoped access tokens, and
    connecting to MCP servers.
  version: 1.0.0
servers:
  - url: https://api.smithery.ai
security:
  - bearerAuth: []
tags:
  - name: servers
    description: >-
      Browse the MCP server registry, manage server configuration, and handle
      deployments
  - name: skills
    description: Discover and search reusable prompt-based skills for MCP servers
  - name: tools
    description: Search for MCP tools across all registered servers
paths:
  /namespaces:
    get:
      tags:
        - namespaces
      summary: Get user's namespaces or search namespaces
      description: >-
        When called without query params, returns the authenticated user's
        namespaces (backwards compatible). When query params are provided,
        searches public namespaces with pagination. Use ownerId to filter by
        owner, hasServers/hasSkills to filter by content, q for text search.
      operationId: getNamespaces
      parameters:
        - in: query
          name: q
          schema:
            type: string
          description: Text search query (prefix match on name)
        - in: query
          name: ownerId
          schema:
            type: string
          description: Filter by owner ID
        - in: query
          name: hasServers
          schema:
            type: string
            enum:
              - '0'
              - '1'
              - 'true'
              - 'false'
          description: Filter namespaces with servers
        - in: query
          name: hasSkills
          schema:
            type: string
            enum:
              - '0'
              - '1'
              - 'true'
              - 'false'
          description: Filter namespaces with skills
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
            maximum: 9007199254740991
        - in: query
          name: pageSize
          schema:
            type: integer
            minimum: 1
            maximum: 50
        - in: query
          name: fields
          schema:
            type: string
          description: Comma-separated list of fields to include in response
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamespacesSearchResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamespacesError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamespacesError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Smithery from '@smithery/api';


            const client = new Smithery({
              apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
            });


            // Automatically fetches more pages as needed.

            for await (const namespaceListResponse of client.namespaces.list())
            {
              console.log(namespaceListResponse.name);
            }
components:
  schemas:
    NamespacesSearchResponse:
      type: object
      properties:
        namespaces:
          type: array
          items:
            $ref: '#/components/schemas/NamespaceSearchResult'
        pagination:
          type: object
          properties:
            currentPage:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            pageSize:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            totalCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - currentPage
            - pageSize
            - totalPages
            - totalCount
          additionalProperties: false
      required:
        - namespaces
        - pagination
      additionalProperties: false
    NamespacesError:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized
      required:
        - error
      additionalProperties: false
    NamespaceSearchResult:
      type: object
      properties:
        name:
          type: string
          example: anthropic
      required:
        - name
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Smithery API key as Bearer token

````