Skip to main content

CrystalDocs builds documentation for every shard, on request. The announcement: Documentation for every shard, on CrystalBits.

CrystalDocs

    Browse DocsCrystalShardsAbout

    github.com/dsisnero/mcp.cr

    Types

    • Atomic
    • MCP
      • Annotator
      • Client
        • Client
        • ClientCapabilities
        • ClientOptions
        • HttpClientTransport
        • Implementation
        • JSONRPCMessage
        • JSONRPCNotification
        • JSONRPCRequest
        • JSONRPCResponse
        • ProtocolOptions
        • ServerCapabilities
        • SseClientTransport
        • StdioClientTransport
        • StreamableHttpClientTransport
      • MCPServer
      • Param
      • Prompt
      • Protocol
        • ActionType
        • Annotations
        • Argument
        • AudioContentBlock
        • BlobResourceContents
        • BooleanSchema
        • CallToolRequest
        • CallToolRequestParams
        • CallToolResult
        • CancelTaskResult
        • CancelledNotification
        • CancelledNotificationParams
        • ClientCapabilities
        • CompatibilityCallToolResult
        • CompleteContext
        • CompleteRequest
        • CompleteRequestParams
        • CompleteResult
          • Completion
        • ConstTitle
        • ContentBlock
        • ContextInclusion
        • CreateElicitationRequest
        • CreateElicitationRequestParams
        • CreateMessageRequest
        • CreateMessageRequestParams
        • CreateMessageResult
        • CreateTaskResult
        • Cursor
        • ElicitResult
        • ElicitationCompletionNotification
        • ElicitationCompletionNotificationParams
        • ElicitationSchema
        • ElicitationSchemaBuilder
        • EmbeddedResourceBlock
        • EmptyResult
        • EnumSchema
        • EnumSchemaBuilder
        • ErrorCode
        • GetPromptRequest
        • GetPromptRequestParams
        • GetPromptResult
        • GetTaskPayloadResult
        • GetTaskResult
        • Icon
        • ImageContentBlock
        • Implementation
        • InitializeRequest
        • InitializeRequestParams
        • InitializeResult
        • InitializedNotification
        • InitializedNotificationParams
        • IntegerSchema
        • JSONRPCError
          • ErrorDetail
        • JSONRPCMessage
        • JSONRPCMessageWithId
        • JSONRPCNotification
        • JSONRPCRequest
        • JSONRPCResponse
        • ListPromptsRequest
        • ListPromptsRequestParams
        • ListPromptsResult
        • ListResourceTemplatesRequest
        • ListResourceTemplatesRequestParams
        • ListResourceTemplatesResult
        • ListResourcesRequest
        • ListResourcesRequestParams
        • ListResourcesResult
        • ListRootsRequest
        • ListRootsRequestParams
        • ListRootsResult
        • ListToolsRequest
        • ListToolsRequestParams
        • ListToolsResult
        • LoggingLevel
        • LoggingMessageNotification
        • LoggingMessageNotificationParams
        • MCPError
        • MCPReference
        • ModelHint
        • ModelPreferences
        • Notification
        • NumberSchema
        • PaginateRequestdParams
        • PaginatedResult
        • PingRequest
        • PingRequestParams
        • PrimitiveSchema
        • Progress
        • ProgressNotification
        • ProgressNotificationParams
        • ProgressToken
        • Prompt
          • Builder
        • PromptArgument
        • PromptListChangedNotification
        • PromptListChangedNotificationParams
        • PromptMessage
        • PromptReference
        • ReadResourceRequest
        • ReadResourceRequestParams
        • ReadResourceResult
        • RequestId
        • RequestParams
        • Resource
        • ResourceContents
        • ResourceLinkBlock
        • ResourceListChangedNotification
        • ResourceListChangedNotificationParams
        • ResourceTemplate
        • ResourceTemplateReference
        • ResourceUpdatedNotification
        • ResourceUpdatedNotificationParams
        • Result
        • Role
        • Root
        • RootsCapability
        • RootsListChangedNotification
        • RootsListChangedNotificationParams
        • SamplingMessage
        • ServerCapabilities
          • PromptsCapability
          • ResourcesCapability
          • ToolsCapability
        • SetLevelRequest
        • SetLevelRequestParams
        • StringFormat
        • StringSchema
        • SubscribeRequest
        • SubscribeRequestParams
        • Task
        • TaskList
        • TaskStatus
        • TaskSupport
        • TextContentBlock
        • TextResourceContents
        • Tool
          • Input
          • Output
        • ToolAnnotations
        • ToolExecution
        • ToolListChangedNotification
        • ToolListChangedNotificationParams
        • UknownNotification
        • UknownParams
        • UknownReference
        • UnsubscribeRequest
        • UnsubscribeRequestParams
      • Resource
      • SSE
        • Connection
        • SSEChannel
      • Server
        • ClientCapabilities
        • Implementation
        • JSONRPCMessage
        • JSONRPCNotification
        • JSONRPCRequest
        • JSONRPCResponse
        • PromptRouter
          • PromptHandler
        • ProtocolOptions
        • ResourceRouter
          • ResourceHandler
        • Server
          • RegisteredPrompt
          • RegisteredResource
          • RegisteredResourceTemplate
          • RegisteredTool
        • ServerCapabilities
        • ServerOptions
        • ServerSSESession
        • SseServerTransport
        • StdioServerTransport
        • StreamableHttpServerTransport
        • ToolRouter
          • AsyncToolHandler
          • ToolHandler
      • Shared
        • AbstractTransport
        • AsyncResult
        • EmptyResult
        • InMemoryTransport
        • JSONRPCError
        • JSONRPCMessage
        • JSONRPCNotification
        • JSONRPCRequest
        • JSONRPCResponse
        • Notification
        • ProgressCallback
        • Protocol
        • ProtocolOptions
        • ReadBuffer
        • RequestHandlerExtra
        • RequestId
        • RequestOptions
        • RequestParams
        • Result
        • SSEEvent
        • Transport
      • SseServerRunner
      • StdioRunner
      • StreamableRunner
      • Tool
      • Transport
    module

    MCP::Shared

    Constants

    DEFAULT_REQUEST_TIMEOUT = 60000.milliseconds

    Class methods

    parse_sse_events(io : IO) : Array(SSEEvent)

    Parse SSE events from an IO stream, returning an array of parsed frames. Trailing incomplete events (no blank-line terminator) are discarded.

    Source

    Nested types

    • MCP::Shared::AbstractTransport
    • MCP::Shared::AsyncResult(T)
    • MCP::Shared::EmptyResult
    • MCP::Shared::InMemoryTransport
    • MCP::Shared::JSONRPCError
    • MCP::Shared::JSONRPCMessage
    • MCP::Shared::JSONRPCNotification
    • MCP::Shared::JSONRPCRequest
    • MCP::Shared::JSONRPCResponse
    • MCP::Shared::Notification
    • MCP::Shared::ProgressCallback
    • MCP::Shared::Protocol
    • MCP::Shared::ProtocolOptions
    • MCP::Shared::ReadBuffer
    • MCP::Shared::RequestHandlerExtra
    • MCP::Shared::RequestId
    • MCP::Shared::RequestOptions
    • MCP::Shared::RequestParams
    • MCP::Shared::Result
    • MCP::Shared::SSEEvent
    • MCP::Shared::Transport

    Advertisement

    Crystal jobs from CrystalGigs

    • Your posting here

      Reach Crystal developers on CrystalGigsFirst party

    CrystalDocs.org - Crystal Shard Documentation Hosting

    The CrystalBits newsletter

    Crystal tutorials, release news and community writing. One email when there is something new, never a stream.

    You will get one confirmation email to check the address is yours. Unsubscribe any time.

    GitHubCrystalShardsCrystalGigsCrystalBitsCrystal LanguageStatsSponsor

    The Bushido Collective builds and maintains this site.
    Licensed under the Apache License 2.0