Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Include what changed, why, and how to migrate. Search for related sections and g
- **TypeScript**: Strict type checking, ES modules, explicit return types
- **Naming**: PascalCase for classes/types, camelCase for functions/variables
- **Files**: Lowercase with hyphens, test files with `.test.ts` suffix
- **Imports**: ES module style, include `.js` extension, group imports logically
- **Imports**: ES module style, no `.js` extension on relative imports (project uses `moduleResolution: bundler`), group imports logically
- **Formatting**: 2-space indentation, semicolons required, single quotes preferred
- **Testing**: Place tests under each package's `test/` directory (vitest only includes `test/**/*.test.ts`), use descriptive test names
- **Comments**: JSDoc for public APIs, inline comments for complex logic
Expand Down
4 changes: 2 additions & 2 deletions common/tsconfig/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compilerOptions": {
"target": "esnext",
"lib": ["esnext"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"module": "ESNext",
"moduleResolution": "bundler",
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
Expand Down
4 changes: 2 additions & 2 deletions examples/client-quickstart/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compilerOptions": {
"target": "ES2023",
"lib": ["ES2023"],
"module": "Node16",
"moduleResolution": "Node16",
"module": "ESNext",
"moduleResolution": "bundler",

Check failure on line 6 in examples/client-quickstart/tsconfig.json

View check run for this annotation

Claude / Claude Code Review

Quickstart tsconfig.json now contradicts docs/{client,server}-quickstart.md

This change flips the two quickstart `tsconfig.json` files to `ESNext`/`bundler`, but `docs/client-quickstart.md` (lines 88–104) and `docs/server-quickstart.md` (lines 103–118) still tell users to create a tsconfig with `"module": "Node16"` / `"moduleResolution": "Node16"` — those blocks are plain ```json fences (no `source=`), so `sync:snippets --check` doesn't catch the drift. Since the quickstarts are user-facing templates that build with plain `tsc` and run the emitted `./build/index.js` dir
Comment on lines +5 to +6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 This change flips the two quickstart tsconfig.json files to ESNext/bundler, but docs/client-quickstart.md (lines 88–104) and docs/server-quickstart.md (lines 103–118) still tell users to create a tsconfig with "module": "Node16" / "moduleResolution": "Node16" — those blocks are plain ```json fences (no source=), so `sync:snippets --check` doesn't catch the drift. Since the quickstarts are user-facing templates that build with plain `tsc` and run the emitted `./build/index.js` directly under Node (no bundler involved), I'd lean toward leaving these two tsconfigs on `Node16`/`NodeNext` and only flipping the shared `common/tsconfig`; otherwise the two doc files need updating to match.

Extended reasoning...

What the issue is. This PR changes examples/client-quickstart/tsconfig.json and examples/server-quickstart/tsconfig.json from "module": "Node16" / "moduleResolution": "Node16" to "module": "ESNext" / "moduleResolution": "bundler". However, the user-facing quickstart guides that these example projects mirror — docs/client-quickstart.md (the "Create a tsconfig.json" block at lines 88–104) and docs/server-quickstart.md (lines 103–118) — were not updated and still instruct users to write "module": "Node16" / "moduleResolution": "Node16". Before this PR the two example tsconfigs and the two doc snippets were field-for-field identical; after it they diverge on module/moduleResolution.

Why CI doesn't catch it. Only the .ts code regions in those docs are auto-synced via source=-tagged fences; the tsconfig blocks are plain ```json fences with no source= attribute, so `pnpm sync:snippets --check` (which the PR description lists as passing under `pnpm lint:all`) does not compare them against the example files. This is exactly the case the repo review checklist calls out: "behavior change: check whether docs/**/.md describes the old behavior and needs updating; flag prose that now contradicts the implementation"*.

Why bundler is questionable for these two projects specifically. The PR description justifies moduleResolution: bundler on the basis that "tsdown, vitest, and downstream consumers' bundlers" handle resolution. That is true for the published packages, but the quickstarts are different: examples/client-quickstart/package.json has "build": "tsc" and "bin": { "mcp-client-cli": "./build/index.js" }, and examples/server-quickstart/package.json has "build": "tsc && chmod 755 build/index.js" with "bin": "./build/index.js" and "type": "module". They are compiled with raw tsc and the emitted .js is executed directly by Node — no bundler is involved at any stage. These two tsconfigs were standalone (they don't extend common/tsconfig) and were deliberately kept on Node16 precisely because they are copy-paste starter templates for end users running under Node.

Step-by-step proof.

  1. docs/client-quickstart.md:93–94 reads "module": "Node16", "moduleResolution": "Node16".
  2. After this PR, examples/client-quickstart/tsconfig.json:5–6 reads "module": "ESNext", "moduleResolution": "bundler".
  3. The doc fence at line 88 is ```json (no source=…), so sync:snippets --check ignores it.
  4. The same holds for docs/server-quickstart.md:107–108 vs examples/server-quickstart/tsconfig.json:4–5.
  5. Result: the published quickstart docs and the in-repo example projects they are meant to mirror now disagree on module/moduleResolution.

Impact. Today each quickstart has only a single src/index.ts with no relative imports, so the example build itself doesn't break, and a user who follows the (stale) docs verbatim still gets a working project. But the docs and examples are now inconsistent, and if a user following the new example config adds a second source file, module: ESNext + moduleResolution: bundler will let tsc accept extensionless relative imports and emit them unchanged — which then fail at runtime under Node's ESM loader (ERR_MODULE_NOT_FOUND). The Node16 setting that the docs still recommend is the one that protects against that.

How to fix. Two options:

  • Preferred: revert examples/client-quickstart/tsconfig.json and examples/server-quickstart/tsconfig.json to Node16/Node16 (or NodeNext/NodeNext) and only keep the ESNext/bundler flip in common/tsconfig/tsconfig.json. The quickstarts are "how a downstream consumer sets up a project," not "how this monorepo builds," so the internal-build rationale doesn't apply to them.
  • Alternatively: update the tsconfig.json blocks in docs/client-quickstart.md and docs/server-quickstart.md to match ESNext/bundler (and consider giving those blocks a source= attribute so sync:snippets catches future drift).

"outDir": "./build",
"rootDir": "./src",
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/client/src/elicitationUrlExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
} from '@modelcontextprotocol/client';
import open from 'open';

import { InMemoryOAuthClientProvider } from './simpleOAuthClientProvider.js';
import { InMemoryOAuthClientProvider } from './simpleOAuthClientProvider';

// Set up OAuth (required for this example)
const OAUTH_CALLBACK_PORT = 8090; // Use different port than auth server (3001)
Expand Down
2 changes: 1 addition & 1 deletion examples/client/src/simpleOAuthClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { CallToolResult, ListToolsRequest, OAuthClientMetadata } from '@mod
import { Client, StreamableHTTPClientTransport, UnauthorizedError } from '@modelcontextprotocol/client';
import open from 'open';

import { InMemoryOAuthClientProvider } from './simpleOAuthClientProvider.js';
import { InMemoryOAuthClientProvider } from './simpleOAuthClientProvider';

// Configuration
const DEFAULT_SERVER_URL = 'http://localhost:3000/mcp';
Expand Down
4 changes: 2 additions & 2 deletions examples/server-quickstart/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"module": "ESNext",
"moduleResolution": "bundler",
"outDir": "./build",
"rootDir": "./src",
"strict": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/server/src/elicitationUrlExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { Request, Response } from 'express';
import express from 'express';
import * as z from 'zod/v4';

import { InMemoryEventStore } from './inMemoryEventStore.js';
import { InMemoryEventStore } from './inMemoryEventStore';

// Create an MCP server with implementation details
const getServer = () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/server/src/simpleStreamableHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import cors from 'cors';
import type { Request, Response } from 'express';
import * as z from 'zod/v4';

import { InMemoryEventStore } from './inMemoryEventStore.js';
import { InMemoryEventStore } from './inMemoryEventStore';

// Check for OAuth flag
const useOAuth = process.argv.includes('--oauth');
Expand Down
2 changes: 1 addition & 1 deletion examples/server/src/ssePollingExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { McpServer } from '@modelcontextprotocol/server';
import cors from 'cors';
import type { Request, Response } from 'express';

import { InMemoryEventStore } from './inMemoryEventStore.js';
import { InMemoryEventStore } from './inMemoryEventStore';

// Create a fresh MCP server per client connection to avoid shared state between clients
const getServer = () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/shared/src/authServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import cors from 'cors';
import type { Request, Response as ExpressResponse, Router } from 'express';
import express from 'express';

import type { DemoAuth } from './auth.js';
import { createDemoAuth, DEMO_USER_CREDENTIALS } from './auth.js';
import type { DemoAuth } from './auth';
import { createDemoAuth, DEMO_USER_CREDENTIALS } from './auth';

export interface SetupAuthServerOptions {
authServerUrl: URL;
Expand Down
8 changes: 4 additions & 4 deletions examples/shared/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Auth configuration
export type { CreateDemoAuthOptions, DemoAuth } from './auth.js';
export { createDemoAuth } from './auth.js';
export type { CreateDemoAuthOptions, DemoAuth } from './auth';
export { createDemoAuth } from './auth';

// Auth server setup + demo token verifier (pass to `requireBearerAuth` from @modelcontextprotocol/express)
export type { SetupAuthServerOptions } from './authServer.js';
export { createProtectedResourceMetadataRouter, demoTokenVerifier, getAuth, setupAuthServer } from './authServer.js';
export type { SetupAuthServerOptions } from './authServer';
export { createProtectedResourceMetadataRouter, demoTokenVerifier, getAuth, setupAuthServer } from './authServer';
4 changes: 2 additions & 2 deletions examples/shared/test/demoInMemoryOAuthProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import { describe, expect, it } from 'vitest';

import type { CreateDemoAuthOptions } from '../src/auth.js';
import { createDemoAuth } from '../src/auth.js';
import type { CreateDemoAuthOptions } from '../src/auth';
import { createDemoAuth } from '../src/auth';

describe('createDemoAuth', () => {
const validOptions: CreateDemoAuthOptions = {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/auth.examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import type { AuthorizationServerMetadata } from '@modelcontextprotocol/core';

import type { OAuthClientProvider } from './auth.js';
import { fetchToken } from './auth.js';
import type { OAuthClientProvider } from './auth';
import { fetchToken } from './auth';

/**
* Base class providing no-op implementations of required OAuthClientProvider methods.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/authExtensions.examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* @module
*/

import { ClientCredentialsProvider, createPrivateKeyJwtAuth, PrivateKeyJwtProvider } from './authExtensions.js';
import { StreamableHTTPClientTransport } from './streamableHttp.js';
import { ClientCredentialsProvider, createPrivateKeyJwtAuth, PrivateKeyJwtProvider } from './authExtensions';
import { StreamableHTTPClientTransport } from './streamableHttp';

/**
* Example: Creating a private key JWT authentication function.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/client/authExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import type { FetchLike, OAuthClientInformation, OAuthClientMetadata, OAuthTokens } from '@modelcontextprotocol/core';
import type { CryptoKey, JWK } from 'jose';

import type { AddClientAuthentication, OAuthClientProvider } from './auth.js';
import type { AddClientAuthentication, OAuthClientProvider } from './auth';

/**
* Helper to produce a `private_key_jwt` client authentication function.
Expand Down
8 changes: 4 additions & 4 deletions packages/client/src/client/client.examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

import type { Prompt, Resource, Tool } from '@modelcontextprotocol/core';

import { Client } from './client.js';
import { SSEClientTransport } from './sse.js';
import { StdioClientTransport } from './stdio.js';
import { StreamableHTTPClientTransport } from './streamableHttp.js';
import { Client } from './client';
import { SSEClientTransport } from './sse';
import { StdioClientTransport } from './stdio';
import { StreamableHTTPClientTransport } from './streamableHttp';

/**
* Example: Using listChanged to automatically track tool and prompt updates.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import {
SdkErrorCode
} from '@modelcontextprotocol/core';

import { ExperimentalClientTasks } from '../experimental/tasks/client.js';
import { ExperimentalClientTasks } from '../experimental/tasks/client';

/**
* Elicitation default application helper. Applies defaults to the `data` based on the `schema`.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/crossAppAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import type { FetchLike } from '@modelcontextprotocol/core';
import { IdJagTokenExchangeResponseSchema, OAuthErrorResponseSchema, OAuthTokensSchema } from '@modelcontextprotocol/core';

import type { ClientAuthMethod } from './auth.js';
import { applyClientAuthentication, discoverAuthorizationServerMetadata } from './auth.js';
import type { ClientAuthMethod } from './auth';
import { applyClientAuthentication, discoverAuthorizationServerMetadata } from './auth';

/**
* Options for requesting a JWT Authorization Grant via RFC 8693 Token Exchange.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/middleware.examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* @module
*/

import type { Middleware } from './middleware.js';
import { applyMiddlewares, createMiddleware } from './middleware.js';
import type { Middleware } from './middleware';
import { applyMiddlewares, createMiddleware } from './middleware';

// Stubs for hypothetical application middleware
declare function withOAuth(provider: unknown, url: string): Middleware;
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FetchLike } from '@modelcontextprotocol/core';

import type { OAuthClientProvider } from './auth.js';
import { auth, extractWWWAuthenticateParams, UnauthorizedError } from './auth.js';
import type { OAuthClientProvider } from './auth';
import { auth, extractWWWAuthenticateParams, UnauthorizedError } from './auth';

/**
* Middleware function that wraps and enhances fetch functionality.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/sse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { createFetchWithInit, JSONRPCMessageSchema, normalizeHeaders, SdkError,
import type { ErrorEvent, EventSourceInit } from 'eventsource';
import { EventSource } from 'eventsource';

import type { AuthProvider, OAuthClientProvider } from './auth.js';
import { adaptOAuthProvider, auth, extractWWWAuthenticateParams, isOAuthClientProvider, UnauthorizedError } from './auth.js';
import type { AuthProvider, OAuthClientProvider } from './auth';
import { adaptOAuthProvider, auth, extractWWWAuthenticateParams, isOAuthClientProvider, UnauthorizedError } from './auth';

export class SseError extends Error {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/client/streamableHttp.examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/* eslint-disable unicorn/consistent-function-scoping -- examples must live inside region blocks */

import type { ReconnectionScheduler } from './streamableHttp.js';
import type { ReconnectionScheduler } from './streamableHttp';

// Stub for a hypothetical platform-specific background scheduling API
declare const platformBackgroundTask: {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/client/streamableHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
} from '@modelcontextprotocol/core';
import { EventSourceParserStream } from 'eventsource-parser/stream';

import type { AuthProvider, OAuthClientProvider } from './auth.js';
import { adaptOAuthProvider, auth, extractWWWAuthenticateParams, isOAuthClientProvider, UnauthorizedError } from './auth.js';
import type { AuthProvider, OAuthClientProvider } from './auth';
import { adaptOAuthProvider, auth, extractWWWAuthenticateParams, isOAuthClientProvider, UnauthorizedError } from './auth';

// Default reconnection options for StreamableHTTP connections
const DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS: StreamableHTTPReconnectionOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/experimental/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
* @experimental
*/

export * from './tasks/client.js';
export * from './tasks/client';
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import type { RequestOptions } from '@modelcontextprotocol/core';

import type { Client } from '../../client/client.js';
import type { Client } from '../../client/client';

/**
* Example: Using callToolStream to execute a tool with task lifecycle events.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/experimental/tasks/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
ProtocolErrorCode
} from '@modelcontextprotocol/core';

import type { Client } from '../../client/client.js';
import type { Client } from '../../client/client';

/**
* Internal interface for accessing {@linkcode Client}'s private methods.
Expand Down
34 changes: 17 additions & 17 deletions packages/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type {
OAuthClientProvider,
OAuthDiscoveryState,
OAuthServerInfo
} from './client/auth.js';
} from './client/auth';
export {
auth,
buildDiscoveryUrls,
Expand All @@ -36,46 +36,46 @@ export {
startAuthorization,
UnauthorizedError,
validateClientMetadataUrl
} from './client/auth.js';
} from './client/auth';
export type {
AssertionCallback,
ClientCredentialsProviderOptions,
CrossAppAccessContext,
CrossAppAccessProviderOptions,
PrivateKeyJwtProviderOptions,
StaticPrivateKeyJwtProviderOptions
} from './client/authExtensions.js';
} from './client/authExtensions';
export {
ClientCredentialsProvider,
createPrivateKeyJwtAuth,
CrossAppAccessProvider,
PrivateKeyJwtProvider,
StaticPrivateKeyJwtProvider
} from './client/authExtensions.js';
export type { ClientOptions } from './client/client.js';
export { Client } from './client/client.js';
export { getSupportedElicitationModes } from './client/client.js';
export type { DiscoverAndRequestJwtAuthGrantOptions, JwtAuthGrantResult, RequestJwtAuthGrantOptions } from './client/crossAppAccess.js';
export { discoverAndRequestJwtAuthGrant, exchangeJwtAuthGrant, requestJwtAuthorizationGrant } from './client/crossAppAccess.js';
export type { LoggingOptions, Middleware, RequestLogger } from './client/middleware.js';
export { applyMiddlewares, createMiddleware, withLogging, withOAuth } from './client/middleware.js';
export type { SSEClientTransportOptions } from './client/sse.js';
export { SSEClientTransport, SseError } from './client/sse.js';
} from './client/authExtensions';
export type { ClientOptions } from './client/client';
export { Client } from './client/client';
export { getSupportedElicitationModes } from './client/client';
export type { DiscoverAndRequestJwtAuthGrantOptions, JwtAuthGrantResult, RequestJwtAuthGrantOptions } from './client/crossAppAccess';
export { discoverAndRequestJwtAuthGrant, exchangeJwtAuthGrant, requestJwtAuthorizationGrant } from './client/crossAppAccess';
export type { LoggingOptions, Middleware, RequestLogger } from './client/middleware';
export { applyMiddlewares, createMiddleware, withLogging, withOAuth } from './client/middleware';
export type { SSEClientTransportOptions } from './client/sse';
export { SSEClientTransport, SseError } from './client/sse';
// StdioClientTransport, getDefaultEnvironment, DEFAULT_INHERITED_ENV_VARS, StdioServerParameters are exported from
// the './stdio' subpath to keep the root entry free of process-spawning runtime dependencies (child_process, cross-spawn).
export type {
ReconnectionScheduler,
StartSSEOptions,
StreamableHTTPClientTransportOptions,
StreamableHTTPReconnectionOptions
} from './client/streamableHttp.js';
export { StreamableHTTPClientTransport } from './client/streamableHttp.js';
} from './client/streamableHttp';
export { StreamableHTTPClientTransport } from './client/streamableHttp';

// experimental exports
export { ExperimentalClientTasks } from './experimental/tasks/client.js';
export { ExperimentalClientTasks } from './experimental/tasks/client';

// runtime-aware wrapper (shadows core/public's fromJsonSchema with optional validator)
export { fromJsonSchema } from './fromJsonSchema.js';
export { fromJsonSchema } from './fromJsonSchema';

// re-export curated public API from core
export * from '@modelcontextprotocol/core/public';
4 changes: 2 additions & 2 deletions packages/client/src/stdio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
// Cloudflare Workers targets does not pull in `node:child_process`, `node:stream`, or `cross-spawn`. Import
// from `@modelcontextprotocol/client/stdio` only in process-spawning runtimes (Node.js, Bun, Deno).

export type { StdioServerParameters } from './client/stdio.js';
export { DEFAULT_INHERITED_ENV_VARS, getDefaultEnvironment, StdioClientTransport } from './client/stdio.js';
export type { StdioServerParameters } from './client/stdio';
export { DEFAULT_INHERITED_ENV_VARS, getDefaultEnvironment, StdioClientTransport } from './client/stdio';
6 changes: 3 additions & 3 deletions packages/client/test/client/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LATEST_PROTOCOL_VERSION, OAuthError, OAuthErrorCode } from '@modelconte
import type { Mock } from 'vitest';
import { expect, vi } from 'vitest';

import type { OAuthClientProvider } from '../../src/client/auth.js';
import type { OAuthClientProvider } from '../../src/client/auth';
import {
auth,
buildDiscoveryUrls,
Expand All @@ -20,8 +20,8 @@ import {
selectClientAuthMethod,
startAuthorization,
validateClientMetadataUrl
} from '../../src/client/auth.js';
import { createPrivateKeyJwtAuth } from '../../src/client/authExtensions.js';
} from '../../src/client/auth';
import { createPrivateKeyJwtAuth } from '../../src/client/authExtensions';

// Mock pkce-challenge
vi.mock('pkce-challenge', () => ({
Expand Down
4 changes: 2 additions & 2 deletions packages/client/test/client/authExtensions.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createMockOAuthFetch } from '@modelcontextprotocol/test-helpers';
import { describe, expect, it, vi } from 'vitest';

import { auth } from '../../src/client/auth.js';
import { auth } from '../../src/client/auth';
import {
ClientCredentialsProvider,
createPrivateKeyJwtAuth,
CrossAppAccessProvider,
PrivateKeyJwtProvider,
StaticPrivateKeyJwtProvider
} from '../../src/client/authExtensions.js';
} from '../../src/client/authExtensions';

const RESOURCE_SERVER_URL = 'https://resource.example.com/';
const AUTH_SERVER_URL = 'https://auth.example.com';
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/client/crossAppAccess.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FetchLike } from '@modelcontextprotocol/core';
import { describe, expect, it, vi } from 'vitest';

import { discoverAndRequestJwtAuthGrant, exchangeJwtAuthGrant, requestJwtAuthorizationGrant } from '../../src/client/crossAppAccess.js';
import { discoverAndRequestJwtAuthGrant, exchangeJwtAuthGrant, requestJwtAuthorizationGrant } from '../../src/client/crossAppAccess';

describe('crossAppAccess', () => {
describe('requestJwtAuthorizationGrant', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/client/crossSpawn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { JSONRPCMessage } from '@modelcontextprotocol/core';
import spawn from 'cross-spawn';
import type { Mock, MockedFunction } from 'vitest';

import { getDefaultEnvironment, StdioClientTransport } from '../../src/client/stdio.js';
import { getDefaultEnvironment, StdioClientTransport } from '../../src/client/stdio';

// mock cross-spawn
vi.mock('cross-spawn');
Expand Down
Loading
Loading