batuta mcp
Run Batuta as an MCP (Model Context Protocol) server for AI tool integration.
Synopsis
batuta mcp [TRANSPORT]
Description
The MCP server exposes Batuta’s HuggingFace integration as tools that AI assistants (Claude, etc.) can invoke via JSON-RPC 2.0 over stdio. This enables AI-assisted model discovery and management.
Transport Modes
| Transport | Description |
|---|---|
stdio (default) | JSON-RPC 2.0 over stdin/stdout |
Available Tools
| Tool | Description |
|---|---|
hf_search | Search HuggingFace Hub for models, datasets, or spaces |
hf_info | Get metadata about a specific repository |
hf_pull | Download a model or dataset from HuggingFace |
hf_push | Upload artifacts to HuggingFace Hub |
Examples
Start MCP Server
$ batuta mcp
# Server listens on stdin for JSON-RPC 2.0 messages
JSON-RPC Initialize
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"capabilities":{}}}
List Available Tools
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
Claude Desktop Integration
Add to claude_desktop_config.json:
{
"mcpServers": {
"batuta": {
"command": "batuta",
"args": ["mcp"]
}
}
}
See Also
- MCP Tooling
batuta hf- CLI HuggingFace commands
Previous: batuta bug-hunter
Next: batuta serve