@apiverve/mcp-server 1.0.1 → 1.1.0

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.
Files changed (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +58 -71
  3. package/bin/install.js +149 -208
  4. package/package.json +9 -4
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 APIVerve
3
+ Copyright (c) 2026 APIVerve
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <img src="https://apiverve.com/images/favicon.png" alt="APIVerve Logo" width="80" />
6
6
 
7
- **249+ APIs accessible through the Model Context Protocol**
7
+ **356+ APIs accessible through the Model Context Protocol**
8
8
 
9
9
  [![npm version](https://img.shields.io/npm/v/@apiverve/mcp-server)](https://www.npmjs.com/package/@apiverve/mcp-server)
10
10
  [![PyPI version](https://img.shields.io/pypi/v/apiverve-mcp)](https://pypi.org/project/apiverve-mcp/)
@@ -17,11 +17,11 @@
17
17
 
18
18
  ## šŸš€ Overview
19
19
 
20
- The **APIVerve MCP Server** provides seamless access to 249+ production-ready APIs through the [Model Context Protocol](https://modelcontextprotocol.io). Connect AI assistants like Claude, ChatGPT, and other MCP-compatible clients to a vast ecosystem of data and functionality.
20
+ The **APIVerve MCP Server** provides seamless access to 356+ production-ready APIs through the [Model Context Protocol](https://modelcontextprotocol.io). Connect AI assistants like Claude, ChatGPT, and other MCP-compatible clients to a vast ecosystem of data and functionality.
21
21
 
22
22
  ### ✨ Features
23
23
 
24
- - šŸŽÆ **249+ APIs** - Weather, news, geocoding, validation, conversion, and more
24
+ - šŸŽÆ **356+ APIs** - Weather, news, geocoding, validation, conversion, and more
25
25
  - šŸ” **OAuth 2.0 Authentication** - Secure, industry-standard authentication
26
26
  - šŸ“Š **Token-Based Pricing** - Pay only for what you use
27
27
  - šŸš€ **High Performance** - Cloud-hosted with 99%+ uptime
@@ -30,94 +30,80 @@ The **APIVerve MCP Server** provides seamless access to 249+ production-ready AP
30
30
 
31
31
  ## šŸ“¦ Installation
32
32
 
33
- ### For Claude Desktop / MCP Clients
33
+ APIVerve is a **remote** MCP server — there is nothing to run locally. Point your client at the URL below and it will handle sign-in for you.
34
34
 
35
- Add to your MCP settings file:
35
+ ### Quick setup
36
36
 
37
- **Claude Desktop (`claude_desktop_config.json`):**
38
- ```json
39
- {
40
- "mcpServers": {
41
- "apiverve": {
42
- "type": "sse",
43
- "url": "https://api.apiverve.com/v1/mcp"
44
- }
45
- }
46
- }
37
+ ```bash
38
+ npx @apiverve/mcp-server
39
+ ```
40
+
41
+ Configures VS Code and Cursor, and prints the manual step for Claude Desktop. Target one client with `npx @apiverve/mcp-server cursor`.
42
+
43
+ For headless setups, pass a key instead of using sign-in:
44
+
45
+ ```bash
46
+ npx @apiverve/mcp-server --api-key YOUR_API_KEY
47
47
  ```
48
48
 
49
- **VS Code / Cline:**
49
+ Python users can do the same with `pip install apiverve-mcp` then `apiverve-mcp` (or `apiverve-mcp --api-key YOUR_API_KEY`).
50
+
51
+ ### Manual setup
52
+
53
+ **Claude Desktop** — remote servers are added through the app, not a config file:
54
+
55
+ > Settings → Connectors → Add custom connector → `https://api.apiverve.com/v1/mcp`
56
+
57
+ **VS Code** (`mcp.json`):
50
58
  ```json
51
59
  {
52
- "inputs": [],
53
60
  "servers": {
54
- "APIVerve": {
55
- "type": "sse",
56
- "url": "https://api.apiverve.com/v1/mcp",
57
- "headers": {}
61
+ "apiverve": {
62
+ "type": "http",
63
+ "url": "https://api.apiverve.com/v1/mcp"
58
64
  }
59
65
  }
60
66
  }
61
67
  ```
62
68
 
63
- **Cursor:**
69
+ **Cursor** (`~/.cursor/mcp.json`):
64
70
  ```json
65
71
  {
66
72
  "mcpServers": {
67
73
  "apiverve": {
68
- "command": "npx",
69
- "args": ["-y", "@modelcontextprotocol/server-everything"],
70
- "env": {
71
- "MCP_BRIDGE_URL": "https://api.apiverve.com/v1/mcp"
72
- }
74
+ "url": "https://api.apiverve.com/v1/mcp"
73
75
  }
74
76
  }
75
77
  }
76
78
  ```
77
79
 
78
- Or configure directly in Cursor settings (Settings > Features > Model Context Protocol)
79
-
80
- ### NPM Package
81
-
82
- ```bash
83
- npm install -g @apiverve/mcp-server
84
- ```
85
-
86
- Then run:
87
- ```bash
88
- apiverve-mcp install
89
- ```
90
-
91
- This will automatically configure your MCP client.
80
+ ## šŸ”‘ Authentication
92
81
 
93
- ### Python Package
82
+ Two ways in — pick whichever fits:
94
83
 
95
- ```bash
96
- pip install apiverve-mcp
97
- ```
84
+ **OAuth (default, recommended)** — leave the config as shown above. On first use the server returns an authorization challenge and your client walks you through sign-in. No key is stored on disk, and access can be revoked from the dashboard.
98
85
 
99
- ```python
100
- from apiverve_mcp import configure_mcp
86
+ **API key** — add your key as a header. Useful for CI and headless environments where no browser is available:
101
87
 
102
- # Auto-configure MCP client
103
- configure_mcp()
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "apiverve": {
92
+ "url": "https://api.apiverve.com/v1/mcp",
93
+ "headers": { "x-api-key": "YOUR_API_KEY" }
94
+ }
95
+ }
96
+ }
104
97
  ```
105
98
 
106
- ## šŸ”‘ Authentication
107
-
108
- APIVerve uses OAuth 2.0 for secure authentication:
109
-
110
- 1. **Sign up** at [https://apiverve.com](https://apiverve.com)
111
- 2. **Get your API key** from the dashboard
112
- 3. **Authorize** when prompted by your MCP client
113
- 4. **Start using** 249+ APIs immediately
99
+ Claude Desktop's Custom Connectors cannot send custom headers, so it is OAuth-only.
114
100
 
115
- **Free tier available** - No credit card required to start!
101
+ Get a key at [https://apiverve.com](https://apiverve.com). **Free tier available** — no credit card required to start!
116
102
 
117
103
  ## šŸŽÆ Available APIs
118
104
 
119
105
  <details>
120
- <summary><b>Click to see all 249+ available APIs</b></summary>
106
+ <summary><b>Click to see all 356+ available APIs</b></summary>
121
107
 
122
108
  ### šŸŒ¤ļø Weather & Environment
123
109
  - Weather Forecast
@@ -185,16 +171,17 @@ Claude: [Uses Currency Converter API]
185
171
 
186
172
  ### Programmatic Usage (Python)
187
173
 
174
+ Connect straight to the remote server — no local process involved:
175
+
188
176
  ```python
189
- from mcp import ClientSession, StdioServerParameters
190
- from mcp.client.stdio import stdio_client
177
+ from mcp import ClientSession
178
+ from mcp.client.streamable_http import streamablehttp_client
179
+
180
+ url = "https://api.apiverve.com/v1/mcp"
181
+ headers = {"x-api-key": "YOUR_API_KEY"}
191
182
 
192
- async with stdio_client(StdioServerParameters(
193
- command="apiverve-mcp",
194
- args=[]
195
- )) as (read, write):
183
+ async with streamablehttp_client(url, headers=headers) as (read, write, _):
196
184
  async with ClientSession(read, write) as session:
197
- # Initialize
198
185
  await session.initialize()
199
186
 
200
187
  # List available tools
@@ -216,17 +203,17 @@ APIVerve uses a flexible token-based pricing model with multiple tiers to fit yo
216
203
 
217
204
  **[View Pricing Plans →](https://apiverve.com/pricing)**
218
205
 
219
- Token costs vary by API complexity - simple APIs start at 1 token per call.
206
+ Credit costs vary by API complexity - simple APIs start at 1 credit per call.
220
207
 
221
208
  ## šŸ› ļø Technical Details
222
209
 
223
210
  ### Server Information
224
211
 
225
- - **Type**: Server-Sent Events (SSE)
226
- - **Protocol**: MCP 2024-11-05
227
- - **Authentication**: OAuth 2.0 with PKCE
212
+ - **Transport**: Streamable HTTP
213
+ - **Protocol**: MCP 2025-06-18 (negotiates down to 2025-03-26 and 2024-11-05)
214
+ - **Authentication**: OAuth 2.0 with PKCE, or `x-api-key` header
228
215
  - **Base URL**: `https://api.apiverve.com/v1/mcp`
229
- - **API Version**: 1.0.1
216
+ - **API Version**: 1.1.0
230
217
 
231
218
  ### OAuth Endpoints
232
219
 
package/bin/install.js CHANGED
@@ -1,208 +1,149 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const os = require('os');
6
-
7
- const SERVER_CONFIG = {
8
- type: 'sse',
9
- url: 'https://api.apiverve.com/v1/mcp'
10
- };
11
-
12
- function getClaudeConfigPath() {
13
- const platform = os.platform();
14
-
15
- if (platform === 'darwin') {
16
- // macOS
17
- return path.join(os.homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
18
- } else if (platform === 'win32') {
19
- // Windows
20
- return path.join(process.env.APPDATA, 'Claude', 'claude_desktop_config.json');
21
- } else {
22
- // Linux
23
- return path.join(os.homedir(), '.config', 'Claude', 'claude_desktop_config.json');
24
- }
25
- }
26
-
27
- function getVSCodeConfigPath() {
28
- const platform = os.platform();
29
-
30
- if (platform === 'darwin') {
31
- return path.join(os.homedir(), 'Library', 'Application Support', 'Code', 'User', 'settings.json');
32
- } else if (platform === 'win32') {
33
- return path.join(process.env.APPDATA, 'Code', 'User', 'settings.json');
34
- } else {
35
- return path.join(os.homedir(), '.config', 'Code', 'User', 'settings.json');
36
- }
37
- }
38
-
39
- function getCursorConfigPath() {
40
- const platform = os.platform();
41
-
42
- if (platform === 'darwin') {
43
- return path.join(os.homedir(), 'Library', 'Application Support', 'Cursor', 'User', 'settings.json');
44
- } else if (platform === 'win32') {
45
- return path.join(process.env.APPDATA, 'Cursor', 'User', 'settings.json');
46
- } else {
47
- return path.join(os.homedir(), '.config', 'Cursor', 'User', 'settings.json');
48
- }
49
- }
50
-
51
- function ensureDirectoryExists(filePath) {
52
- const dir = path.dirname(filePath);
53
- if (!fs.existsSync(dir)) {
54
- fs.mkdirSync(dir, { recursive: true });
55
- }
56
- }
57
-
58
- function installToClaudeDesktop() {
59
- const configPath = getClaudeConfigPath();
60
-
61
- console.log('šŸ“ Claude Desktop config path:', configPath);
62
-
63
- ensureDirectoryExists(configPath);
64
-
65
- let config = {};
66
-
67
- // Read existing config
68
- if (fs.existsSync(configPath)) {
69
- try {
70
- const content = fs.readFileSync(configPath, 'utf8');
71
- config = JSON.parse(content);
72
- } catch (err) {
73
- console.warn('āš ļø Could not parse existing config, creating new one');
74
- }
75
- }
76
-
77
- // Ensure mcpServers section exists
78
- if (!config.mcpServers) {
79
- config.mcpServers = {};
80
- }
81
-
82
- // Add APIVerve server
83
- config.mcpServers.apiverve = SERVER_CONFIG;
84
-
85
- // Write config
86
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf8');
87
-
88
- console.log('āœ… APIVerve MCP server added to Claude Desktop config');
89
- return true;
90
- }
91
-
92
- function installToVSCode() {
93
- const configPath = getVSCodeConfigPath();
94
-
95
- console.log('šŸ“ VS Code config path:', configPath);
96
-
97
- ensureDirectoryExists(configPath);
98
-
99
- let config = {};
100
-
101
- // Read existing config
102
- if (fs.existsSync(configPath)) {
103
- try {
104
- const content = fs.readFileSync(configPath, 'utf8');
105
- config = JSON.parse(content);
106
- } catch (err) {
107
- console.warn('āš ļø Could not parse existing config, creating new one');
108
- }
109
- }
110
-
111
- // Ensure mcp section exists (VS Code / Cline extension)
112
- if (!config.mcp) {
113
- config.mcp = { servers: {} };
114
- }
115
- if (!config.mcp.servers) {
116
- config.mcp.servers = {};
117
- }
118
-
119
- // Add APIVerve server
120
- config.mcp.servers.APIVerve = {
121
- type: 'sse',
122
- url: SERVER_CONFIG.url,
123
- headers: {}
124
- };
125
-
126
- // Write config
127
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf8');
128
-
129
- console.log('āœ… APIVerve MCP server added to VS Code config');
130
- return true;
131
- }
132
-
133
- function installToCursor() {
134
- const configPath = getCursorConfigPath();
135
-
136
- console.log('šŸ“ Cursor config path:', configPath);
137
-
138
- ensureDirectoryExists(configPath);
139
-
140
- let config = {};
141
-
142
- // Read existing config
143
- if (fs.existsSync(configPath)) {
144
- try {
145
- const content = fs.readFileSync(configPath, 'utf8');
146
- config = JSON.parse(content);
147
- } catch (err) {
148
- console.warn('āš ļø Could not parse existing config, creating new one');
149
- }
150
- }
151
-
152
- // Ensure mcpServers section exists
153
- if (!config.mcpServers) {
154
- config.mcpServers = {};
155
- }
156
-
157
- // Add APIVerve server
158
- config.mcpServers.apiverve = SERVER_CONFIG;
159
-
160
- // Write config
161
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf8');
162
-
163
- console.log('āœ… APIVerve MCP server added to Cursor config');
164
- return true;
165
- }
166
-
167
- function main() {
168
- console.log('\nšŸ”Œ APIVerve MCP Server Installer\n');
169
-
170
- const args = process.argv.slice(2);
171
- const target = args[0] || 'all';
172
-
173
- try {
174
- if (target === 'claude' || target === 'all') {
175
- installToClaudeDesktop();
176
- }
177
-
178
- if (target === 'vscode' || target === 'all') {
179
- installToVSCode();
180
- }
181
-
182
- if (target === 'cursor' || target === 'all') {
183
- installToCursor();
184
- }
185
-
186
- console.log('\n✨ Installation complete!');
187
- console.log('\nšŸ“– Next steps:');
188
- console.log(' 1. Restart your MCP client (Claude Desktop, VS Code, or Cursor)');
189
- console.log(' 2. Sign up at https://apiverve.com');
190
- console.log(' 3. Authorize when prompted');
191
- console.log(' 4. Start using 249+ APIs!\n');
192
- } catch (error) {
193
- console.error('\nāŒ Installation failed:', error.message);
194
- console.error('\nšŸ’” Manual installation:');
195
- console.error(' Add this to your MCP client config:\n');
196
- console.error(' {');
197
- console.error(' "mcpServers": {');
198
- console.error(' "apiverve": {');
199
- console.error(' "type": "sse",');
200
- console.error(' "url": "https://api.apiverve.com/v1/mcp"');
201
- console.error(' }');
202
- console.error(' }');
203
- console.error(' }\n');
204
- process.exit(1);
205
- }
206
- }
207
-
208
- main();
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ const SERVER_URL = 'https://api.apiverve.com/v1/mcp';
8
+ const TARGETS = ['claude', 'vscode', 'cursor', 'all'];
9
+
10
+ // Auth is negotiated, not configured: with no headers the server answers 401 with a
11
+ // WWW-Authenticate challenge and the client runs OAuth. --api-key skips that for
12
+ // headless setups by sending the key directly instead.
13
+ function parseArgs(argv) {
14
+ const args = { target: 'all', apiKey: null };
15
+ for (let i = 0; i < argv.length; i++) {
16
+ if (argv[i] === '--api-key') {
17
+ args.apiKey = argv[++i] || null;
18
+ } else if (argv[i].startsWith('--api-key=')) {
19
+ args.apiKey = argv[i].slice('--api-key='.length);
20
+ } else if (!argv[i].startsWith('-')) {
21
+ args.target = argv[i];
22
+ }
23
+ }
24
+ return args;
25
+ }
26
+
27
+ function userConfigDir(appName) {
28
+ const platform = os.platform();
29
+ if (platform === 'darwin') return path.join(os.homedir(), 'Library', 'Application Support', appName);
30
+ if (platform === 'win32') return path.join(process.env.APPDATA, appName);
31
+ return path.join(os.homedir(), '.config', appName);
32
+ }
33
+
34
+ // VS Code moved MCP config out of settings.json into its own mcp.json.
35
+ function getVSCodeConfigPath() {
36
+ return path.join(userConfigDir('Code'), 'User', 'mcp.json');
37
+ }
38
+
39
+ // Cursor reads ~/.cursor/mcp.json, not the app support dir.
40
+ function getCursorConfigPath() {
41
+ return path.join(os.homedir(), '.cursor', 'mcp.json');
42
+ }
43
+
44
+ function readJson(filePath) {
45
+ if (!fs.existsSync(filePath)) return {};
46
+ try {
47
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
48
+ } catch (err) {
49
+ throw new Error(`${filePath} exists but is not valid JSON. Fix or remove it, then re-run.`);
50
+ }
51
+ }
52
+
53
+ function writeJson(filePath, data) {
54
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
55
+ fs.writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf8');
56
+ }
57
+
58
+ function authHeaders(apiKey) {
59
+ return apiKey ? { headers: { 'x-api-key': apiKey } } : {};
60
+ }
61
+
62
+ // Remote servers cannot be added through claude_desktop_config.json — that file is
63
+ // stdio-only. Custom Connectors is the supported path and it is UI-driven, so the most
64
+ // honest thing the installer can do is say so rather than write config Claude ignores.
65
+ function installToClaudeDesktop() {
66
+ console.log('ā—‹ Claude Desktop — manual step required');
67
+ console.log(' Claude Desktop only accepts remote MCP servers through Custom Connectors,');
68
+ console.log(' which cannot be configured from a file. Add it in the app:');
69
+ console.log('');
70
+ console.log(' Settings → Connectors → Add custom connector');
71
+ console.log(` URL: ${SERVER_URL}`);
72
+ console.log('');
73
+ console.log(' Claude will prompt you to sign in on first use.');
74
+ console.log('');
75
+ return true;
76
+ }
77
+
78
+ function installToVSCode(apiKey) {
79
+ const configPath = getVSCodeConfigPath();
80
+ const config = readJson(configPath);
81
+
82
+ if (!config.servers) config.servers = {};
83
+ config.servers.apiverve = { type: 'http', url: SERVER_URL, ...authHeaders(apiKey) };
84
+
85
+ writeJson(configPath, config);
86
+ console.log(`āœ… VS Code configured — ${configPath}`);
87
+ return true;
88
+ }
89
+
90
+ function installToCursor(apiKey) {
91
+ const configPath = getCursorConfigPath();
92
+ const config = readJson(configPath);
93
+
94
+ // Cursor infers the transport from the presence of url; type is for stdio servers only.
95
+ if (!config.mcpServers) config.mcpServers = {};
96
+ config.mcpServers.apiverve = { url: SERVER_URL, ...authHeaders(apiKey) };
97
+
98
+ writeJson(configPath, config);
99
+ console.log(`āœ… Cursor configured — ${configPath}`);
100
+ return true;
101
+ }
102
+
103
+ function printManualConfig() {
104
+ console.error('\nšŸ’” Configure manually instead:');
105
+ console.error('');
106
+ console.error(' VS Code — mcp.json');
107
+ console.error(` { "servers": { "apiverve": { "type": "http", "url": "${SERVER_URL}" } } }`);
108
+ console.error('');
109
+ console.error(' Cursor — ~/.cursor/mcp.json');
110
+ console.error(` { "mcpServers": { "apiverve": { "url": "${SERVER_URL}" } } }`);
111
+ console.error('');
112
+ console.error(' Claude Desktop — Settings → Connectors → Add custom connector');
113
+ console.error(` ${SERVER_URL}`);
114
+ console.error('');
115
+ }
116
+
117
+ function main() {
118
+ console.log('\nšŸ”Œ APIVerve MCP Server Installer\n');
119
+
120
+ const { target, apiKey } = parseArgs(process.argv.slice(2));
121
+
122
+ // An unrecognised target used to match no branch and exit 0 having done nothing.
123
+ if (!TARGETS.includes(target)) {
124
+ console.error(`Unknown target "${target}".`);
125
+ console.error(`Usage: apiverve-mcp [${TARGETS.join('|')}] [--api-key KEY]\n`);
126
+ process.exit(1);
127
+ }
128
+
129
+ if (apiKey) {
130
+ console.log('Using API key auth — the key will be written into the config file.\n');
131
+ } else {
132
+ console.log('Using OAuth — no key is stored; your client will prompt you to sign in.\n');
133
+ }
134
+
135
+ try {
136
+ if (target === 'claude' || target === 'all') installToClaudeDesktop();
137
+ if (target === 'vscode' || target === 'all') installToVSCode(apiKey);
138
+ if (target === 'cursor' || target === 'all') installToCursor(apiKey);
139
+
140
+ console.log('\n✨ Done. Restart your MCP client to pick up the change.');
141
+ console.log(' Manage access and API keys at https://apiverve.com\n');
142
+ } catch (error) {
143
+ console.error('\nāŒ Installation failed:', error.message);
144
+ printManualConfig();
145
+ process.exit(1);
146
+ }
147
+ }
148
+
149
+ main();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apiverve/mcp-server",
3
- "version": "1.0.1",
4
- "description": "APIVerve MCP Server - Access 249+ APIs through the Model Context Protocol",
3
+ "version": "1.1.0",
4
+ "description": "APIVerve MCP Server - Access 356+ APIs through the Model Context Protocol",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "apiverve-mcp": "./bin/install.js"
@@ -29,8 +29,13 @@
29
29
  },
30
30
  "mcpServers": {
31
31
  "apiverve": {
32
- "type": "sse",
33
- "url": "https://api.apiverve.com/v1/mcp"
32
+ "command": "node",
33
+ "args": [
34
+ "./index.js"
35
+ ],
36
+ "env": {
37
+ "APIVERVE_API_KEY": ""
38
+ }
34
39
  }
35
40
  }
36
41
  }