Skip to content

Update examples to use the SDK package and be standalone #493

Open
@alexandertu

Description

@alexandertu

Is your feature request related to a problem? Please describe.
The provided examples are not standalone and does not use the typescript-sdk package.

I'm frustrated that the examples have imports like this:

import { McpServer } from '../../server/mcp.js';
import { StreamableHTTPServerTransport } from '../../server/streamableHttp.js';
import { SSEServerTransport } from '../../server/sse.js';
import { CallToolResult, isInitializeRequest } from '../../types.js';
import { InMemoryEventStore } from '../shared/inMemoryEventStore.js';

Source: src/examples/server/sseAndStreamableHttpCompatibleServer.ts

Describe the solution you'd like
Update all examples to be standalone by:

  • Using the SDK package directly instead of relying on local imports.
  • Ensuring the code can be copied and run as-is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions