mirror of
https://github.com/aljazceru/contextvm-docs.git
synced 2025-12-19 06:54:21 +01:00
fix: broken links.
This commit is contained in:
@@ -53,4 +53,4 @@ This object is used internally by the `NostrServerTransport` to construct announ
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
With a solid understanding of the core modules, you are now ready to explore the **[Transports](/transports/base-nostr-transport)**, which are responsible for all network communication in the SDK.
|
With a solid understanding of the core modules, you are now ready to explore the **[Transports](/contextvm-docs/transports/base-nostr-transport)**, which are responsible for all network communication in the SDK.
|
||||||
@@ -69,4 +69,4 @@ These functions handle the low-level details of gift wrapping and unwrapping, bu
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
Now that you understand how encryption works, let's look at the [Constants](./constants) used throughout the SDK.
|
Now that you understand how encryption works, let's look at the [Constants](/contextvm-docs/core/constants) used throughout the SDK.
|
||||||
@@ -34,8 +34,8 @@ export interface NostrSigner {
|
|||||||
|
|
||||||
Any object that implements this interface can be used to sign events, allowing you to integrate with various key management systems, such as web, hardware wallets or remote signing services. The SDK provides a default implementation, `PrivateKeySigner`, which signs events using a raw private key.
|
Any object that implements this interface can be used to sign events, allowing you to integrate with various key management systems, such as web, hardware wallets or remote signing services. The SDK provides a default implementation, `PrivateKeySigner`, which signs events using a raw private key.
|
||||||
|
|
||||||
- **Learn more:** [`NostrSigner` Deep Dive](/signer/nostr-signer-interface/)
|
- **Learn more:** [`NostrSigner` Deep Dive](/contextvm-docs/signer/nostr-signer-interface/)
|
||||||
- **Default Implementation:** [`PrivateKeySigner`](/signer/private-key-signer/)
|
- **Default Implementation:** [`PrivateKeySigner`](/contextvm-docs/signer/private-key-signer/)
|
||||||
|
|
||||||
## `RelayHandler`
|
## `RelayHandler`
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ export interface RelayHandler {
|
|||||||
|
|
||||||
By implementing this interface, you can create custom relay management logic, such as sophisticated relay selection strategies or custom reconnection policies. The SDK includes `SimpleRelayPool` as a default implementation.
|
By implementing this interface, you can create custom relay management logic, such as sophisticated relay selection strategies or custom reconnection policies. The SDK includes `SimpleRelayPool` as a default implementation.
|
||||||
|
|
||||||
- **Learn more:** [`RelayHandler` Deep Dive](/relay/relay-handler-interface)
|
- **Learn more:** [`RelayHandler` Deep Dive](/contextvm-docs/relay/relay-handler-interface)
|
||||||
- **Default Implementation:** [`SimpleRelayPool`](/relay/simple-relay-pool)
|
- **Default Implementation:** [`SimpleRelayPool`](/contextvm-docs/relay/simple-relay-pool)
|
||||||
|
|
||||||
## `EncryptionMode`
|
## `EncryptionMode`
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ export enum EncryptionMode {
|
|||||||
|
|
||||||
This enum is used to configure the encryption behavior of the `NostrClientTransport` and `NostrServerTransport`.
|
This enum is used to configure the encryption behavior of the `NostrClientTransport` and `NostrServerTransport`.
|
||||||
|
|
||||||
- **Learn more:** [Encryption](./encryption/)
|
- **Learn more:** [Encryption](/contextvm-docs/core/encryption)
|
||||||
|
|
||||||
## `AnnouncementMethods`
|
## `AnnouncementMethods`
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ The `NostrMCPGateway` is a server-side bridging component that exposes a traditi
|
|||||||
|
|
||||||
The gateway manages two transports simultaneously:
|
The gateway manages two transports simultaneously:
|
||||||
|
|
||||||
1. **Nostr Server Transport**: A [`NostrServerTransport`](/transports/nostr-server-transport) that listens for incoming connections from clients on the Nostr network.
|
1. **Nostr Server Transport**: A [`NostrServerTransport`](/contextvm-docs/transports/nostr-server-transport) that listens for incoming connections from clients on the Nostr network.
|
||||||
2. **MCP Server Transport**: A standard MCP client transport (like `StdioClientTransport`) that connects to a local or remote MCP server.
|
2. **MCP Server Transport**: A standard MCP client transport (like `StdioClientTransport`) that connects to a local or remote MCP server.
|
||||||
|
|
||||||
The gateway's role is to forward requests from Nostr clients to the MCP server and relay the server's responses back to the appropriate client on Nostr.
|
The gateway's role is to forward requests from Nostr clients to the MCP server and relay the server's responses back to the appropriate client on Nostr.
|
||||||
@@ -80,4 +80,4 @@ console.log('Gateway is running, exposing the MCP server to Nostr.');
|
|||||||
|
|
||||||
This concludes the core components of the SDK. The final section provides practical examples of how to use these components together.
|
This concludes the core components of the SDK. The final section provides practical examples of how to use these components together.
|
||||||
|
|
||||||
- **[Tutorials](/tutorials/client-server-communication)**
|
- **[Tutorials](/contextvm-docs/tutorials/client-server-communication)**
|
||||||
@@ -27,12 +27,12 @@ This will install the SDK and its dependencies into your project.
|
|||||||
|
|
||||||
The SDK is organized into several modules, each providing a specific set of functionalities:
|
The SDK is organized into several modules, each providing a specific set of functionalities:
|
||||||
|
|
||||||
- **[Core](/core/interfaces)**: Contains fundamental definitions, constants, interfaces, and utilities (e.g., encryption, serialization).
|
- **[Core](/contextvm-docs/core/interfaces)**: Contains fundamental definitions, constants, interfaces, and utilities (e.g., encryption, serialization).
|
||||||
- **[Transports](/transports/base-nostr-transport)**: Critical for communication, this module provides `NostrClientTransport` and `NostrServerTransport` implementations for enabling MCP over Nostr.
|
- **[Transports](/contextvm-docs/transports/base-nostr-transport)**: Critical for communication, this module provides `NostrClientTransport` and `NostrServerTransport` implementations for enabling MCP over Nostr.
|
||||||
- **[Signer](/signer/nostr-signer-interface)**: Provides cryptographic signing capabilities required for Nostr events
|
- **[Signer](/contextvm-docs/signer/nostr-signer-interface)**: Provides cryptographic signing capabilities required for Nostr events
|
||||||
- **[Relay](/relay/relay-handler-interface)**: Manages Nostr relay connections, abstracting the complexity of relay interactions.
|
- **[Relay](/contextvm-docs/relay/relay-handler-interface)**: Manages Nostr relay connections, abstracting the complexity of relay interactions.
|
||||||
- **[Proxy](/proxy/overview)**: A client-side MCP server that connects to other servers through Nostr, exposing their capabilities locally, specially useful for clients that don't natively support Nostr transport.
|
- **[Proxy](/contextvm-docs/proxy/overview)**: A client-side MCP server that connects to other servers through Nostr, exposing their capabilities locally, specially useful for clients that don't natively support Nostr transport.
|
||||||
- **[Gateway](/gateway/overview)**: An MCP server transport that binds to another MCP server, exposing its capabilities to the Nostr network, specially useful for servers that don't natively support Nostr transport.
|
- **[Gateway](/contextvm-docs/gateway/overview)**: An MCP server transport that binds to another MCP server, exposing its capabilities to the Nostr network, specially useful for servers that don't natively support Nostr transport.
|
||||||
|
|
||||||
## Core Concepts
|
## Core Concepts
|
||||||
|
|
||||||
@@ -51,8 +51,8 @@ These components are fundamental for creating and broadcasting Nostr events, whi
|
|||||||
|
|
||||||
The SDK provides two specialized transports to send and receive MCP messages over the Nostr network:
|
The SDK provides two specialized transports to send and receive MCP messages over the Nostr network:
|
||||||
|
|
||||||
- [`NostrClientTransport`](/transports/nostr-client-transport): Used by MCP clients to connect to remote MCP servers exposed via Nostr.
|
- [`NostrClientTransport`](/contextvm-docs/transports/nostr-client-transport): Used by MCP clients to connect to remote MCP servers exposed via Nostr.
|
||||||
- [`NostrServerTransport`](/transports/nostr-server-transport): Used by MCP servers to expose their capabilities through Nostr.
|
- [`NostrServerTransport`](/contextvm-docs/transports/nostr-server-transport): Used by MCP servers to expose their capabilities through Nostr.
|
||||||
|
|
||||||
These transports handle the serialization of MCP messages into Nostr events and manage the communication flow.
|
These transports handle the serialization of MCP messages into Nostr events and manage the communication flow.
|
||||||
|
|
||||||
@@ -60,8 +60,8 @@ These transports handle the serialization of MCP messages into Nostr events and
|
|||||||
|
|
||||||
To simplify integration with existing MCP applications, the SDK provides two high-level bridging components:
|
To simplify integration with existing MCP applications, the SDK provides two high-level bridging components:
|
||||||
|
|
||||||
- [`NostrMCPProxy`](/proxy/overview): A client-side bridge that allows an MCP client to communicate with a remote MCP server over Nostr without requiring native Nostr support in the client.
|
- [`NostrMCPProxy`](/contextvm-docs/proxy/overview): A client-side bridge that allows an MCP client to communicate with a remote MCP server over Nostr without requiring native Nostr support in the client.
|
||||||
- [`NostrMCPGateway`](/gateway/overview): A server-side bridge that exposes an existing MCP server to the Nostr network, allowing it to be discovered and used by Nostr-native clients.
|
- [`NostrMCPGateway`](/contextvm-docs/gateway/overview): A server-side bridge that exposes an existing MCP server to the Nostr network, allowing it to be discovered and used by Nostr-native clients.
|
||||||
|
|
||||||
These components abstract away the underlying transport complexities, making it easy to connect conventional MCP setups with the decentralized Nostr ecosystem.
|
These components abstract away the underlying transport complexities, making it easy to connect conventional MCP setups with the decentralized Nostr ecosystem.
|
||||||
|
|
||||||
|
|||||||
@@ -42,4 +42,4 @@ This documentation is structured to guide you from initial setup to advanced imp
|
|||||||
- **Proxy & Gateway**: Explains how to use the bridging components.
|
- **Proxy & Gateway**: Explains how to use the bridging components.
|
||||||
- **Tutorials**: Provides practical, step-by-step examples.
|
- **Tutorials**: Provides practical, step-by-step examples.
|
||||||
|
|
||||||
Let's begin by setting up your environment in the [Quick Overview](/getting-started/quick-overview/).
|
Let's begin by setting up your environment in the [Quick Overview](getting-started/quick-overview/).
|
||||||
@@ -8,7 +8,7 @@ hero:
|
|||||||
file: ../../assets/contextvm-logo.svg
|
file: ../../assets/contextvm-logo.svg
|
||||||
actions:
|
actions:
|
||||||
- text: Get Started
|
- text: Get Started
|
||||||
link: /getting-started/quick-overview/
|
link: getting-started/quick-overview/
|
||||||
icon: right-arrow
|
icon: right-arrow
|
||||||
- text: View on GitHub
|
- text: View on GitHub
|
||||||
link: https://github.com/contextvm/ts-sdk
|
link: https://github.com/contextvm/ts-sdk
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ The `NostrMCPProxy` is a powerful, client-side bridging component in the `@conte
|
|||||||
The proxy manages two transports simultaneously:
|
The proxy manages two transports simultaneously:
|
||||||
|
|
||||||
1. **MCP Host Transport**: This is a standard MCP transport (like `StdioServerTransport`) that communicates with a local MCP client application.
|
1. **MCP Host Transport**: This is a standard MCP transport (like `StdioServerTransport`) that communicates with a local MCP client application.
|
||||||
2. **Nostr Client Transport**: This is a [`NostrClientTransport`](/transports/nostr-client-transport) that communicates with the remote MCP server over the Nostr network.
|
2. **Nostr Client Transport**: This is a [`NostrClientTransport`](/contextvm-docs/transports/nostr-client-transport) that communicates with the remote MCP server over the Nostr network.
|
||||||
|
|
||||||
The proxy sits in the middle, seamlessly forwarding messages between these two transports. When the local client sends a request, the proxy forwards it over Nostr. When the remote server sends a response, the proxy relays it back to the local client.
|
The proxy sits in the middle, seamlessly forwarding messages between these two transports. When the local client sends a request, the proxy forwards it over Nostr. When the remote server sends a response, the proxy relays it back to the local client.
|
||||||
|
|
||||||
@@ -81,4 +81,4 @@ In this setup, a separate MCP client process could connect to this proxy's `Stdi
|
|||||||
|
|
||||||
Next, we'll look at the server-side equivalent of the proxy:
|
Next, we'll look at the server-side equivalent of the proxy:
|
||||||
|
|
||||||
- **[Gateway](/gateway/overview)**
|
- **[Gateway](/contextvm-docs/gateway/overview)**
|
||||||
@@ -5,7 +5,7 @@ description: Learn how to create a custom relay handler for the @contextvm/sdk.
|
|||||||
|
|
||||||
# Custom Relay Handler Development
|
# Custom Relay Handler Development
|
||||||
|
|
||||||
The `@contextvm/sdk`'s-pluggable architecture, centered around the [`RelayHandler`](./relay-handler-interface) interface, allows developers to implement custom logic for managing Nostr-relay connections. This is particularly useful for advanced use cases that require more sophisticated behavior than what the default [`SimpleRelayPool`](./simple-relay-pool) provides.
|
The `@contextvm/sdk`'s-pluggable architecture, centered around the [`RelayHandler`](/contextvm-docs/relay/relay-handler-interface) interface, allows developers to implement custom logic for managing Nostr-relay connections. This is particularly useful for advanced use cases that require more sophisticated behavior than what the default [`SimpleRelayPool`](/contextvm-docs/relay/simple-relay-pool) provides.
|
||||||
|
|
||||||
## Why Create a Custom Relay Handler?
|
## Why Create a Custom Relay Handler?
|
||||||
|
|
||||||
@@ -88,5 +88,5 @@ Once your custom handler class is created, you can instantiate it and pass it to
|
|||||||
|
|
||||||
With the `Relay` component covered, we will now look at the high-level bridging components provided by the SDK.
|
With the `Relay` component covered, we will now look at the high-level bridging components provided by the SDK.
|
||||||
|
|
||||||
- **[Proxy](./proxy/overview)**
|
- **[Proxy](/contextvm-docs/proxy/overview)**
|
||||||
- **[Gateway](./gateway/overview)**
|
- **[Gateway](/contextvm-docs/gateway/overview)**
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ By depending on this interface, the SDK's transports can remain agnostic about t
|
|||||||
|
|
||||||
## Interface Definition
|
## Interface Definition
|
||||||
|
|
||||||
The `RelayHandler` interface is defined in [`core/interfaces.ts`](/core/interfaces#relayhandler) and includes several key methods:
|
The `RelayHandler` interface is defined in [`core/interfaces.ts`](/contextvm-docs/core/interfaces#relayhandler) and includes several key methods:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
export interface RelayHandler {
|
export interface RelayHandler {
|
||||||
@@ -42,10 +42,10 @@ export interface RelayHandler {
|
|||||||
|
|
||||||
The SDK provides a default implementation for common use cases and allows for custom implementations for advanced scenarios.
|
The SDK provides a default implementation for common use cases and allows for custom implementations for advanced scenarios.
|
||||||
|
|
||||||
- **[SimpleRelayPool](./simple-relay-pool)**: The default implementation, which manages a simple pool of relays.
|
- **[SimpleRelayPool](/contextvm-docs/relay/simple-relay-pool)**: The default implementation, which manages a pool of relays and handles connection and subscription logic.
|
||||||
- **[Custom Relay Handler](./custom-relay-handler)**: A guide to creating your own relay handler by implementing the `RelayHandler` interface.
|
- **[Custom Relay Handler](/contextvm-docs/relay/custom-relay-handler)**: For creating custom relay handlers that integrate with specific relay management systems, such as auth relays or custom caching.
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
- Learn about the default implementation: **[SimpleRelayPool](./simple-relay-pool)**
|
- Learn about the default implementation: **[SimpleRelayPool](/contextvm-docs/relay/simple-relay-pool)**
|
||||||
- Learn how to create your own: **[Custom Relay Handler](./custom-relay-handler)**
|
- Learn how to create your own: **[Custom Relay Handler](/contextvm-docs/relay/custom-relay-handler)**
|
||||||
@@ -5,7 +5,7 @@ description: A default relay handler implementation for the @contextvm/sdk.
|
|||||||
|
|
||||||
# `SimpleRelayPool`
|
# `SimpleRelayPool`
|
||||||
|
|
||||||
The `SimpleRelayPool` is the default implementation of the [`RelayHandler`](./relay-handler-interface) interface provided by the `@contextvm/sdk`. It uses the `SimplePool` from the `nostr-tools` library to manage connections to a list of specified relays.
|
The `SimpleRelayPool` is the default implementation of the [`RelayHandler`](/contextvm-docs/relay/relay-handler-interface) interface provided by the `@contextvm/sdk`. It uses the `SimplePool` from the `nostr-tools` library to manage connections to a list of specified relays.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -61,8 +61,8 @@ The `SimpleRelayPool` wraps the `SimplePool` from `nostr-tools` and implements t
|
|||||||
|
|
||||||
The `SimpleRelayPool` is designed for simplicity. It connects to all provided relays and does not include advanced features.
|
The `SimpleRelayPool` is designed for simplicity. It connects to all provided relays and does not include advanced features.
|
||||||
|
|
||||||
For applications that require more sophisticated relay management, you may want to create a [Custom Relay Handler](./custom-relay-handler).
|
For applications that require more sophisticated relay management, you may want to create a [Custom Relay Handler](/contextvm-docs/relay/custom-relay-handler).
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
- Learn how to build a custom relay handler: **[Custom Relay Handler](./custom-relay-handler)**
|
- Learn how to build a custom relay handler: **[Custom Relay Handler](/contextvm-docs/relay/custom-relay-handler)**
|
||||||
@@ -5,11 +5,11 @@ description: Learn how to create a custom signer for the @contextvm/sdk.
|
|||||||
|
|
||||||
# Custom Signer Development
|
# Custom Signer Development
|
||||||
|
|
||||||
One of the key design features of the `@contextvm/sdk` is its modularity, which is exemplified by the [`NostrSigner`](./nostr-signer-interface) interface. By creating your own implementation of this interface, you can integrate the SDK with any key management system, such as a hardware wallet, a remote signing service (like an HSM), or a browser extension.
|
One of the key design features of the `@contextvm/sdk` is its modularity, which is exemplified by the [`NostrSigner`](/contextvm-docs/signer/nostr-signer-interface) interface. By creating your own implementation of this interface, you can integrate the SDK with any key management system, such as a hardware wallet, a remote signing service (like an HSM), or a browser extension.
|
||||||
|
|
||||||
## Why Create a Custom Signer?
|
## Why Create a Custom Signer?
|
||||||
|
|
||||||
While the [`PrivateKeySigner`](./private-key-signer) is suitable for many development and server-side scenarios, a custom signer is often necessary when:
|
While the [`PrivateKeySigner`](/contextvm-docs/signer/private-key-signer) is a common choice for most applications, there are cases where you may need to use a different approach:
|
||||||
|
|
||||||
- **Security is paramount**: You need to keep private keys isolated from the main application logic, for example, in a hardware security module (HSM) or a secure enclave.
|
- **Security is paramount**: You need to keep private keys isolated from the main application logic, for example, in a hardware security module (HSM) or a secure enclave.
|
||||||
- **Interacting with external wallets**: Your application needs to request signatures from a user's wallet, such as a browser extension (e.g., Alby, Noster) or a mobile wallet.
|
- **Interacting with external wallets**: Your application needs to request signatures from a user's wallet, such as a browser extension (e.g., Alby, Noster) or a mobile wallet.
|
||||||
@@ -90,4 +90,4 @@ Once your custom signer class is created, you can instantiate it and pass it to
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
With the `Signer` component covered, let's move on to the **[Relay](./relay-handler-interface)**, which handles another critical aspect of Nostr communication: managing connections to relays.
|
With the `Signer` component covered, let's move on to the **[Relay](/contextvm-docs/relay/simple-relay-pool)** component, which handles the connection and management of Nostr relays.
|
||||||
@@ -19,7 +19,7 @@ This design offers several key benefits:
|
|||||||
|
|
||||||
## Interface Definition
|
## Interface Definition
|
||||||
|
|
||||||
The `NostrSigner` interface is defined in [`core/interfaces.ts`](/core/interfaces#nostrsigner).
|
The `NostrSigner` interface is defined in [`core/interfaces.ts`](/contextvm-docs/core/interfaces#nostrsigner).
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
export interface NostrSigner {
|
export interface NostrSigner {
|
||||||
@@ -51,10 +51,10 @@ Any class that implements this interface can be used as a signer throughout the
|
|||||||
|
|
||||||
The SDK provides a default implementation for common use cases and allows for custom implementations for advanced scenarios.
|
The SDK provides a default implementation for common use cases and allows for custom implementations for advanced scenarios.
|
||||||
|
|
||||||
- **[PrivateKeySigner](./private-key-signer)**: The default implementation, which takes a raw private key string and performs signing operations locally.
|
- **[PrivateKeySigner](/contextvm-docs/signer/private-key-signer)**: The default implementation, which takes a raw private key string and performs signing operations locally.
|
||||||
- **[Custom Signer Development](./custom-signer-development)**: A guide to creating your own signer by implementing the `NostrSigner` interface.
|
- **[Custom Signer Development](/contextvm-docs/signer/custom-signer-development)**: For creating custom signers that integrate with key management systems, such as hardware wallets or remote signing services.
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
- Learn about the default implementation: **[PrivateKeySigner](./private-key-signer)**
|
- Learn about the default implementation: **[PrivateKeySigner](/contextvm-docs/signer/private-key-signer)**
|
||||||
- Learn how to create your own: **[Custom Signer Development](./custom-signer-development)**
|
- Learn how to create your own: **[Custom Signer Development](/contextvm-docs/signer/custom-signer-development)**
|
||||||
@@ -5,7 +5,7 @@ description: A default signer implementation for the @contextvm/sdk.
|
|||||||
|
|
||||||
# `PrivateKeySigner`
|
# `PrivateKeySigner`
|
||||||
|
|
||||||
The `PrivateKeySigner` is the default implementation of the [`NostrSigner`](./nostr-signer-interface) interface provided by the `@contextvm/sdk`. It is a straightforward and easy-to-use signer that operates directly on a raw private key provided as a hexadecimal string.
|
The `PrivateKeySigner` is the default implementation of the [`NostrSigner`](/contextvm-docs/signer/nostr-signer-interface) interface provided by the `@contextvm/sdk`. It is a straightforward and easy-to-use signer that operates directly on a raw private key provided as a hexadecimal string.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -67,4 +67,4 @@ For applications requiring a higher level of security, consider creating a custo
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
- Learn how to build a custom signer: **[Custom Signer Development](./custom-signer-development)**
|
- Learn how to build a custom signer: **[Custom Signer Development](/contextvm-docs/signer/custom-signer-development)**
|
||||||
@@ -5,7 +5,7 @@ description: An abstract class that provides the core functionality for all Nost
|
|||||||
|
|
||||||
# Base Nostr Transport
|
# Base Nostr Transport
|
||||||
|
|
||||||
The `BaseNostrTransport` is an abstract class that provides the core functionality for all Nostr-based transports in the `@contextvm/sdk`. It serves as the foundation for the [`NostrClientTransport`](/transports/nostr-client-transport) and [`NostrServerTransport`](/transports/nostr-server-transport), handling the common logic for connecting to relays, managing subscriptions, and converting messages between the MCP and Nostr formats.
|
The `BaseNostrTransport` is an abstract class that provides the core functionality for all Nostr-based transports in the `@contextvm/sdk`. It serves as the foundation for the [`NostrClientTransport`](/contextvm-docs/transports/nostr-client-transport) and [`NostrServerTransport`](/contextvm-docs/transports/nostr-server-transport), handling the common logic for connecting to relays, managing subscriptions, and converting messages between the MCP and Nostr formats.
|
||||||
|
|
||||||
## Core Responsibilities
|
## Core Responsibilities
|
||||||
|
|
||||||
@@ -52,5 +52,5 @@ The `BaseNostrTransport` encapsulates the shared logic of Nostr communication, a
|
|||||||
|
|
||||||
Now that you understand the foundation of the Nostr transports, let's explore the concrete implementations:
|
Now that you understand the foundation of the Nostr transports, let's explore the concrete implementations:
|
||||||
|
|
||||||
- **[Nostr Client Transport](./nostr-client-transport)**: For building MCP clients that communicate over Nostr.
|
- **[Nostr Client Transport](/contextvm-docs/transports/nostr-client-transport)**: For building MCP clients that communicate over Nostr.
|
||||||
- **[Nostr Server Transport](./nostr-server-transport)**: For exposing MCP servers to the Nostr network.
|
- **[Nostr Server Transport](/contextvm-docs/transports/nostr-server-transport)**: For exposing MCP servers to the Nostr network.
|
||||||
|
|||||||
@@ -85,4 +85,4 @@ console.log('Available tools:', tools);
|
|||||||
|
|
||||||
Next, we will look at the server-side counterpart to this transport:
|
Next, we will look at the server-side counterpart to this transport:
|
||||||
|
|
||||||
- **[Nostr Server Transport](./nostr-server-transport)**: For exposing MCP servers to the Nostr network.
|
- **[Nostr Server Transport](/contextvm-docs/transports/nostr-server-transport)**: For exposing MCP servers to the Nostr network.
|
||||||
@@ -5,7 +5,7 @@ description: A server-side component for exposing MCP servers over Nostr.
|
|||||||
|
|
||||||
# Nostr Server Transport
|
# Nostr Server Transport
|
||||||
|
|
||||||
The `NostrServerTransport` is the server-side counterpart to the [`NostrClientTransport`](./nostr-client-transport). It allows an MCP server to expose its capabilities to the Nostr network, making them discoverable and usable by any Nostr-enabled client. Like the client transport, it implements the `Transport` interface from the `@modelcontextprotocol/sdk`.
|
The `NostrServerTransport` is the server-side counterpart to the [`NostrClientTransport`](/contextvm-docs/transports/nostr-client-transport). It allows an MCP server to expose its capabilities to the Nostr network, making them discoverable and usable by any Nostr-enabled client. Like the client transport, it implements the `Transport` interface from the `@modelcontextprotocol/sdk`.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -95,4 +95,4 @@ The `NostrServerTransport` manages a session for each unique client public key.
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
Now that you understand how the transports work, let's dive into the **[Signer](/signer/nostr-signer-interface)**, the component responsible for cryptographic signatures.
|
Now that you understand how the transports work, let's dive into the **[Signer](/contextvm-docs/signer/nostr-signer-interface)**, the component responsible for cryptographic signatures.
|
||||||
@@ -16,7 +16,7 @@ We will build two separate scripts:
|
|||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- You have completed the [Quick Overview](/getting-started/quick-overview/).
|
- You have completed the [Quick Overview](/contextvm-docs/getting-started/quick-overview/).
|
||||||
- You have two Nostr private keys (one for the server, one for the client). You can generate new keys using various tools, or by running `nostr-tools` commands.
|
- You have two Nostr private keys (one for the server, one for the client). You can generate new keys using various tools, or by running `nostr-tools` commands.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user