examples: adjust conformance server for auth tests#759
examples: adjust conformance server for auth tests#759maciej-kisiel wants to merge 0 commit intomodelcontextprotocol:mainfrom
Conversation
|
I know this isn't ready for review, but could you provide a bit more context? Are there conformance tests that require auth? If so, we need this. But even if not, it still might be worth it as a good example for how to write a server that includes auth. |
|
Yes, such conformance tests are being added in modelcontextprotocol/conformance#105, which @pcarleton asked us on Discord to provide feedback for. I thought it might be a good exercise to assimilate the code base you explained to me last week. Sorry for not including the context in the first place. |
|
Thanks @maciej-kisiel !
My inclination here was to do a simpler separate server, and i'd love feedback on that decision. The main reason is that it would be annoying to have every non-auth related test pay the auth overhead, since presumably they would all return 401's if you don't send an access token. Splitting a separate server has downsides as well since then you basically can't run all server tests w/ 1 command. Some other options in the running:
lmk if you find a bug here, this was merged recently. i made the default not outputting the report since i found I wasn't looking at it frequently. you may also be interested in conformance#99 which is a new feature we're hoping to land this week for passing in a baseline file to make it easier to ratchet tests up. |
|
Sorry, I needed to re-upload this PR as #763, as initially made a mistake to use the |
This is a draft.
Early thoughts with regard to the interface:
Internal design notes: