Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Hugging face MCP connector

OAuth 2.1/DCRAIDeveloper Tools

Connect to Hugging Face MCP. Search and manage models, datasets, spaces, and collections on the Hugging Face Hub.

Hugging face MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'huggingfacemcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Hugging face MCP:', link)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'huggingfacemcp_hf_whoami',
    toolInput: {},
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Search space, paper, hub repo — Search Hugging Face Spaces by query and return matching spaces with relevance scores
  • Details hub repo — Retrieve details for one or more Hugging Face Hub repositories by their IDs
  • Whoami hf — Return the currently authenticated Hugging Face user’s profile information
  • Query hf hub — Ask a natural language question about the Hugging Face Hub and get an AI-generated answer
  • Fetch hf doc — Fetch the content of a Hugging Face documentation page by URL, with optional character offset for pagination
  • Generate gr1 z image turbo — Generate an image from a text prompt using the Image Turbo model hosted on Hugging Face Spaces

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

huggingfacemcp_dynamic_space#Call a Hugging Face MCP-enabled Space dynamically. Use 'discover' to list available MCP spaces, 'view_parameters' to inspect a space's tools, or 'invoke' to call a specific tool.3 params

Call a Hugging Face MCP-enabled Space dynamically. Use 'discover' to list available MCP spaces, 'view_parameters' to inspect a space's tools, or 'invoke' to call a specific tool.

NameTypeRequiredDescription
operationstringoptionalAction to perform: discover lists available tasks, view_parameters inspects a space, invoke runs it.
parametersstringoptionalJSON string of input parameters. Used only with the "invoke" operation.
space_namestringoptionalSpace ID in "username/space-name" format. Required for "view_parameters" and "invoke" operations.
huggingfacemcp_gr1_z_image_turbo_generate#Generate an image from a text prompt using the Image Turbo model hosted on Hugging Face Spaces.6 params

Generate an image from a text prompt using the Image Turbo model hosted on Hugging Face Spaces.

NameTypeRequiredDescription
promptstringoptionalText prompt describing the desired image content
random_seedbooleanoptionalGenerate a new random seed for each run. Set to false to use the value in the seed field.
resolutionstringoptionalOutput resolution in "WIDTHxHEIGHT ( RATIO )" format.
seedintegeroptionalSeed value for reproducible image generation. Ignored when random_seed is true.
shiftnumberoptionalTime shift parameter for the flow matching scheduler. Controls generation quality.
stepsnumberoptionalNumber of inference steps for the diffusion process. Higher values improve quality but take longer.
huggingfacemcp_hf_doc_fetch#Fetch the content of a Hugging Face documentation page by URL, with optional character offset for pagination.2 params

Fetch the content of a Hugging Face documentation page by URL, with optional character offset for pagination.

NameTypeRequiredDescription
doc_urlstringrequiredFull URL of the Hugging Face or Gradio documentation page to fetch.
offsetnumberoptionalToken offset for paginating large documents. Use the offset value from the truncation message to fetch the next chunk.
huggingfacemcp_hf_hub_query#Ask a natural language question about the Hugging Face Hub and get an AI-generated answer.1 param

Ask a natural language question about the Hugging Face Hub and get an AI-generated answer.

NameTypeRequiredDescription
messagestringrequiredNatural language query to run against the Hugging Face Hub.
huggingfacemcp_hf_whoami#Return the currently authenticated Hugging Face user's profile information.0 params

Return the currently authenticated Hugging Face user's profile information.

huggingfacemcp_hub_repo_details#Retrieve details for one or more Hugging Face Hub repositories by their IDs.7 params

Retrieve details for one or more Hugging Face Hub repositories by their IDs.

NameTypeRequiredDescription
repo_idsarrayrequiredOne or more repository IDs in "author/name" format. Supports models, datasets, and spaces.
configstringoptionalDataset Viewer config name. Required for dataset_preview when the dataset has multiple configs. Discover available configs via dataset_structure.
limitintegeroptionalNumber of rows to return for dataset_preview. Defaults to 5; clamped between 1 and 100.
offsetintegeroptionalRow offset for dataset_preview pagination. Defaults to 0.
operationsarrayoptionalDetails to return. Defaults to ["overview"]. For datasets, use ["overview", "dataset_structure"] first, then ["dataset_preview"] with config and split.
repo_typestringoptionalRepository type to look up. Auto-detected when omitted.
splitstringoptionalDataset split name. Required for dataset_preview when the dataset has multiple splits. Discover available splits via dataset_structure.