File size: 1,205 Bytes
b3cd821
95fad9c
b3cd821
 
 
 
95fad9c
4f3d774
b3cd821
95fad9c
b3cd821
4f3d774
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3cd821
 
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
---
title: MCP Resource Server
emoji: 😻
colorFrom: indigo
colorTo: gray
sdk: docker
pinned: true
license: mit
short_description: 'Mcp Resource Server with OAuth '
app_port: 7860
---
# This Resource Rerver is the code found at
github [modelcontextprotocol/python-sdk]( https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-auth/mcp_simple_auth)
with changes made to run in a Huggingface Space as an simple free standing MCP Resource Server.

Check out [AuthO]( https://auth0.com/) for a next step.

The code was originally written to run with client, resource server, and auth server all on a single machine.

**To run this in your own HF Space**
# Duplicate this space
## Add secrets to the space (they don't have to be secret)
1. AS_HOST_NAME ((embeded hf  host name) eg  applemuncy-as.hf.space)
2. AR_HOST_NAME ((embeded hf host name) eg applemuncy-rs.hf.space)
3. Download the main.py which is the client.
4. Setup a local .venv and install mcp>=1.12.3
5. Activate the .venv enviorment.
6. Edit main to point to your RS
7. run it at the command line with python main.py

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference