{
  "markdown": "<div align=\"center\"> \n   \n# 🔮 Lyra Tool Discovery \n \n**AI-powered tool discovery for the MCP ecosystem**\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![AI Powered](https://img.shields.io/badge/AI-OpenAI%20%7C%20Anthropic-blueviolet?style=flat-square)](https://openai.com)\n\n[Documentation](https://github.com/nirholas/lyra-tool-discovery/tree/main/docs) · [CLI Reference](#-cli-reference) · [Examples](#-examples) · [Contributing](#-contributing)\n\n</div>\n\n---\n \n## 📖 Overview\n\n**Lyra Tool Discovery** is an AI-powered automation tool designed specifically for the **crypto, DeFi, blockchain, and web3 ecosystem**. It solves the painful problem of manually discovering, evaluating, and integrating MCP (Model Context Protocol) servers into your crypto-focused applications. Instead of spending hours searching GitHub, reading READMEs, and figuring out the right integration approach, Lyra does it for you in seconds.\n\nThe tool crawls multiple sources—GitHub and npm—to find crypto-related MCP servers, APIs, and plugins. It filters results to focus exclusively on **blockchain, DeFi, web3, and cryptocurrency tooling** (including Ethereum, Solana, Bitcoin, wallets, tokens, NFTs, DEXs, staking, bridges, and more). Lyra then leverages state-of-the-art AI (OpenAI GPT-4o or Anthropic Claude) to analyze each discovered tool and automatically generates ready-to-use plugin configurations.\n\n### 🪙 Crypto Focus\n\nLyra is optimized for discovering tools related to:\n\n- **Blockchain Networks** — Ethereum, Solana, Bitcoin, Layer 2s, bridges\n- **DeFi Protocols** — DEXs, lending, staking, yield farming, liquidity\n- **Web3 Infrastructure** — Wallets, RPC providers, indexers, oracles\n- **Token Standards** — ERC-20, ERC-721, NFTs, token swaps\n- **Smart Contracts** — Development, auditing, deployment tools\n- **On-chain Data** — Analytics, explorers, transaction tracking\n\nLyra is built for **crypto MCP ecosystem developers** who need to rapidly onboard new tools, **plugin marketplace operators** like plugin.delivery who curate crypto plugins, and **automation engineers** building CI/CD pipelines for DeFi tool discovery and deployment.\n\nThis tool is a critical piece of the discovery-to-deployment pipeline: `lyra-tool-discovery` → `github-to-mcp` → `plugin.delivery` → **SperaxOS users**. By automating the discovery and classification phase, Lyra enables fully automated plugin onboarding with minimal human intervention.\n\n---\n\n## ✨ Features\n\n<table>\n<tr>\n<td width=\"50%\">\n\n### 🤖 Multi-Provider AI\n\n- **OpenAI** — GPT-4o, GPT-4-turbo, GPT-3.5-turbo\n- **Anthropic** — Claude Sonnet 4, Claude Opus\n- Auto-detection from environment variables\n- Custom model selection via CLI or config\n- Intelligent fallback between providers\n\n</td>\n<td width=\"50%\">\n\n### 📦 8 Plugin Templates\n\n- `mcp-http` — Remote MCP servers (HTTP/SSE)\n- `mcp-stdio` — Local MCP servers (stdio)\n- `openapi` — REST API integrations\n- `standalone` — Full React applications\n- `markdown` — Rich text/documentation\n- `default` — Configurable plugins\n- `settings` — User preference plugins\n- `basic` — Simple function plugins\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### 🔍 Discovery Sources\n\n- **GitHub** — Search repos, topics, READMEs\n- **npm** — Package registry search\n- 🔜 Smithery (MCP directory)\n- 🔜 OpenAPI Directory\n- 🔜 RapidAPI\n\n</td>\n<td width=\"50%\">\n\n### 🪙 Crypto Filtering\n\n- **Keywords** — crypto, defi, blockchain, web3\n- **Networks** — ethereum, solana, bitcoin\n- **Protocols** — wallet, token, nft, dex, staking\n- **Age Filter** — Only repos updated within 12 months\n- **Smart Validation** — AI validates crypto relevance\n\n- Full-featured command-line interface\n- Node.js/TypeScript SDK for automation\n- JSON output for CI/CD pipelines\n- Dry-run mode for testing\n- Progress indicators and rich output\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### 🖥️ CLI & Programmatic API\n\n- Full-featured command-line interface\n- Node.js/TypeScript SDK for automation\n- JSON output for CI/CD pipelines\n- Dry-run mode for testing\n- Progress indicators and rich output\n\n</td>\n<td width=\"50%\">\n\n### 🧪 Testing & Validation\n\n- `--dry-run` mode for safe testing\n- List discovered tools without AI calls\n- Validate configurations before deployment\n- Debug logging for troubleshooting\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### 📤 Flexible Output\n\n- Structured JSON for piping to other tools\n- Quick Import format for SperaxOS\n- Plugin manifests for plugin.delivery\n- Console output with rich formatting\n\n</td>\n</tr>\n</table>\n\n---\n\n## 🪙 Crypto Discovery Keywords\n\nLyra automatically filters discovery results to focus on crypto/DeFi/blockchain/web3 tools. The following keywords are used for both search queries and result validation:\n\n<details>\n<summary><strong>View all supported keywords</strong></summary>\n\n| Category | Keywords |\n|----------|----------|\n| **General** | crypto, cryptocurrency, defi, blockchain, web3 |\n| **Networks** | ethereum, eth, solana, sol, bitcoin, btc, chain |\n| **Tokens** | token, erc20, erc721, nft |\n| **DeFi** | dex, swap, staking, yield, lending, liquidity, vault, bridge |\n| **Infrastructure** | wallet, protocol, onchain, on-chain, smart contract |\n| **Libraries** | web3.js, ethers, viem, wagmi, rainbowkit |\n| **Protocols** | uniswap, aave, compound |\n\n</details>\n\nTools that don't match any of these keywords are automatically filtered out, ensuring you only discover crypto-relevant MCP servers.\n\n### Age Filtering\n\nBy default, Lyra only discovers tools that have been updated within the **last 12 months**. This ensures you're finding actively maintained projects. Use `--max-age` to adjust:\n\n```bash\n# Only tools updated in the last 6 months\nlyra-discover discover --max-age 6\n\n# Only tools updated in the last 3 months (bleeding edge)\nlyra-discover discover --max-age 3\n\n# Tools up to 24 months old\nlyra-discover discover --max-age 24\n```\n\n---\n\n## Quick Start\n\n### Installation\n\n```bash\n# Global install (recommended for CLI usage)\npnpm add -g @nirholas/lyra-tool-discovery\n\n# Or with npm\nnpm install -g @nirholas/lyra-tool-discovery\n\n# Or as a project dependency\npnpm add @nirholas/lyra-tool-discovery\n\n# Or run directly with npx (no install)\nnpx @nirholas/lyra-tool-discovery discover --help\n```\n\n### Environment Setup\n\n```bash\n# Using OpenAI (default when both keys present)\nexport OPENAI_API_KEY=\"sk-...\"\n\n# Or using Anthropic\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\n\n# Optional: Force a specific provider\nexport AI_PROVIDER=\"anthropic\"  # or \"openai\"\n\n# Optional: Specify a model\nexport AI_MODEL=\"claude-sonnet-4-20250514\"\n\n# Optional: GitHub token for higher rate limits\nexport GITHUB_TOKEN=\"ghp_...\"\n```\n\n### First Discovery\n\n```bash\n# Discover MCP servers from GitHub and npm\nlyra-discover discover --sources github,npm --limit 10\n\n# Run in dry-run mode (no AI calls)\nlyra-discover discover --dry-run --limit 20\n\n# Analyze a specific GitHub repository\nlyra-discover analyze-repo anthropics claude-mcp\n\n# Analyze an npm package\nlyra-discover analyze-npm @modelcontextprotocol/server-github\n\n# Check available AI providers\nlyra-discover providers\n\n# View all plugin templates\nlyra-discover templates\n```\n\n---\n\n## 📖 CLI Reference\n\n### Global Options\n\n| Flag | Alias | Description | Default |\n|------|-------|-------------|---------|\n| `--provider` | `-p` | AI provider (`openai` or `anthropic`) | Auto-detect from env |\n| `--model` | `-m` | AI model to use | Provider default |\n| `--version` | `-V` | Show version number | — |\n| `--help` | `-h` | Show help | — |\n\n### Commands\n\n#### `discover`\n\nSearch for MCP tools and APIs across configured sources.\n\n```bash\nlyra-discover discover [options]\n```\n\n| Option | Alias | Description | Default |\n|--------|-------|-------------|---------|\n| `--sources` | `-s` | Comma-separated sources: `github`, `npm`, `awesome-list` | `github,npm` |\n| `--limit` | `-l` | Maximum tools to discover per source | `5` |\n| `--max-age` | `-a` | Maximum age in months for discovered repos | `12` |\n| `--dry-run` | `-d` | List tools without AI analysis | `false` |\n| `--provider` | `-p` | AI provider to use | Auto-detect |\n| `--model` | `-m` | AI model to use | Provider default |\n\n**Examples:**\n\n```bash\n# Discover crypto MCP tools from GitHub only, limit 10 results\nlyra-discover discover --sources github --limit 10\n\n# Find tools updated in the last 6 months only\nlyra-discover discover --max-age 6 --limit 20\n\n# Dry run to preview what would be analyzed\nlyra-discover discover --dry-run --sources npm --limit 20\n\n# Use Anthropic Claude for analysis\nlyra-discover discover --provider anthropic --model claude-sonnet-4-20250514\n\n# Use OpenAI GPT-4o for analysis\nlyra-discover discover --provider openai --model gpt-4o\n```\n\n**Example Output:**\n\n```\n🔍 Discovering crypto/DeFi/web3 tools from: github, npm\n📅 Max age: 12 months\n  Found 5 from github\n  Found 3 from npm\n\n📊 Total discovered: 8 tools\n🪙 Crypto-related: 6 tools\n🔌 MCP-compatible: 5 tools\n\n🤖 Analyzing: mcp-server-ethereum...\n  Template: mcp-stdio\n  Reasoning: Has MCP SDK dependency and bin entry for local execution\n\n✅ Analyzed 5 tools\n\n📦 Generated Configs:\n\n--- mcp-server-ethereum ---\nTemplate: mcp-stdio\nConfig: {\n  \"identifier\": \"mcp-server-ethereum\",\n  \"customParams\": {\n    \"mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-server-ethereum\"]\n    }\n  }\n}\n```\n\n---\n\n#### `analyze-repo`\n\nAnalyze a specific GitHub repository.\n\n```bash\nlyra-discover analyze-repo <owner> <repo> [options]\n```\n\n| Argument | Description |\n|----------|-------------|\n| `owner` | GitHub repository owner/organization |\n| `repo` | Repository name |\n\n| Option | Alias | Description |\n|--------|-------|-------------|\n| `--provider` | `-p` | AI provider to use |\n| `--model` | `-m` | AI model to use |\n\n**Examples:**\n\n```bash\n# Analyze the official MCP GitHub server\nlyra-discover analyze-repo modelcontextprotocol servers\n\n# Analyze with specific model\nlyra-discover analyze-repo anthropics claude-mcp --model gpt-4o\n\n# Analyze a community MCP server\nlyra-discover analyze-repo punkpeye mcp-server-obsidian\n```\n\n**Example Output:**\n\n```\n🔍 Fetching modelcontextprotocol/servers...\n🤖 Analyzing...\n\n✅ Analysis complete:\n  Template: mcp-stdio\n  Reasoning: Repository contains multiple MCP servers with bin entries, using @modelcontextprotocol/sdk\n\n📋 Quick Import JSON:\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-github\"]\n    }\n  }\n}\n```\n\n---\n\n#### `analyze-npm`\n\nAnalyze a specific npm package.\n\n```bash\nlyra-discover analyze-npm <package> [options]\n```\n\n| Argument | Description |\n|----------|-------------|\n| `package` | npm package name (with or without scope) |\n\n| Option | Alias | Description |\n|--------|-------|-------------|\n| `--provider` | `-p` | AI provider to use |\n| `--model` | `-m` | AI model to use |\n\n**Examples:**\n\n```bash\n# Analyze official MCP server packages\nlyra-discover analyze-npm @modelcontextprotocol/server-github\nlyra-discover analyze-npm @modelcontextprotocol/server-filesystem\nlyra-discover analyze-npm @modelcontextprotocol/server-slack\n\n# Analyze community packages\nlyra-discover analyze-npm mcp-server-sqlite\n```\n\n---\n\n#### `providers`\n\nShow available AI providers based on configured environment variables.\n\n```bash\nlyra-discover providers\n```\n\n**Example Output (with keys configured):**\n\n```\n🤖 AI Provider Configuration\n\nAvailable providers (based on env vars):\n  ✅ openai\n  ✅ anthropic\n\nOverride with env vars or CLI flags:\n  AI_PROVIDER=openai|anthropic\n  AI_MODEL=gpt-4o|claude-sonnet-4-20250514|etc.\n  --provider openai --model gpt-4o\n```\n\n**Example Output (no keys):**\n\n```\n🤖 AI Provider Configuration\n\nAvailable providers (based on env vars):\n  ⚠️  No API keys found!\n\nSet one of these environment variables:\n  - OPENAI_API_KEY     → Use OpenAI (gpt-4o, gpt-4-turbo, etc.)\n  - ANTHROPIC_API_KEY  → Use Anthropic (claude-sonnet-4-20250514, etc.)\n```\n\n---\n\n#### `templates`\n\nDisplay all available plugin templates with descriptions.\n\n```bash\nlyra-discover templates\n```\n\n**Output:**\n\n```\n╔═══════════════════════════════════════════════════════════════════════════════╗\n║                     plugin.delivery Plugin Templates                          ║\n╠════════════╦════════════╦═══════════════════════════════════════════════════════╣\n║ Template   ║ Type       ║ Description                   ║ Use Case           ║\n╠════════════╬════════════╬═══════════════════════════════╬════════════════════╣\n║ basic      ║ Default    ║ Standard plugin with API      ║ Simple data lookups║\n║ default    ║ Default    ║ Plugin with settings UI       ║ Configurable tools ║\n║ markdown   ║ Markdown   ║ Rich text output              ║ Formatted reports  ║\n║ openapi    ║ OpenAPI    ║ Auto-generated from spec      ║ Existing APIs      ║\n║ settings   ║ Default    ║ Plugin with user preferences  ║ Personalized tools ║\n║ standalone ║ Standalone ║ Full React application        ║ Interactive UIs    ║\n╠════════════╬════════════╬═══════════════════════════════╬════════════════════╣\n║ mcp-http   ║ MCP        ║ Streamable HTTP MCP server    ║ Remote MCP tools   ║\n║ mcp-stdio  ║ MCP        ║ STDIO-based MCP server        ║ Local npm MCP      ║\n╚════════════╩════════════╩═══════════════════════════════╩════════════════════╝\n```\n\n---\n\n## 🔧 Programmatic API\n\nUse Lyra as a library in your Node.js/TypeScript projects:\n\n```typescript\nimport { \n  ToolDiscovery, \n  GitHubSource, \n  NpmSource,\n  AIAnalyzer \n} from '@nirholas/lyra-tool-discovery';\n\n// Initialize with default settings (auto-detect AI provider)\nconst discovery = new ToolDiscovery();\n\n// Or with specific configuration\nconst discovery = new ToolDiscovery({\n  provider: 'anthropic',\n  model: 'claude-sonnet-4-20250514',\n  apiKey: process.env.ANTHROPIC_API_KEY // Optional, uses env var by default\n});\n\n// Discover from all sources\nconst results = await discovery.discover({\n  sources: ['github', 'npm'],\n  limit: 20,\n  dryRun: false\n});\n\n// Process results\nfor (const result of results) {\n  console.log(`Tool: ${result.tool.name}`);\n  console.log(`Template: ${result.decision.template}`);\n  console.log(`Config:`, result.generated.pluginConfig);\n}\n\n// Analyze a specific GitHub repo\nconst repoResult = await discovery.analyzeGitHubRepo('owner', 'repo');\nconsole.log(repoResult?.decision.template);\n\n// Analyze a specific npm package\nconst npmResult = await discovery.analyzeNpmPackage('@scope/package-name');\nconsole.log(npmResult?.decision.template);\n```\n\n### Using Individual Components\n\n```typescript\nimport { GitHubSource, NpmSource, AIAnalyzer } from '@nirholas/lyra-tool-discovery';\n\n// Use GitHub source directly\nconst github = new GitHubSource(process.env.GITHUB_TOKEN);\nconst mcpTools = await github.searchMCPServers(10);\nconst openApiTools = await github.searchOpenAPISpecs(10);\nconst specificRepo = await github.getRepo('owner', 'repo');\n\n// Use npm source directly\nconst npm = new NpmSource();\nconst npmTools = await npm.searchMCPServers(10);\nconst specificPackage = await npm.getPackageAsTool('@modelcontextprotocol/server-github');\n\n// Use AI analyzer directly\nconst ai = new AIAnalyzer({ provider: 'openai', model: 'gpt-4o' });\nconst decision = await ai.analyzeAndDecide(discoveredTool);\nconst quickImport = ai.generateQuickImport(decision);\n```\n\n### Type Definitions\n\n```typescript\nimport type {\n  // Discovery types\n  DiscoveredTool,\n  DiscoveryResult,\n  DiscoverySource,\n  \n  // Template types\n  PluginTemplate,\n  TemplateDecision,\n  \n  // MCP types\n  MCPConnection,\n  MCPHttpConnection,\n  MCPStdioConnection,\n  MCPAuthConfig,\n  \n  // Plugin types\n  CustomPlugin,\n  PluginManifest,\n  PluginIndexEntry,\n  MCPQuickImportConfig\n} from '@nirholas/lyra-tool-discovery';\n```\n\n---\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                          LYRA TOOL DISCOVERY                                │\n├─────────────────────────────────────────────────────────────────────────────┤\n│                                                                             │\n│  ┌────────────────┐     ┌────────────────┐     ┌────────────────────────┐  │\n│  │    Sources     │     │  AI Analyzer   │     │   Template Engine      │  │\n│  ├────────────────┤     ├────────────────┤     ├────────────────────────┤  │\n│  │                │     │                │     │                        │  │\n│  │ • GitHub API   │────▶│ • OpenAI       │────▶│ • basic                │  │\n│  │   - Repos      │     │   - GPT-4o     │     │ • default              │  │\n│  │   - Topics     │     │   - GPT-4-turbo│     │ • markdown             │  │\n│  │   - READMEs    │     │                │     │ • openapi              │  │\n│  │                │     │ • Anthropic    │     │ • settings             │  │\n│  │ • npm Registry │     │   - Claude     │     │ • standalone           │  │\n│  │   - Packages   │     │   - Sonnet     │     │ • mcp-http             │  │\n│  │   - Keywords   │     │   - Opus       │     │ • mcp-stdio            │  │\n│  │                │     │                │     │                        │  │\n│  └────────────────┘     └────────────────┘     └────────────────────────┘  │\n│          │                      │                         │                │\n│          │                      │                         │                │\n│          ▼                      ▼                         ▼                │\n│  ┌─────────────────────────────────────────────────────────────────────┐   │\n│  │                         Discovery Result                            │   │\n│  ├─────────────────────────────────────────────────────────────────────┤   │\n│  │  {                                                                  │   │\n│  │    tool: DiscoveredTool,     // Source metadata                     │   │\n│  │    decision: TemplateDecision, // AI analysis result                │   │\n│  │    generated: {                                                     │   │\n│  │      pluginConfig: CustomPlugin | PluginIndexEntry                  │   │\n│  │    }                                                                │   │\n│  │  }                                                                  │   │\n│  └─────────────────────────────────────────────────────────────────────┘   │\n│                                    │                                       │\n│                                    ▼                                       │\n│                    ┌───────────────────────────────┐                       │\n│                    │        Output Formats         │                       │\n│                    ├───────────────────────────────┤                       │\n│                    │ • JSON (for pipelines)        │                       │\n│                    │ • Quick Import (SperaxOS)     │                       │\n│                    │ • Plugin Manifests            │                       │\n│                    │ • Console (human-readable)    │                       │\n│                    └───────────────────────────────┘                       │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## 📋 Plugin Templates\n\nLyra analyzes tools and automatically selects from 8 plugin templates:\n\n| Template | Transport | Type | Use Case | AI Selection Criteria |\n|----------|-----------|------|----------|----------------------|\n| `mcp-http` | HTTP/SSE | MCP | Remote MCP servers | Has MCP SDK + HTTP server code, publicly accessible URL |\n| `mcp-stdio` | stdio | MCP | Local MCP servers | Has MCP SDK + `bin` entry in package.json, runs via npx |\n| `openapi` | HTTP | OpenAPI | REST API integrations | Has OpenAPI/Swagger spec file or documentation |\n| `standalone` | — | Standalone | Interactive applications | Needs complex UI, React components, data visualization |\n| `markdown` | — | Markdown | Documentation/content | Outputs formatted text, reports, documentation |\n| `default` | — | Default | Configurable plugins | Needs settings UI, configuration options |\n| `settings` | — | Default | User preferences | Stores user preferences, personalization |\n| `basic` | — | Default | Simple functions | Simple data lookups, basic API calls |\n\n### AI Decision Priority\n\nThe AI follows this priority order when selecting templates:\n\n1. **MCP Detection** → If tool uses `@modelcontextprotocol/sdk`:\n   - Has HTTP server → `mcp-http`\n   - Has bin entry → `mcp-stdio`\n2. **OpenAPI Detection** → If has `openapi.json/yaml` or Swagger spec → `openapi`\n3. **Complex UI** → If needs interactive dashboard → `standalone`\n4. **Formatted Output** → If outputs rich text/markdown → `markdown`\n5. **Configuration** → If needs user settings → `default` or `settings`\n6. **Default** → Simple function → `basic`\n\n---\n\n## 🔗 Integration Pipeline\n\nLyra Tool Discovery is part of a larger automation toolchain for the SperaxOS ecosystem:\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│                 │     │                 │     │                 │     │                 │\n│  lyra-discover  │────▶│  github-to-mcp  │────▶│ plugin.delivery │────▶│    SperaxOS     │\n│                 │     │                 │     │                 │     │                 │\n│  Discovery &    │     │   Conversion    │     │   Marketplace   │     │   End Users     │\n│   Analysis      │     │                 │     │                 │     │                 │\n└─────────────────┘     └─────────────────┘     └─────────────────┘     └─────────────────┘\n```\n\n1. **Discovery** (this tool) — Finds tools on GitHub/npm, analyzes with AI, generates configs\n2. **Conversion** — [github-to-mcp](https://github.com/nirholas/github-to-mcp) converts repos to MCP servers\n3. **Registry** — [plugin.delivery](https://github.com/nirholas/plugin.delivery) hosts the plugin marketplace\n4. **Consumption** — SperaxOS users discover and install plugins\n\n### Automated PR Workflow\n\nYou can set up a GitHub Action to automate the entire pipeline:\n\n```yaml\n# .github/workflows/discover-tools.yml\nname: Discover New Tools\n\non:\n  schedule:\n    - cron: '0 0 * * *'  # Daily at midnight\n  workflow_dispatch:\n\njobs:\n  discover:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      \n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: '20'\n      \n      - name: Install Lyra\n        run: npm install -g @nirholas/lyra-tool-discovery\n      \n      - name: Discover new MCP servers\n        env:\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          lyra-discover discover \\\n            --sources github,npm \\\n            --limit 50 \\\n            > discovered-tools.json\n      \n      - name: Create PR with new tools\n        uses: peter-evans/create-pull-request@v5\n        with:\n          title: '🔮 New tools discovered by Lyra'\n          body: 'Automated discovery run found new MCP servers and APIs.'\n          branch: lyra/discovered-tools\n```\n\n---\n\n## ⚙️ Configuration\n\n### Environment Variables\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `OPENAI_API_KEY` | OpenAI API key | `sk-...` |\n| `ANTHROPIC_API_KEY` | Anthropic API key | `sk-ant-...` |\n| `AI_PROVIDER` | Force specific provider | `openai` or `anthropic` |\n| `AI_MODEL` | Override default model | `gpt-4o`, `claude-sonnet-4-20250514` |\n| `GITHUB_TOKEN` | GitHub token for higher rate limits | `ghp_...` |\n\n### Configuration File (Coming Soon)\n\nSupport for `discovery.config.json`:\n\n```json\n{\n  \"sources\": {\n    \"github\": {\n      \"enabled\": true,\n      \"searchQueries\": [\n        \"mcp server in:name,description\",\n        \"modelcontextprotocol in:readme\",\n        \"@modelcontextprotocol in:readme\"\n      ],\n      \"minStars\": 10\n    },\n    \"npm\": {\n      \"enabled\": true,\n      \"keywords\": [\"mcp\", \"model-context-protocol\", \"mcp-server\"],\n      \"scopes\": [\"@modelcontextprotocol\"]\n    }\n  },\n  \"ai\": {\n    \"provider\": \"anthropic\",\n    \"model\": \"claude-sonnet-4-20250514\",\n    \"maxTokens\": 4096\n  },\n  \"output\": {\n    \"format\": \"json\",\n    \"path\": \"./data/discovered-tools.json\",\n    \"includeMetadata\": true\n  },\n  \"filters\": {\n    \"requireMCPSupport\": true,\n    \"requireLicense\": true,\n    \"excludeArchived\": true\n  }\n}\n```\n\n---\n\n## 📚 Examples\n\n### Example 1: Discover and Save Results\n\n```bash\n# Discover tools and save to file\nlyra-discover discover --sources github,npm --limit 20 > tools.json\n\n# Parse with jq\ncat tools.json | jq '.[] | {name: .tool.name, template: .decision.template}'\n```\n\n### Example 2: Batch Analyze Repositories\n\n```bash\n# Create a list of repos to analyze\nrepos=(\n  \"modelcontextprotocol/servers\"\n  \"anthropics/claude-mcp\"\n  \"punkpeye/mcp-server-obsidian\"\n)\n\n# Analyze each repo\nfor repo in \"${repos[@]}\"; do\n  owner=$(echo $repo | cut -d'/' -f1)\n  name=$(echo $repo | cut -d'/' -f2)\n  lyra-discover analyze-repo $owner $name\n  echo \"---\"\ndone\n```\n\n### Example 3: Analyze npm Packages in CI\n\n```typescript\n// scripts/analyze-packages.ts\nimport { ToolDiscovery } from '@nirholas/lyra-tool-discovery';\n\nconst packages = [\n  '@modelcontextprotocol/server-github',\n  '@modelcontextprotocol/server-filesystem',\n  '@modelcontextprotocol/server-slack',\n];\n\nasync function main() {\n  const discovery = new ToolDiscovery({ provider: 'openai' });\n  \n  for (const pkg of packages) {\n    const result = await discovery.analyzeNpmPackage(pkg);\n    if (result) {\n      console.log(JSON.stringify({\n        package: pkg,\n        template: result.decision.template,\n        config: result.generated.pluginConfig\n      }, null, 2));\n    }\n  }\n}\n\nmain();\n```\n\n### Example 4: Custom Source Integration\n\n```typescript\nimport { AIAnalyzer, type DiscoveredTool } from '@nirholas/lyra-tool-discovery';\n\n// Create a custom discovered tool\nconst customTool: DiscoveredTool = {\n  id: 'custom:my-tool',\n  name: 'my-custom-mcp-server',\n  description: 'A custom MCP server for my application',\n  source: 'github',\n  sourceUrl: 'https://github.com/myorg/my-tool',\n  hasMCPSupport: true,\n  hasNpmPackage: true,\n  readme: '# My Tool\\n\\nAn MCP server that does X, Y, Z...',\n  packageJson: {\n    name: 'my-custom-mcp-server',\n    bin: { 'my-mcp': './dist/cli.js' },\n    dependencies: { '@modelcontextprotocol/sdk': '^1.0.0' }\n  }\n};\n\n// Analyze with AI\nconst ai = new AIAnalyzer({ provider: 'anthropic' });\nconst decision = await ai.analyzeAndDecide(customTool);\nconsole.log(`Template: ${decision.template}`);\nconsole.log(`Reasoning: ${decision.reasoning}`);\n```\n\n### Example 5: Dry Run with Filtering\n\n```bash\n# Discover in dry-run mode to see what would be analyzed\nlyra-discover discover --dry-run --sources github --limit 50\n\n# Output:\n# [DRY RUN] Would analyze: mcp-server-github\n#   Source: github\n#   URL: https://github.com/modelcontextprotocol/servers\n#   MCP: Yes\n# [DRY RUN] Would analyze: claude-mcp\n#   Source: github\n#   URL: https://github.com/anthropics/claude-mcp\n#   MCP: Yes\n# ...\n```\n\n### Example 6: Generate Quick Import for SperaxOS\n\n```typescript\nimport { ToolDiscovery } from '@nirholas/lyra-tool-discovery';\n\nconst discovery = new ToolDiscovery();\nconst result = await discovery.analyzeNpmPackage('@modelcontextprotocol/server-github');\n\n// The quick import format can be directly pasted into SperaxOS\nconsole.log(`Add this to your MCP configuration:`);\nconsole.log(JSON.stringify({\n  mcpServers: {\n    [result.tool.name]: result.decision.config.customParams?.mcp\n  }\n}, null, 2));\n```\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how to get started:\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/nirholas/lyra-tool-discovery.git\ncd lyra-tool-discovery\n\n# Install dependencies\npnpm install\n\n# Set up environment\ncp .env.example .env\n# Edit .env with your API keys\n\n# Run in development mode\npnpm dev discover --dry-run\n\n# Build\npnpm build\n\n# Run tests\npnpm test\n```\n\n### Code Style\n\n- We use **TypeScript** with strict mode\n- **ESLint** for linting\n- **Prettier** for formatting\n- Write **JSDoc comments** for public APIs\n- Follow **conventional commits** for commit messages\n\n### Pull Request Process\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes\n4. Add tests if applicable\n5. Run `pnpm build` and `pnpm test`\n6. Commit with conventional commit message: `feat: add amazing feature`\n7. Push to your fork: `git push origin feature/amazing-feature`\n8. Open a Pull Request\n\n### Areas for Contribution\n\n- 🔌 **New Sources** — Add support for Smithery, OpenAPI Directory, RapidAPI\n- 🤖 **AI Providers** — Add support for Gemini, Mistral, local models\n- 📝 **Documentation** — Improve examples, add tutorials\n- 🧪 **Testing** — Add unit tests, integration tests\n- 🐛 **Bug Fixes** — Check the issues tab\n\n---\n\n## 🔗 Related Projects\n\n| Project | Description |\n|---------|-------------|\n| [github-to-mcp](https://github.com/nirholas/github-to-mcp) | Convert GitHub repos to MCP servers |\n| [plugin.delivery](https://github.com/nirholas/plugin.delivery) | Plugin marketplace for SperaxOS |\n| [SperaxOS](https://sperax.io) | AI-native operating system |\n| [lyra-registry](https://github.com/nirholas/lyra-registry) | Curated registry of discovered plugins |\n| [UCAI](https://github.com/nirholas/ucai) | Universal Context AI framework |\n| [MCP SDK](https://github.com/modelcontextprotocol/sdk) | Official Model Context Protocol SDK |\n\n---\n\n## 📄 License\n\nMIT License © 2024 [nirholas](https://github.com/nirholas)\n\n```\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n---\n\n## 🙏 Credits\n\n- made by nich [Model Context Protocol](https://modelcontextprotocol.io) ecosystem\n- Powered by [OpenAI](https://openai.com) and [Anthropic](https://anthropic.com)\n- Inspired by the need to automate plugin discovery for SperaxOS\n\n---\n\n<div align=\"center\">\n\n**[⬆ Back to Top](#-lyra-tool-discovery)**\n\n</div>\n\n\n## Documentation\n\nFull documentation site: **https://nirholas.github.io/lyra-tool-discovery/**\n\n- [Getting started](docs/getting-started.md) covers install and first run.\n- [Examples](docs/examples.md) has copy-paste snippets.\n",
  "bytes": 31280,
  "sha": "8df334e6104fc531607a354b986609764bc4ee32f6c40681d836926ec7b5e182",
  "repo_slug": "nirholas/lyra-tool-discovery",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_nirholas_tool_discovery_mcp_6546874b/readme"
}