Commit graph

69 commits

Author SHA1 Message Date
Paul Carleton
f2aaedaaa4
0.1.7 v0.1.7 2025-11-20 21:02:52 +00:00
Paul Carleton
d303013e5d
[auth] Implement CIMD conformance test (#37)
* add cimd test and negative test

* Improve auth-test-no-cimd.ts documentation for clarity

Address review feedback: expanded comments to better explain what CIMD is,
why this client is non-compliant, and what behavior it's testing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove .js extensions from relative imports

tsx doesn't require .js extensions for TypeScript imports.
Keeps .js for @modelcontextprotocol/sdk imports as those are external packages.

Also improves auth-test-no-cimd.ts documentation for clarity.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Skip auth/basic-cimd test until SDK support lands

Waiting on typescript-sdk PR #1127 for CIMD support.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix trailing whitespace in auth-test-no-cimd.ts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 21:00:13 +00:00
Felix Weinberger
f087e44bdb
Add JSON Schema 2020-12 conformance test (SEP-1613) (#45)
Add conformance test to validate that MCP servers correctly preserve
JSON Schema 2020-12 keywords ($schema, $defs, additionalProperties)
in tool definitions.

Changes:
- Add JsonSchema2020_12Scenario in src/scenarios/server/json-schema-2020-12.ts
- Add json_schema_2020_12_tool to everything-server with tools/list override
  to return raw JSON Schema instead of Zod-converted schema
- Register scenario in pendingClientScenariosList (requires SDK PR #1135)

The test is added to pending because the client SDK currently strips
the JSON Schema 2020-12 keywords. Once PR #1135 is merged into the SDK,
this scenario can be moved to the active list.
2025-11-20 18:20:06 +00:00
Felix Weinberger
8ef618bfe5
fix: sync package-lock.json after lefthook moved to devDeps (#46) 2025-11-20 17:18:35 +00:00
Pavel Bezglasny
7f0755627f
Fix example server elicitation conf (#29)
* fix server elicitation conf

* Remove empty elicitation object from server config

* Use ElicitResultSchema instead of z.any() for proper validation

The elicitation/create response should be validated against ElicitResultSchema
which ensures the response has the correct structure (action, content fields)
rather than accepting any response.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Paul Carleton <paulc@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
2025-11-20 14:33:37 +00:00
Paul Carleton
82d83f286b
Add metadata suite and relax lefthook requirement (#43)
* [auth] Add metadata suite for running metadata discovery tests

Adds a new 'metadata' suite that runs just the auth/metadata-* scenarios
for faster iteration when testing metadata discovery specifically.

Usage: node dist/index.mjs client --suite metadata --command "..."

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Don't require lefthook to be installed

Set assert_lefthook_installed to false so the hooks gracefully skip
if lefthook is not installed on the system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 13:31:47 +00:00
Paul Carleton
f14895ca0e
[auth] Rename basic-dcr scenarios to metadata variants (#41)
* merge metadata tests

* [auth] Rename basic-dcr scenarios to metadata variants

Consolidate auth metadata discovery scenarios with consistent naming:
- AuthBasicDCRScenario → AuthMetadataDefaultScenario (auth/metadata-default)
- AuthBasicMetadataVar1Scenario → AuthMetadataVar1Scenario (auth/metadata-var1)
- AuthBasicMetadataVar2Scenario → AuthMetadataVar2Scenario (auth/metadata-var2)
- AuthBasicMetadataVar3Scenario → AuthMetadataVar3Scenario (auth/metadata-var3)

Also updates descriptions to use consistent markdown formatting with
bold headers for Registration, PRM, and OAuth metadata fields.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 13:14:01 +00:00
Paul Carleton
eb4d67a4a9
Add --suite option to client command for running tests in parallel (#42)
Adds a --suite option to the client command that runs groups of related
tests concurrently and outputs a summary. Currently supports the 'auth' suite.

Usage: client --suite auth --command "tsx examples/clients/typescript/auth-test.ts"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 13:10:04 +00:00
Paul Carleton
32f47f4222
Use --bin flag for pkg.pr.new to show npx commands (#40)
This shows `npx` commands instead of `npm i` in PR preview comments,
which is more appropriate for this CLI tool.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 11:48:01 +00:00
Mike Kistler
3caf68722d
Set logging level before calling test_tool_with_logging (#38) 2025-11-20 11:44:28 +00:00
Paul Carleton
6239c16d42
Move lefthook to devDependencies (#39)
Lefthook was incorrectly listed as a production dependency, causing it
to install git hooks in users' repositories when they install this
conformance testing package. This is undesirable behavior - lefthook
should only be used by contributors to this repo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 11:25:27 +00:00
Paul Carleton
4a4c188cee
0.1.6 v0.1.6 2025-11-19 15:02:42 +00:00
Paul Carleton
5c151133bb
[auth] Scenarios for scope selection (#36)
* wip scope change

* rm useless bool

* fix-me: package changes for linking

* negative test

* negative test for multiple scopes

* fix displays of warnings

* wip step-up

* negative test for step up auth

* move warning into main request flow

* clean up more checks

* cleanup step-up scenario

* cleanup and simplify

* cleanup middleware

* inline negative tests

* inline the other test

* refactor logging and inlining for standalone execution too

* skip pending tests
2025-11-18 17:16:23 +00:00
dependabot[bot]
253ede03ad
Bump js-yaml in the npm_and_yarn group across 1 directory (#31)
Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 11:19:16 +00:00
Paul Carleton
f7c8c4460f
[scenario] authz metadata discovery tests: compatibility with 2025-03-26 spec, prm root, and www-authenticate (#28)
* clean up constructor calls for server lifecycle

* add back compat test

* fix dup logging, rm prm

* avoid fallbacks

* better error from example client

* add final endpoint method

* add test for OASM priority order

* s/prepack/prepare/ for npx

* try switching to .js

* make tsdown version happy default

* fix lock

* fix prmPath issue

* back to main package-lock

* fix bin path

* Add comprehensive auth scenario test suite

- Add index.test.ts to test all auth scenarios with auth-test.ts client
- Upgrade @modelcontextprotocol/sdk from 1.20.1 to 1.22.0
- All 5 auth scenarios now pass including auth/basic-metadata-var2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* consolidate tests into index.test.ts

* rename metadata

* fix comments

* rework auth scenario listing

* add 3rd variation of metadata

* fix some type issues introduced by version bump

* add reusable spec references

* more refs

* fix up spec references

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-14 18:36:07 +00:00
Inna Harper
38443d1a43
remove server requirements, move requirements to schenario description (#30) 2025-11-14 16:50:07 +00:00
Max Isbey
ee60717a06
Update dependencies in package.json and package-lock.json (#27)
Downgrade @typescript/native-preview and tsdown to previous versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-13 15:49:58 +00:00
Max Isbey
f2339987df
Upgrade vitest to v4.0.5 (#26)
Updates vitest from v2.1.8 to v4.0.5. All tests pass successfully with no code changes required.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-13 14:28:37 +00:00
Matt
aeceefa9cf
move to vitest (#18)
* feat: move to vitest

* fix: lock file

* fix: tests running sequentially on same port

* fix lock file

---------

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
2025-11-13 13:32:07 +00:00
Paul Carleton
eed3b222a1
Typecheck and lint example client
Don't do server yet, since it has its own package.json which breaks
checking imports.
2025-11-12 14:38:07 +00:00
Felix Weinberger
e19918d968
Add conformance tests for SEP-1330 elicitation enums (#22)
* Add SEP-1330 conformance test for elicitation enum schemas

Adds server-side conformance test that validates servers properly request
elicitation with SEP-1330 enum schema improvements:
- Untitled single-select enum (type: string, enum: [...])
- Titled single-select enum (oneOf with const/title)
- Legacy titled enum (enumNames for backward compatibility)
- Untitled multi-select enum (type: array, items.enum)
- Titled multi-select enum (items.anyOf with const/title)

Test expects server to implement `test_elicitation_sep1330_enums` tool.

* Add reference server implementation for SEP-1330 conformance test

Adds test_elicitation_sep1330_enums tool to everything-server that
requests elicitation with all 5 enum schema variants. Also updates
SERVER_REQUIREMENTS.md with full specification.

* Fix prettier formatting

* only test active tests (#24)

* refactor maps to pull names from the test

* bring names back

* separate active from pending

* only test active

---------

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
2025-11-11 19:34:47 +00:00
Paul Carleton
73af777bc2
Add interactive mode with verbose checking (#23)
* add back interactive mode, todo: print instructions for running w/ command and fix optional error message on command

* add verbose checking
2025-11-11 17:49:36 +00:00
Paul Carleton
091a95d059
0.1.5 v0.1.5 2025-11-11 17:31:54 +00:00
Paul Carleton
0509702849
fix repo url again 2025-11-11 17:31:49 +00:00
Paul Carleton
bf9ce3abdc
0.1.4 v0.1.4 2025-11-11 17:08:00 +00:00
Paul Carleton
207eaed73e
fix url in package.json 2025-11-11 17:07:45 +00:00
Paul Carleton
a359b25b74
0.1.3 v0.1.3 2025-11-11 16:52:40 +00:00
Paul Carleton
113dfaa1c4
go back to token auth 2025-11-11 16:52:32 +00:00
Paul Carleton
b164f5cdc8
0.1.2 v0.1.2 2025-11-11 16:32:47 +00:00
Paul Carleton
569e86704c
bump npm version in release flow 2025-11-11 16:32:24 +00:00
Paul Carleton
4b30a171e7
0.1.1 v0.1.1 2025-11-11 16:25:25 +00:00
Paul Carleton
595bf4dec8
bump beta version for release publishing (#21)
* use trusted publishing

* 0.1.1-beta.0
2025-11-11 14:59:00 +00:00
Paul Carleton
1e41ead8ac
use trusted publishing (#20) 0.1.0-alpha.1 2025-11-11 14:52:27 +00:00
Paul Carleton
f95f487ae8
[scenario] Add test for broken oauth client (#12)
* starting on broken auth client

* switch to middleware approach

* add broken example

* fix failure testing

* subset matching
2025-11-11 14:17:49 +00:00
Felix Weinberger
f7bc687819
Add client-side SEP-1034 elicitation defaults conformance test (#19)
* feat: add client-side SEP-1034 conformance test for elicitation defaults

Adds a conformance test that validates client SDKs properly apply
default values for omitted fields in elicitation responses per SEP-1034.

The test spins up a server that sends elicitation requests with defaults,
and validates that the client returns content with those defaults applied.

* feat: use elicitInput() for SEP-1034 default validation

Updates client-side test to validate server-side default application
using elicitInput() helper, which applies defaults via validation layer.
This aligns with the TypeScript SDK's SEP-1034 implementation approach.

The test now validates:
- Server uses elicitInput() with schemas containing defaults
- Client returns empty/partial content
- Server automatically applies defaults during validation
- Defaults are correctly merged for all primitive types

* refactor: use server.request() instead of elicitInput() for client-side defaults test

Ensures conformance test validates true client-side default application
rather than server-side validation behavior.

* feat: add applyDefaults capability flag for opt-in default application

Enables conformance test to opt into client-side elicitation defaults
by setting the applyDefaults capability flag.
2025-11-11 14:05:11 +00:00
Felix Weinberger
fa7a0bc6c7
fix: run npm i (#13) 2025-11-11 13:22:27 +00:00
Paul Carleton
768f155f2c
fix package-lock.json 2025-11-11 13:12:59 +00:00
Paul Carleton
8df6de59cd
fix conformance 0.1.0 2025-11-11 12:11:55 +00:00
Paul Carleton
76e9226b4b
Add publish step (#16)
* feat: tsdown

* fix: formatting

* automate version updates in cli

* fix: docs

* scenarios

* fix: commander deps

* Add publish step

* add publish step

* add tsgo

* delete old scenario

* tidy package and license

* bugs link

* combo build/test

* combo, and release type

* prepack

---------

Co-authored-by: Matt Carey <mcarey@cloudflare.com>
2025-11-11 12:05:12 +00:00
Matt
7f1515c475
tsdown + cli with commander (#17)
* feat: tsdown

* fix: formatting

* automate version updates in cli

* fix: docs

* scenarios

* fix: commander deps
2025-11-11 11:51:55 +00:00
Felix Weinberger
18f48e5dea
Add test_elicitation_sep1034_defaults to SERVER_REQUIREMENTS.md (#15)
Addresses comment from PR #14 to document the new tool that tests
SEP-1034 elicitation with default values for all primitive types.

This ensures SDK implementers know to include this tool in their
conformance test servers.
2025-11-10 18:02:54 +00:00
Felix Weinberger
0e8f13ba1e
feat: add SEP-1034 conformance test for elicitation defaults (#14)
Add comprehensive conformance test for SEP-1034 which extends MCP
elicitation to support default values across all primitive types.

Changes:
- Add test_elicitation_sep1034_defaults tool to reference server
- Create ElicitationDefaultsScenario with 5 granular checks:
  * String schema default value
  * Integer schema default value
  * Number schema default value
  * Enum schema default value (validates it's a valid enum member)
  * Boolean schema default value (regression test)
- Register scenario in index.ts

The test validates that servers properly include default values in
elicitation requestedSchema per SEP-1034 specification.

Test results: All 5 checks pass against TypeScript reference server
2025-11-10 16:04:09 +00:00
Paul Carleton
69f02a4557
[scenario] OAuth basic & PRM variation (#11)
* readme for auth tests

* wip prm test

* add example helper for local oauth w/o browser

* working through dangling timeout issue

* add better test function

* pretty printing

* add mcp method

* some more logging tweaks

* refactor logger into 1 class

* use common request logger

* fix base scenario

* some renaming

* refactor into helpers

* refactor to support second test

* rm readme

* add comment about www-authenticate
2025-11-10 11:51:30 +00:00
Paolo Ricciuti
78d6bec42a
docs: update server requirements (#10)
* docs: update server requirements

* Update SERVER_REQUIREMENTS.md

---------

Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
2025-11-09 14:35:41 +00:00
Paul Carleton
bf658c0378
Add test that ensures example server passes conformance (#9)
* add unit test for good server

* fix outdated ts-expect

* lint

* changed action to use node 22, updated package.json version to be >1.0
2025-11-04 15:43:52 +00:00
Paul Carleton
b377251b15
adjust prettier to use more defaults (#8)
* simplify prettier to use more defaults

* apply new prettier
2025-11-04 15:34:27 +00:00
Paul Carleton
05df535e40
add permissions to test github action (#5)
* Potential fix for code scanning alert no. 1: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* lint

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-04 15:29:22 +00:00
Inna Harper
a692dd7bba
[compliance tests] initial server scenarios (#4)
* spec for servers

* initial version of everything server and tests - tets are very simple

* some clean up

* lint etc.

* fix package lock agian

---------

Co-authored-by: Paul Carleton <paulc@anthropic.com>
2025-11-04 15:08:20 +00:00
Paul Carleton
44a2732b53
Add lefthook for linting and testing hooks, and optional pre-commit hook via local (#7)
* unbreak package lock

* lint

* add lefthook for prepush test and lint hook

* attempt at exiting 0 if we made a change in lint

* fix lint

* add fail text

* pre-commit test

* adjust autofix

* add lefthook example

* fix comment
2025-11-04 14:50:17 +00:00
Paul Carleton
e751676b04
unbreak package lock (#6)
* unbreak package lock

* lint
2025-11-04 14:10:03 +00:00