@ls-apis/cli 0.0.4 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ### Public APIs Discovery for Humans & Agents
4
4
 
5
- A curated collection of **4,300+ public APIs** with a powerful CLI search tool. Discover, filter, and explore APIs by category, authentication type.
5
+ A curated collection of **4,000+ public APIs** with a powerful CLI search tool. Discover, filter, and explore APIs by category, authentication type.
6
6
 
7
7
  ## Features
8
8
 
@@ -10,6 +10,7 @@ A curated collection of **4,300+ public APIs** with a powerful CLI search tool.
10
10
  - **Smart Search** - Filter by query, category, authentication type
11
11
  - **Colored Output** - Syntax-highlighted results (use `--no-color` to disable)
12
12
  - **Multiple Output Formats** - Text or JSON output
13
+ - **MCP Server** - AI-friendly API search via Model Context Protocol
13
14
  - **Extensible Architecture** - Pluggable fetchers for adding new API sources
14
15
  - **TypeScript** - Fully typed for better developer experience
15
16
 
@@ -131,7 +132,7 @@ A config file is automatically created at `~/.ls-apis` on first run. You can edi
131
132
  | `descriptionMaxLength` | 250 | Max chars before truncation |
132
133
  | `colors` | true | Enable terminal colors |
133
134
 
134
- The config file is plain JSON. Edit it manually to customize defaults, or delete it to regenerate with built-in values. Uses only Node.js standard library (`os`, `path`, `fs/promises`).
135
+ The config file is plain JSON. Edit it manually to customize defaults, or delete it to regenerate with built-in values.
135
136
 
136
137
  ### Example Output
137
138
 
@@ -152,3 +153,92 @@ Found 2 APIs:
152
153
  Sources: publicapis-dev
153
154
  ```
154
155
 
156
+ ## MCP Server
157
+
158
+ ls-apis includes an [MCP](https://modelcontextprotocol.io) server for AI assistants to search and discover public APIs via natural language.
159
+
160
+ ### Tools
161
+
162
+ | Tool | Description |
163
+ | ----------------- | ----------------------------------------------------------- |
164
+ | `search-apis` | Search public APIs by query, category, auth type, and limit |
165
+ | `list-categories` | List all API categories with API counts |
166
+ | `list-providers` | List all data providers with API counts |
167
+
168
+ ### Resources
169
+
170
+ | URI | Description |
171
+ | ------------------- | ------------------------------------- |
172
+ | `apis://data` | Full aggregated API dataset (JSON) |
173
+ | `apis://categories` | All API categories with counts (JSON) |
174
+ | `apis://providers` | All data providers with counts (JSON) |
175
+ | `apis://stats` | Dataset summary statistics (JSON) |
176
+
177
+ ### Setup
178
+
179
+ ```bash
180
+ npm install
181
+ ```
182
+
183
+ ### Configuration
184
+
185
+ #### VS Code / GitHub Copilot
186
+
187
+ Create `.vscode/mcp.json` in your project root:
188
+
189
+ > VS Code will ask for permission on first run — this is standard for project-local MCP servers. Approve once and it won't prompt again.
190
+
191
+ ```json
192
+ {
193
+ "servers": {
194
+ "ls-apis": {
195
+ "command": "npx",
196
+ "args": ["tsx", "packages/mcp-server/src/index.ts"],
197
+ "cwd": "/path/to/ls-apis"
198
+ }
199
+ }
200
+ }
201
+ ```
202
+
203
+ > Switch Copilot Chat to **Agent mode** to use MCP tools.
204
+
205
+ #### Claude Desktop
206
+
207
+ Edit `claude_desktop_config.json` (`%APPDATA%\Claude\` on Windows, `~/Library/Application Support/Claude/` on macOS):
208
+
209
+ ```json
210
+ {
211
+ "mcpServers": {
212
+ "ls-apis": {
213
+ "command": "npx",
214
+ "args": ["tsx", "packages/mcp-server/src/index.ts"],
215
+ "cwd": "/path/to/ls-apis"
216
+ }
217
+ }
218
+ }
219
+ ```
220
+
221
+ #### Cursor
222
+
223
+ Create `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
224
+
225
+ ```json
226
+ {
227
+ "mcpServers": {
228
+ "ls-apis": {
229
+ "command": "npx",
230
+ "args": ["tsx", "packages/mcp-server/src/index.ts"],
231
+ "cwd": "/path/to/ls-apis"
232
+ }
233
+ }
234
+ }
235
+ ```
236
+
237
+ ### Verification
238
+
239
+ After configuring, the client should discover the tools and resources listed above. You can also test via CLI:
240
+
241
+ ```bash
242
+ echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npm run mcp
243
+ ```
244
+