mcpField
M
MCP Server Reference Implementation

MCP Server Reference Implementation

Local
github.com/QuantGeekDevDeveloper Tools9Updated 73w ago

About MCP Server Reference Implementation

A TypeScript reference implementation of draft MCP authorization-spec updates, intended for developers testing OAuth-based authorization flows. It supports Cognito and self-hosted Keycloak providers and validates the `mcp:access` scope.

Key features

  1. 01Draft authorization spec implementation
  2. 02Cognito and Keycloak providers
  3. 03`mcp:access` scope validation
  4. 04TypeScript SDK based

Use cases

  1. 01Testing MCP authorization flows
  2. 02Configuring Cognito-backed resource servers
  3. 03Experimenting with Keycloak authentication

MCP support

Implements a reference MCP server for the draft authorization specification, including authorization-server discovery-related updates. MCP clients can use it to test authorized access.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Server Reference Implementation

This is a reference MCP Server implementation of the draft Authorization spec updates using the official typescript sdk.

This repo can be used with this Postman collection

Authentication Providers

There are two separate auth provider options:

  1. Cognito
  2. Keycloak (self-hosted)

We validate the scope: mcp:access, with <resource-id>/mcp:access. For example, https://mcp-server.com/mcp:access

Important Note

Keep in mind that OAuth 2.1 doesn't allow http protocol, so you will want to use ngrok with a static url (available for free from ngrok) to properly test this out.

If you want to use localhost without ngrok because you don't care, you can override the PORT and PROTOCOL env variables for the authorization and resource servers by setting them in .envs (check config folder if you're confused)

Setup with ngrok

  1. Build and start the server:

    npm i
    npm run build
    npm run start
    
  2. The MCP server will start on port 1335.

  3. In another terminal, create the ngrok tunnel to the MCP server:

    ngrok http --domain=<get-a-custom-domain-from-ngrok(free)-and-place-here> 1335
    
  4. Configure this resource server in the Domains tab of your AWS Cognito dashboard

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.