API Reference phantom_mcp v#0.3.2

View Source

Modules

MCP (Model Context Protocol) framework for Elixir Plug.

Storage for tooling specifications. The backend is :persistent_term.

Notify the client of logs.

The Model Context Protocol (MCP) provides a standardized way for servers to request additional information from users through the client during interactions. This flow allows clients to maintain control over user interactions and data sharing while enabling servers to gather necessary information dynamically. Servers request structured data from users with JSON schemas to validate responses.

Wraps errors that occur during a request or batch or requests. This allows the connection to finish, and then reraises with this error containing the exceptions by request.

Main Plug implementation for MCP HTTP transport with SSE support.

The Model Context Protocol (MCP) provides a standardized way for servers to expose prompt templates to clients. Prompts allow servers to provide structured messages and instructions for interacting with language models. Clients can discover available prompts, retrieve their contents, and provide arguments to customize them.

Standard requests and responses for the MCP protocol

The Model Context Protocol (MCP) provides a standardized way for servers to expose resources to clients. Resources allow servers to share data that provides context to language models, such as files, database schemas, or application-specific information. Each resource is uniquely identified by a URI.

The Model Context Protocol (MCP) provides a standardized way for servers to expose resources to clients. Resources allow servers to share data that provides context to language models, such as files, database schemas, or application-specific information. Each resource is uniquely identified by a URI.

A DSL for defining MCP servers. This module provides functions that define tools, resources, and prompts.

Represents the state of the MCP session. This is the state across the conversation and is the bridge between the various transports (HTTP, stdio) to persistence, even if stateless.

The Model Context Protocol (MCP) allows servers to expose tools that can be invoked by language models. Tools enable models to interact with external systems, such as querying databases, calling APIs, or performing computations. Each tool is uniquely identified by a name and includes metadata describing its schema.

Tool annotations provide additional metadata about a tool’s behavior, helping clients understand how to present and manage tools. These annotations are hints that describe the nature and impact of a tool, but should not be relied upon for security decisions

JSON Schema representing the arguments for the tool, either as input_schema or output_schema.

Track open streams so that notifications and requests can be sent to clients.