huggingface.js exposes Hugging Face's Inference API to JavaScript, allowing agents to run ML models directly in the browser or Node.js. It provides tools for model inference, including text generation, classification, and translation. The server connects to Hugging Face's hosted models and APIs, enabling developers to integrate state-of-the-art ML capabilities into web applications without managing infrastructure.
huggingface.js exposes Hugging Face's Inference API to JavaScript, allowing agents to run ML models directly in the browser or Node.js. It provides tools for model inference, including text generation, classification, and translation. The server connects to Hugging Face's hosted models and APIs, enabling developers to integrate state-of-the-art ML capabilities into web applications without managing infrastructure.
npx -y @huggingface/rootAdd this configuration to your claude_desktop_config.json:
{
"mcpServers": {
"huggingface-huggingfacejs-github": {
"command": "npx",
"args": [
"-y",
"npx -y @huggingface/root"
]
}
}
}Restart Claude Desktop, then ask:
"What tools do you have available from huggingface.js?"
API Key Required
This server requires an API key from huggingface.js. Add it to your environment or config.
| Variable | Required | Description |
|---|---|---|
| HUGGINGFACE.JS_API_KEY | Yes | Your huggingface.js API key |
"What resources are available in huggingface.js?"
Claude will query available resources and return a list of what you can access.
"Show me details about [specific item] in huggingface.js"
Claude will fetch and display detailed information about the requested item.
"Create a new [item] in huggingface.js with [details]"
Claude will use the appropriate tool to create the resource and confirm success.
We build custom MCP integrations for B2B companies. From simple connections to complex multi-tool setups.