Spaces:
Sleeping
Sleeping
apple muncy
commited on
Commit
·
4f3d774
1
Parent(s):
43732fa
add mit licence
Browse filesSigned-off-by: apple muncy <[email protected]>
LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2024 Anthropic, PBC
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
README.md
CHANGED
@@ -5,9 +5,27 @@ colorFrom: indigo
|
|
5 |
colorTo: gray
|
6 |
sdk: docker
|
7 |
pinned: true
|
8 |
-
license:
|
9 |
short_description: 'Mcp Resource Server with OAuth '
|
10 |
app_port: 7860
|
11 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
5 |
colorTo: gray
|
6 |
sdk: docker
|
7 |
pinned: true
|
8 |
+
license: mit
|
9 |
short_description: 'Mcp Resource Server with OAuth '
|
10 |
app_port: 7860
|
11 |
---
|
12 |
+
# This Resource Rerver is the code found at
|
13 |
+
github [modelcontextprotocol/python-sdk]( https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-auth/mcp_simple_auth)
|
14 |
+
with changes made to run in a Huggingface Space as an simple free standing MCP Resource Server.
|
15 |
+
|
16 |
+
Check out [AuthO]( https://auth0.com/) for a next step.
|
17 |
+
|
18 |
+
The code was originally written to run with client, resource server, and auth server all on a single machine.
|
19 |
+
|
20 |
+
**To run this in your own HF Space**
|
21 |
+
# Duplicate this space
|
22 |
+
## Add secrets to the space (they don't have to be secret)
|
23 |
+
1. AS_HOST_NAME ((embeded hf host name) eg applemuncy-as.hf.space)
|
24 |
+
2. AR_HOST_NAME ((embeded hf host name) eg applemuncy-rs.hf.space)
|
25 |
+
3. Download the main.py which is the client.
|
26 |
+
4. Setup a local .venv and install mcp>=1.12.3
|
27 |
+
5. Activate the .venv enviorment.
|
28 |
+
6. Edit main to point to your RS
|
29 |
+
7. run it at the command line with python main.py
|
30 |
|
31 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|