This commit is contained in:
Chiran Fernando 2025-04-04 17:34:04 +05:30
commit 527e8d0293
4 changed files with 24 additions and 45 deletions

1
.gitignore vendored
View file

@ -18,6 +18,7 @@
*.zip
*.tar.gz
*.rar
.venv
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

View file

@ -31,8 +31,27 @@ go build -o openmcpauthproxy ./cmd/proxy
Allows you to just enable authentication and authorization for your MCP server with the preconfigured auth provider powered by Asgardeo.
If you dont have an MCP server, follow the instructions given here to start your own MCP server for testing purposes.
1. Download [sample MCP server](resources/echo_server.py)
2. Run the server with
1. Navigate to `resources` directory.
2. Initialize a virtual environment.
```bash
python3 -m venv .venv
```
3. Activate virtual environment.
```bash
source .venv/bin/activate
```
4. Install dependencies.
```
pip3 install -r requirements.txt
```
5. Start the server.
```bash
python3 echo_server.py
```
@ -58,7 +77,7 @@ The `--demo` flag enables a demonstration mode with pre-configured authenticatio
#### Connect Using an MCP Client
You can use this fork of the [MCP Inspector](https://github.com/shashimalcse/inspector) to test the connection and try out the complete authorization flow. (this is a temporary fork with fixes for authentication issues in the original implementation)
You can use this fork of the [MCP Inspector](https://github.com/shashimalcse/inspector) to test the connection and try out the complete authorization flow. (This is a temporary fork with fixes for authentication [issues](https://github.com/modelcontextprotocol/typescript-sdk/issues/257) in the original implementation)
### Use with Asgardeo

View file

@ -21,11 +21,6 @@ command:
# - "NODE_ENV=development"
path_mapping:
# /token: /oauth/token
# /register: /oidc/register
# /authorize: /authorize
# /u/login: /u/login
# /.well-known/oauth-authorization-server: /.well-known/openid-configuration
cors:
allowed_origins:
@ -44,40 +39,3 @@ demo:
org_name: "openmcpauthdemo"
client_id: "N0U9e_NNGr9mP_0fPnPfPI0a6twa"
client_secret: "qFHfiBp5gNGAO9zV4YPnDofBzzfInatfUbHyPZvM0jka"
asgardeo:
org_name: "<org_name>"
client_id: "<client_id>"
client_secret: "<client_secret>"
# default:
# base_url: "https://dev-mw4ipgsq1454jrwm.us.auth0.com"
# jwks_url: "https://dev-mw4ipgsq1454jrwm.us.auth0.com/.well-known/jwks.json"
# path:
# /.well-known/oauth-authorization-server:
# response:
# issuer: "https://dev-mw4ipgsq1454jrwm.us.auth0.com/"
# jwks_uri: "https://dev-mw4ipgsq1454jrwm.us.auth0.com/.well-known/jwks.json"
# authorization_endpoint: "https://dev-mw4ipgsq1454jrwm.us.auth0.com/authorize?audience=mcp_proxy"
# # token_endpoint: "https://dev-mw4ipgsq1454jrwm.us.auth0.com/oauth/token"
# # registration_endpoint: "https://dev-mw4ipgsq1454jrwm.us.auth0.com/oidc/register"
# response_types_supported:
# - "code"
# grant_types_supported:
# - "authorization_code"
# - "refresh_token"
# code_challenge_methods_supported:
# - "S256"
# - "plain"
# /authroize:
# addQueryParams:
# - name: "audience"
# value: "mcp_proxy"
# /token:
# addBodyParams:
# - name: "audience"
# value: "mcp_proxy"
# /register:
# addBodyParams:
# - name: "audience"
# value: "mcp_proxy"

View file

@ -0,0 +1 @@
fastmcp==0.4.1