Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Hugging face MCP connector

OAuth 2.1/DCR AIDeveloper 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.

Name Type Required Description
operation string optional Action to perform: discover lists available tasks, view_parameters inspects a space, invoke runs it.
parameters string optional JSON string of input parameters. Used only with the "invoke" operation.
space_name string optional Space 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.

Name Type Required Description
prompt string optional Text prompt describing the desired image content
random_seed boolean optional Generate a new random seed for each run. Set to false to use the value in the seed field.
resolution string optional Output resolution in "WIDTHxHEIGHT ( RATIO )" format.
seed integer optional Seed value for reproducible image generation. Ignored when random_seed is true.
shift number optional Time shift parameter for the flow matching scheduler. Controls generation quality.
steps number optional Number 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.

Name Type Required Description
doc_url string required Full URL of the Hugging Face or Gradio documentation page to fetch.
offset number optional Token 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.

Name Type Required Description
message string required Natural 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.

Name Type Required Description
repo_ids array required One or more repository IDs in "author/name" format. Supports models, datasets, and spaces.
config string optional Dataset Viewer config name. Required for dataset_preview when the dataset has multiple configs. Discover available configs via dataset_structure.
limit integer optional Number of rows to return for dataset_preview. Defaults to 5; clamped between 1 and 100.
offset integer optional Row offset for dataset_preview pagination. Defaults to 0.
operations array optional Details to return. Defaults to ["overview"]. For datasets, use ["overview", "dataset_structure"] first, then ["dataset_preview"] with config and split.
repo_type string optional Repository type to look up. Auto-detected when omitted.
split string optional Dataset split name. Required for dataset_preview when the dataset has multiple splits. Discover available splits via dataset_structure.