hf-mcp-server
1
HF Services MCP Server is designed for integrating with the HuggingFace API and setting up various communication modes via MCP Server. It supports several transport methods, ensuring flexibility in deployment and integration.
HF Services MCP Server
Quick Guide
- Provides implementations for connecting to the HuggingFace API and deploying an MCP server.
- Supports modes: STDIO, SSE (to be deprecated), StreamableHTTP, and StreamableHTTPJson.
- Web Application and HTTP Transports start on Port 3000 by default.
- Services available at
/sse
and/mcp
endpoints.
Docker Usage
- Offers npm scripts for Docker operations: build and run the server with different transport types.
Running the Server
- Run the server using different commands for each transport type, specifying ports as needed.
Environment Variables
- Server configurations via environment variables:
PORT
,TRANSPORT_TYPE
,JSON_MODE
, andHF_TOKEN
.
Transport Endpoints
- Different transports use specific endpoints, with STDIO using stdin/stdout directly.
Transport Types
- StreamableHttp with JSON Mode: Operates in session-based or JSON stateless mode, configurable via flags, Docker type, or environment variable.
npm Scripts for JSON Mode
- Dedicated scripts for development and production in JSON mode are included.