@netpad/mcp-server-remote 1.0.1 → 1.4.2
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 +79 -17
- package/api/.well-known/oauth-authorization-server.ts +71 -0
- package/api/authorize.ts +538 -0
- package/api/index.ts +46 -3
- package/api/lib/oauth.ts +411 -0
- package/api/mcp.ts +129 -579
- package/api/oauth-metadata.ts +71 -0
- package/api/oauth-protected-resource.ts +40 -0
- package/api/token.ts +213 -0
- package/netpad-mcp-server-remote-1.2.0.tgz +0 -0
- package/netpad-mcp-server-remote-1.3.0.tgz +0 -0
- package/netpad-mcp-server-remote-1.4.1.tgz +0 -0
- package/netpad-mcp-server-remote-1.4.2.tgz +0 -0
- package/package.json +4 -3
- package/vercel.json +20 -0
package/README.md
CHANGED
|
@@ -6,7 +6,10 @@ Remote MCP server for NetPad, deployable to Vercel for use with Claude Custom Co
|
|
|
6
6
|
|
|
7
7
|
This package provides a remote HTTP-based MCP server that can be used as a **Claude Custom Connector**. Unlike the stdio-based `@netpad/mcp-server` (for Claude Desktop), this server runs as a web service that Claude can connect to over the internet.
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**Features:**
|
|
10
|
+
- **All 80+ tools** from `@netpad/mcp-server` - forms, workflows, extensions, templates, data browser, and more
|
|
11
|
+
- **API key authentication** using your existing NetPad API keys (`np_live_xxx` or `np_test_xxx`)
|
|
12
|
+
- **Ready to deploy** to Vercel
|
|
10
13
|
|
|
11
14
|
## Quick Start
|
|
12
15
|
|
|
@@ -96,22 +99,69 @@ Manage your API keys at [netpad.io/settings](https://netpad.io/settings):
|
|
|
96
99
|
- **Monitor** usage statistics
|
|
97
100
|
- **Set expiration** dates for temporary access
|
|
98
101
|
|
|
99
|
-
## Available Tools
|
|
100
|
-
|
|
101
|
-
The remote server includes
|
|
102
|
-
|
|
103
|
-
### Form Building
|
|
104
|
-
- `generate_form` - Generate form configurations
|
|
105
|
-
- `
|
|
106
|
-
- `
|
|
107
|
-
- `
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- `
|
|
102
|
+
## Available Tools (80+)
|
|
103
|
+
|
|
104
|
+
The remote server includes **all tools from `@netpad/mcp-server`**:
|
|
105
|
+
|
|
106
|
+
### 1. Form Building (6 tools)
|
|
107
|
+
- `generate_form` - Generate complete form configurations
|
|
108
|
+
- `generate_field` - Create individual field configurations
|
|
109
|
+
- `generate_conditional_logic` - Create show/hide logic
|
|
110
|
+
- `generate_computed_field` - Create formula-based fields
|
|
111
|
+
- `generate_multipage_config` - Multi-page wizard configurations
|
|
112
|
+
- `validate_form_config` - Validate form configurations
|
|
113
|
+
|
|
114
|
+
### 2. Application Management (7 tools)
|
|
115
|
+
- `create_application` - Generate code to create applications
|
|
116
|
+
- `generate_application_contract` - Define API contracts
|
|
117
|
+
- `generate_application_release` - Create versioned releases
|
|
118
|
+
- And more...
|
|
119
|
+
|
|
120
|
+
### 3. Marketplace & npm (8 tools)
|
|
121
|
+
- `publish_to_marketplace` - Publish applications
|
|
122
|
+
- `search_marketplace` - Search for applications
|
|
123
|
+
- `install_from_npm` - Install from npm registry
|
|
124
|
+
- And more...
|
|
125
|
+
|
|
126
|
+
### 4. Workflow Automation (10 tools)
|
|
127
|
+
- `create_workflow` - Generate workflow configurations
|
|
128
|
+
- `add_workflow_node` - Add nodes to workflows
|
|
129
|
+
- `connect_workflow_nodes` - Connect nodes with edges
|
|
130
|
+
- `list_workflow_node_types` - Browse 25+ node types
|
|
131
|
+
- And more...
|
|
132
|
+
|
|
133
|
+
### 5. Conversational & Search Forms (11 tools)
|
|
134
|
+
- `create_conversational_form` - AI-powered conversational forms
|
|
135
|
+
- `configure_rag_settings` - Enable RAG with document retrieval
|
|
136
|
+
- `create_search_form` - Build MongoDB search interfaces
|
|
137
|
+
- And more...
|
|
138
|
+
|
|
139
|
+
### 6. Enhanced Templates (5 tools)
|
|
140
|
+
- `list_form_templates` - Browse 25+ form templates
|
|
141
|
+
- `get_form_template` - Get template details
|
|
142
|
+
- `create_form_from_template` - Create with customizations
|
|
143
|
+
- And more...
|
|
144
|
+
|
|
145
|
+
### 7. Data Browser (12 tools)
|
|
146
|
+
- `generate_connection_config` - Configure MongoDB connections
|
|
147
|
+
- `generate_data_browser_query` - Generate find/aggregate queries
|
|
148
|
+
- `generate_aggregation_pipeline` - Build aggregation pipelines
|
|
149
|
+
- `generate_index_recommendations` - Get index suggestions
|
|
150
|
+
- And more...
|
|
151
|
+
|
|
152
|
+
### 8. Extension Development (5 tools) - NEW
|
|
153
|
+
- `generate_extension` - Generate complete extension packages
|
|
154
|
+
- `list_node_categories` - List workflow node categories
|
|
155
|
+
- `list_config_field_types` - List configuration field types
|
|
156
|
+
- `list_workflow_icons` - List commonly used icons
|
|
157
|
+
- `list_workflow_colors` - List suggested colors
|
|
158
|
+
|
|
159
|
+
### 9. Consolidated Reference Tools
|
|
160
|
+
- `get_reference` - Unified access to all reference documentation
|
|
161
|
+
- `browse_templates` - Browse all 40+ templates with filtering
|
|
162
|
+
|
|
163
|
+
### 10. Legacy Reference & Helper (16 tools)
|
|
164
|
+
- Documentation, best practices, debugging tools
|
|
115
165
|
|
|
116
166
|
## Local Development
|
|
117
167
|
|
|
@@ -164,6 +214,10 @@ This server uses the MCP SDK's `StreamableHTTPServerTransport` which implements
|
|
|
164
214
|
- Session management via `Mcp-Session-Id` header
|
|
165
215
|
- Bearer token authentication via NetPad API
|
|
166
216
|
|
|
217
|
+
### Code Sharing
|
|
218
|
+
|
|
219
|
+
The remote server imports `createNetPadMcpServer()` from `@netpad/mcp-server`, ensuring both servers have identical tool capabilities. Any updates to the main MCP server automatically apply to the remote server.
|
|
220
|
+
|
|
167
221
|
### Authentication Flow
|
|
168
222
|
|
|
169
223
|
```
|
|
@@ -204,6 +258,14 @@ This server uses the MCP SDK's `StreamableHTTPServerTransport` which implements
|
|
|
204
258
|
|
|
205
259
|
- [@netpad/mcp-server](../mcp-server) - Local stdio MCP server for Claude Desktop (no auth required)
|
|
206
260
|
- [NetPad Platform](https://netpad.io) - Full form builder platform
|
|
261
|
+
- [Documentation](https://docs.netpad.io/docs/developer/mcp-server) - MCP server documentation
|
|
262
|
+
|
|
263
|
+
## Version History
|
|
264
|
+
|
|
265
|
+
| Version | Changes |
|
|
266
|
+
|---------|---------|
|
|
267
|
+
| **1.1.0** | Full parity with @netpad/mcp-server (80+ tools), imports shared server factory |
|
|
268
|
+
| **1.0.1** | Initial release with subset of tools |
|
|
207
269
|
|
|
208
270
|
## License
|
|
209
271
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth 2.0 Authorization Server Metadata
|
|
3
|
+
*
|
|
4
|
+
* GET /.well-known/oauth-authorization-server
|
|
5
|
+
*
|
|
6
|
+
* This endpoint returns metadata about the OAuth server according to RFC 8414.
|
|
7
|
+
* Claude.ai and other OAuth clients can use this to discover endpoints.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { VercelRequest, VercelResponse } from '@vercel/node';
|
|
11
|
+
import { OAUTH_CONFIG } from '../lib/oauth.js';
|
|
12
|
+
|
|
13
|
+
export default function handler(req: VercelRequest, res: VercelResponse) {
|
|
14
|
+
if (req.method !== 'GET') {
|
|
15
|
+
res.status(405).json({ error: 'Method not allowed' });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const issuer = OAUTH_CONFIG.issuer;
|
|
20
|
+
|
|
21
|
+
// OAuth 2.0 Authorization Server Metadata (RFC 8414)
|
|
22
|
+
const metadata = {
|
|
23
|
+
// REQUIRED: Issuer identifier
|
|
24
|
+
issuer: issuer,
|
|
25
|
+
|
|
26
|
+
// REQUIRED: Authorization endpoint
|
|
27
|
+
authorization_endpoint: `${issuer}/authorize`,
|
|
28
|
+
|
|
29
|
+
// REQUIRED: Token endpoint
|
|
30
|
+
token_endpoint: `${issuer}/token`,
|
|
31
|
+
|
|
32
|
+
// OPTIONAL: Registration endpoint (not implemented)
|
|
33
|
+
// registration_endpoint: `${issuer}/register`,
|
|
34
|
+
|
|
35
|
+
// OPTIONAL: Scopes supported
|
|
36
|
+
scopes_supported: Object.keys(OAUTH_CONFIG.scopes),
|
|
37
|
+
|
|
38
|
+
// REQUIRED: Response types supported
|
|
39
|
+
response_types_supported: ['code'],
|
|
40
|
+
|
|
41
|
+
// OPTIONAL: Response modes supported
|
|
42
|
+
response_modes_supported: ['query'],
|
|
43
|
+
|
|
44
|
+
// OPTIONAL: Grant types supported
|
|
45
|
+
grant_types_supported: ['authorization_code', 'refresh_token'],
|
|
46
|
+
|
|
47
|
+
// OPTIONAL: Token endpoint authentication methods
|
|
48
|
+
token_endpoint_auth_methods_supported: ['none'],
|
|
49
|
+
|
|
50
|
+
// OPTIONAL: PKCE code challenge methods (RFC 7636)
|
|
51
|
+
code_challenge_methods_supported: ['S256', 'plain'],
|
|
52
|
+
|
|
53
|
+
// OPTIONAL: Service documentation
|
|
54
|
+
service_documentation: 'https://docs.netpad.io/docs/developer/mcp-server',
|
|
55
|
+
|
|
56
|
+
// OPTIONAL: MCP-specific metadata
|
|
57
|
+
mcp_endpoint: `${issuer}/mcp`,
|
|
58
|
+
|
|
59
|
+
// Custom: NetPad-specific info
|
|
60
|
+
netpad: {
|
|
61
|
+
name: 'NetPad MCP Server',
|
|
62
|
+
version: '1.2.0',
|
|
63
|
+
tools_count: '80+',
|
|
64
|
+
api_key_url: 'https://netpad.io/settings',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
res.setHeader('Content-Type', 'application/json');
|
|
69
|
+
res.setHeader('Cache-Control', 'public, max-age=3600'); // Cache for 1 hour
|
|
70
|
+
res.status(200).json(metadata);
|
|
71
|
+
}
|