@lnfi-network/lnexchange-mcp-server
v0.1.0-alpha.1
Published
This is a Model Context Protocol (MCP) server built with Node.js that provides AI assistants with secure access to LnExchange trading and token management APIs.
Readme
LnExchange MCP Service
This is a Model Context Protocol (MCP) server built with Node.js that provides AI assistants with secure access to LnExchange trading and token management APIs.
Quick Start
npx
You can use this server directly with MCP clients like Cursor, Claude Desktop, Trae, or Cherry Studio by running
Note: Please replace with your Nostr private key: xxxxxxxxxxxxxxxxxxxx Or /path/private.key
MCP Client Configuration
Add this configuration to your MCP client (e.g., Claude Desktop config):
Option 1: Using command line arguments
{
"mcpServers": {
"@lnfi-network/lnexchange-mcp-server": {
"command": "npx",
"args": [
"-y",
"@lnfi-network/lnexchange-mcp-server",
"--privateKey=xxxxxxxxxxxxxxxxxxxx" // Required: Nostr private key Or /path/private.key
]
}
}
}Option 2: Using environment variables
{
"mcpServers": {
"@lnfi-network/lnexchange-mcp-server": {
"command": "npx",
"args": [
"-y",
"@lnfi-network/lnexchange-mcp-server"
],
"env": {
"LNEXCHANGE_PRIVATE_KEY": "xxxxxxxxxxxxxxxxxxxx" // Required: Nostr private key Or /path/private.key
}
}
}
}Development
For developers who want to contribute or use this project:
Installation
- Make sure you have Node.js installed (version 16 or higher recommended)
- Install dependencies:
npm install @lnfi-network/lnexchange-mcp-serverProgrammatic Usage
After installing the package, you can use it programmatically in your Node.js application:
import { getLnExchangeMcpServer } from "@lnfi-network/lnexchange-mcp-server";
// Initialize the MCP server
const lnExchangeMcpServer = await getLnExchangeMcpServer({
privateKey: process.env.LNEXCHANGE_PRIVATE_KEY, // Required: Nostr private key Or /path/private.key
signer // Optional: custom signer instance | window?.okxwallet?.nostr
});
// Access available tools
const lnExchangeTools = lnExchangeMcpServer._registeredTools;
console.log('Available LnExchange tools:', Object.keys(lnExchangeTools));License
MIT
