Discovery Sources
Documents the search sources (GitHub, npm, planned registries) that Lyra Tool Discovery queries to find MCP servers and tools.
What this file does
Documents the search sources (GitHub, npm, planned registries) that Lyra Tool Discovery queries to find MCP servers and tools.
When to use it
- You want to understand which sources are searched and how
- You need to configure custom search queries for GitHub or npm
- You are planning to implement a custom discovery source
- You want to know rate limits and authentication requirements
Assumes this stack
Discovery Sources
Lyra Tool Discovery searches multiple sources to find MCP servers and tools. Currently supported sources are GitHub and npm, with more planned.
Supported Sources
| Source | Status | Description |
|---|---|---|
github | ✅ Stable | GitHub repository search |
npm | ✅ Stable | npm registry search |
smithery | 🔜 Planned | Smithery MCP registry |
mcp-directory | 🔜 Planned | Official MCP directory |
openapi-directory | 🔜 Planned | OpenAPI spec collection |
GitHub Source
Searches GitHub repositories using the GitHub Search API.
Default Search Queries
const queries = [
'mcp server in:name,description,readme',
'modelcontextprotocol in:name,description',
'@modelcontextprotocol in:readme',
'mcp-server in:name'
];
Configuration
# Increase rate limit with GitHub token
export GITHUB_TOKEN="ghp_..."
Usage
# Search GitHub only
lyra-discover discover --sources github --limit 10
What It Fetches
For each repository, the GitHub source:
- Basic Info - Name, description, stars, license, owner
- README.md - Full content for AI analysis
- package.json - Dependencies, bin entries, scripts
- Topics - GitHub repository topics
MCP Detection
A repository is marked as MCP-compatible if:
hasMCPSupport:
item.topics.includes('mcp') ||
item.name.includes('mcp') ||
item.description?.toLowerCase().includes('mcp')
Rate Limits
| Auth | Rate Limit | Reset |
|---|---|---|
| No token | 10 requests/min | Per minute |
| With token | 30 requests/min | Per minute |
| With token | 5000 requests/hr | Per hour |
::: warning
Without a GITHUB_TOKEN, you'll quickly hit rate limits. Always set a token for production use.
:::
Custom Queries
Configure custom search queries in discovery.config.json:
{
"github": {
"queries": [
"langchain mcp in:name,readme",
"anthropic tools in:name,description",
"ai agent server in:topics"
],
"sort": "stars",
"order": "desc"
}
}
npm Source
Searches the npm registry for MCP-related packages.
Default Search Queries
const queries = [
'mcp server',
'@modelcontextprotocol',
'mcp-server'
];
Usage
# Search npm only
lyra-discover discover --sources npm --limit 10
What It Fetches
For each package:
- Package Info - Name, version, description, keywords
- README - From npm registry
- Full package.json - Dependencies, bin, scripts
- Links - Homepage, repository, npm page
MCP Detection
A package is marked as MCP-compatible if:
hasMCPSupport:
pkg.keywords?.includes('mcp') ||
pkg.name.includes('mcp') ||
pkg.description?.toLowerCase().includes('mcp') ||
pkg.dependencies?.['@modelcontextprotocol/sdk']
STDIO Config Generation
If a package has a bin entry, Lyra automatically generates an MCP STDIO config:
if (fullPkg.bin) {
tool.mcpConfig = {
type: 'stdio',
command: 'npx',
args: ['-y', fullPkg.name],
env: {}
};
}
Custom Queries
{
"npm": {
"queries": [
"@langchain",
"mcp-tool",
"model-context"
]
}
}
Using Multiple Sources
By default, Lyra searches all available sources:
# Default: searches github and npm
lyra-discover discover --limit 10
# Explicit multiple sources
lyra-discover discover --sources github,npm --limit 10
Results are deduplicated by ID:
const seen = new Set<string>();
for (const tool of results) {
if (!seen.has(tool.id)) {
seen.add(tool.id);
tools.push(tool);
}
}
Search Query Optimization
GitHub Query Syntax
| Operator | Example | Description |
|---|---|---|
in:name | mcp in:name | Search in repo name |
in:description | server in:description | Search in description |
in:readme | @anthropic in:readme | Search in README |
in:topics | mcp in:topics | Search in topics |
stars:>N | stars:>100 | Minimum stars |
language: | language:typescript | Language filter |
Example queries:
mcp server in:name,readme stars:>50 language:typescript
@modelcontextprotocol in:readme language:javascript
npm Query Tips
- Use scoped packages:
@modelcontextprotocol - Combine terms:
mcp server typescript - Use exact names:
mcp-server-filesystem
Filtering Results
By MCP Support
# Only show MCP-compatible tools (default for analysis)
lyra-discover discover --sources github,npm
The discovery filters to MCP-compatible tools before AI analysis:
const mcpTools = tools.filter(t => t.hasMCPSupport);
By Stars (Coming Soon)
{
"discovery": {
"filters": {
"minStars": 50
}
}
}
Future Sources
Smithery
The Smithery MCP Registry will be supported:
lyra-discover discover --sources smithery
MCP Directory
The official MCP directory at modelcontextprotocol.io:
lyra-discover discover --sources mcp-directory
OpenAPI Directory
Discover APIs with OpenAPI specifications:
lyra-discover discover --sources openapi-directory
Source Interface
All sources implement this interface:
interface DiscoverySource {
searchMCPServers(limit: number): Promise<DiscoveredTool[]>;
}
See Custom Sources to implement your own.
Next Steps
- Custom Sources - Create your own source
- Configuration - Full config reference
- CLI Reference - Command documentation
What's inside
6 source descriptions, 2 default query sets, 2 MCP detection logic blocks, 2 configuration examples, 1 source interface
Change this for your project
- Replace
GITHUB_TOKEN="ghp_..."with your own GitHub personal access token - Replace example queries in
discovery.config.jsonwith your own search terms - Replace
lyra-discoverwith your own CLI tool name if different
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Deduplicating results from multiple sources by ID before processing
- Generating STDIO config automatically from a package's
binentry - Filtering results to MCP-compatible tools before AI analysis
Related Documents
AI Digest Platform - Source Research & Configuration Guide
Catalogs 100+ RSS feeds, APIs, and configuration snippets for aggregating AI news, papers, and trending repos.
Reference Sources - Open Source Projects to Study
Curates five open-source WPF projects and their timeline, drag, resize, and virtualization patterns for a podcast video editor.
Mosaic 资源索引
Curates a prioritized index of SwiftUI UI resources, design inspiration sources, and reusable style templates for agent-driven project setup.