File size: 1,598 Bytes
0bc98aa
fb5e1ff
 
 
 
0bc98aa
fb5e1ff
 
 
 
 
 
0bc98aa
 
fb5e1ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d9a673
fb5e1ff
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
title: hub-query-staging
emoji: πŸ”Ž
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
short_description: Staging fast-agent MCP server for HF Hub queries.
hf_oauth: true
hf_oauth_expiration_minutes: 480
hf_oauth_scopes:
  - inference-api
---

# hub-query-staging

This staging Space runs a raw-passthrough fast-agent MCP server backed by the custom Monty build used for Hugging Face Hub querying.

The deployed card uses `tool_result_mode: passthrough`, so tool results are returned directly rather than rewritten by a second LLM pass.

## Auth

This Space is configured for Hugging Face OAuth/token passthrough:

- `FAST_AGENT_SERVE_OAUTH=huggingface`
- `FAST_AGENT_OAUTH_SCOPES=inference-api`
- `--instance-scope request`

The README enables Space OAuth (`hf_oauth: true`) and the container sets the fast-agent OAuth environment. `SPACE_HOST` is used by fast-agent to derive the public OAuth resource URL. No shared `HF_TOKEN` is required for user-scoped OAuth/token pass-through.

Clients can either:
- send `Authorization: Bearer <HF_TOKEN>` directly, or
- use MCP OAuth discovery/auth flow

## Model

The deployed card uses:

- `hf.openai/gpt-oss-120b:sambanova`

## Main files

- `hf-hub-query.md` β€” raw MCP card
- `tool_entrypoints.py` / `monty_api/` β€” Hub query tool implementation
- `_monty_codegen_shared.md` β€” shared codegen instructions
- `wheels/fast_agent_mcp-0.8.0-py3-none-any.whl` β€” staging fast-agent wheel from `../fast-agent-pr/`

## Dependencies

The Space installs the staged `fast-agent-mcp` wheel from this repo and `pydantic-monty==0.0.17` from PyPI.