diff --git a/.gitignore b/.gitignore index 6c1dd97..2a2b503 100644 --- a/.gitignore +++ b/.gitignore @@ -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* diff --git a/README.md b/README.md index 0ba80d9..d00f16e 100644 --- a/README.md +++ b/README.md @@ -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 don’t 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 diff --git a/config.yaml b/config.yaml index 76884b9..867216c 100644 --- a/config.yaml +++ b/config.yaml @@ -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: "" - client_id: "" - 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" - diff --git a/resources/requirements.txt b/resources/requirements.txt new file mode 100644 index 0000000..102b728 --- /dev/null +++ b/resources/requirements.txt @@ -0,0 +1 @@ +fastmcp==0.4.1 \ No newline at end of file