vertex-cli
Enables lookup of Nostr profiles and checking of Vertex API credit balance using the Vertex API.
README
Vertex CLI
A command-line tool for looking up Nostr profiles using the Vertex API. This tool allows you to search for Nostr profiles by query and check your credit balance.
Installation
To install dependencies:
bun install
Usage
Interactive Mode
Run without any arguments to enter interactive mode:
bun index.ts
In interactive mode, you can run multiple commands after logging in once. Available commands:
lookup <query>- Look up Nostr profilescredits- Check credit balancehelp- Show available commandsexit- Exit interactive mode
Command Line Mode
Run specific commands directly:
# Look up profiles
bun index.ts lookup "alice" --nsec nsec1...
# Check credit balance
bun index.ts credits --nsec nsec1...
# Show help
bun index.ts --help
Options
--nsec <key>- Your Nostr private key (nsec format). If not provided, you'll be prompted to enter it.--query <query>- Search query for profile lookup--sort <method>- Sort method (global or local)
Examples
# Enter interactive mode
bun index.ts
# Single command with nsec
bun index.ts lookup "alice" --nsec nsec1...
# Single command, will prompt for nsec
bun index.ts lookup "alice"
# Check credits
bun index.ts credits --nsec nsec1...
Authentication
This tool requires a Nostr private key (nsec format) for authentication with the Vertex API. You can provide it via the --nsec flag or enter it when prompted.
MCP Server
This project includes a Model Context Protocol (MCP) server that allows external clients to interact with the Vertex API through a standardized interface.
Starting the MCP Server
You can start the MCP server in several ways:
# Using CLI argument
bun index.ts mcp --nsec nsec1...
# Using environment variable
VERTEX_KEY=nsec1... bun index.ts mcp
# Direct execution of MCP server
bun common/mcp.ts --nsec nsec1...
VERTEX_KEY=nsec1... bun common/mcp.ts
MCP Server Tools
The MCP server exposes two tools:
1. lookup - Profile Lookup
Search for Nostr profiles by query with various sorting options.
Parameters:
query(string, required): Search query to find Nostr profilessort(string, optional): Sort method -global(default),personalized, orfollowerslimit(number, optional): Maximum number of profiles to return (1-100, default: 10)
Response:
{
"profiles": [
{
"pubkey": "nostr_public_key",
"relays": ["wss://relay1.example.com", "wss://relay2.example.com"]
}
]
}
2. credits - Credit Balance
Check your current credit balance on the Vertex network.
Parameters: None
Response:
{
"balance": 1000
}
MCP Client Integration
To use this MCP server with an MCP client, add it to your client configuration:
{
"mcpServers": {
"vertex-lookup": {
"command": "bun",
"args": ["/path/to/profile-lookup-cvm/common/mcp.ts"],
"env": {
"VERTEX_KEY": "nsec1..."
}
}
}
}
MCP Server Features
- Standardized Interface: Uses the Model Context Protocol for consistent tool access
- Error Handling: Comprehensive error handling with structured error responses
- Input Validation: Validates all input parameters with clear error messages
- Resource Management: Properly manages Vertex API connections and cleanup
- Flexible Authentication: Supports both CLI arguments and environment variables
Features
- Profile Lookup: Search for Nostr profiles by query
- Credit Balance: Check your Vertex API credit balance
- Interactive Mode: Run multiple commands in a session
- Command Line Mode: Execute single commands directly
- MCP Server: Expose functionality via Model Context Protocol for external clients
- Secure Authentication: Uses Nostr private keys for API authentication
This project was created using bun init in bun v1.2.21. Bun is a fast all-in-one JavaScript runtime.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。