@mcp-consultant-tools/rest-api 27.0.0 → 28.0.0-beta.10

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 (69) hide show
  1. package/build/cli/commands/index.d.ts +8 -0
  2. package/build/cli/commands/index.d.ts.map +1 -0
  3. package/build/cli/commands/index.js +9 -0
  4. package/build/cli/commands/index.js.map +1 -0
  5. package/build/cli/commands/rest-commands.d.ts +7 -0
  6. package/build/cli/commands/rest-commands.d.ts.map +1 -0
  7. package/build/cli/commands/rest-commands.js +212 -0
  8. package/build/cli/commands/rest-commands.js.map +1 -0
  9. package/build/cli/output.d.ts +11 -0
  10. package/build/cli/output.d.ts.map +1 -0
  11. package/build/cli/output.js +10 -0
  12. package/build/cli/output.js.map +1 -0
  13. package/build/cli.d.ts +9 -0
  14. package/build/cli.d.ts.map +1 -0
  15. package/build/cli.js +27 -0
  16. package/build/cli.js.map +1 -0
  17. package/build/context-factory.d.ts +10 -0
  18. package/build/context-factory.d.ts.map +1 -0
  19. package/build/context-factory.js +108 -0
  20. package/build/context-factory.js.map +1 -0
  21. package/build/index.d.ts +6 -18
  22. package/build/index.d.ts.map +1 -1
  23. package/build/index.js +21 -376
  24. package/build/index.js.map +1 -1
  25. package/build/models/api-types.d.ts +133 -0
  26. package/build/models/api-types.d.ts.map +1 -0
  27. package/build/models/api-types.js +5 -0
  28. package/build/models/api-types.js.map +1 -0
  29. package/build/models/index.d.ts +5 -0
  30. package/build/models/index.d.ts.map +1 -0
  31. package/build/models/index.js +2 -0
  32. package/build/models/index.js.map +1 -0
  33. package/build/prompts/index.d.ts +2 -0
  34. package/build/prompts/index.d.ts.map +1 -0
  35. package/build/prompts/index.js +24 -0
  36. package/build/prompts/index.js.map +1 -0
  37. package/build/prompts/templates.d.ts +6 -0
  38. package/build/prompts/templates.d.ts.map +1 -0
  39. package/build/prompts/templates.js +169 -0
  40. package/build/prompts/templates.js.map +1 -0
  41. package/build/services/index.d.ts +5 -0
  42. package/build/services/index.d.ts.map +1 -0
  43. package/build/services/index.js +5 -0
  44. package/build/services/index.js.map +1 -0
  45. package/build/services/openapi-parser.d.ts +69 -0
  46. package/build/services/openapi-parser.d.ts.map +1 -0
  47. package/build/services/openapi-parser.js +151 -0
  48. package/build/services/openapi-parser.js.map +1 -0
  49. package/build/services/rest-api-service.d.ts +90 -0
  50. package/build/services/rest-api-service.d.ts.map +1 -0
  51. package/build/services/rest-api-service.js +403 -0
  52. package/build/services/rest-api-service.js.map +1 -0
  53. package/build/tool-examples.d.ts +38 -0
  54. package/build/tool-examples.d.ts.map +1 -0
  55. package/build/tool-examples.js +69 -0
  56. package/build/tool-examples.js.map +1 -0
  57. package/build/tools/index.d.ts +7 -0
  58. package/build/tools/index.d.ts.map +1 -0
  59. package/build/tools/index.js +6 -0
  60. package/build/tools/index.js.map +1 -0
  61. package/build/tools/rest-tools.d.ts +3 -0
  62. package/build/tools/rest-tools.d.ts.map +1 -0
  63. package/build/tools/rest-tools.js +166 -0
  64. package/build/tools/rest-tools.js.map +1 -0
  65. package/build/types.d.ts +9 -0
  66. package/build/types.d.ts.map +1 -0
  67. package/build/types.js +2 -0
  68. package/build/types.js.map +1 -0
  69. package/package.json +5 -3
@@ -0,0 +1,166 @@
1
+ /**
2
+ * REST API tool registrations
3
+ */
4
+ import { z } from "zod";
5
+ import { createErrorResponse, createSuccessResponse, } from "@mcp-consultant-tools/core";
6
+ import { descWithExamples, ENDPOINT_EXAMPLES, METHOD_EXAMPLES, HOST_OVERRIDE_EXAMPLES, ENDPOINT_FILTER_EXAMPLES, ENTITY_EXAMPLES, } from "../tool-examples.js";
7
+ export function registerRestTools(server, ctx) {
8
+ // Tool: rest-request
9
+ server.tool("rest-request", `Test a REST API endpoint with automatic authentication. Supports GET, POST, PUT, DELETE, PATCH methods. Authentication is handled automatically based on server configuration (OAuth2 client credentials, bearer token, basic auth, or API key). Returns detailed request/response information including timing, headers, and body.`, {
10
+ method: z
11
+ .enum(["GET", "POST", "PUT", "DELETE", "PATCH"])
12
+ .describe(descWithExamples("HTTP method to use", METHOD_EXAMPLES)),
13
+ endpoint: z
14
+ .string()
15
+ .describe(descWithExamples('Endpoint path. Do not include the full URL - only the path.', ENDPOINT_EXAMPLES)),
16
+ body: z
17
+ .any()
18
+ .optional()
19
+ .describe("Request body for POST/PUT/PATCH requests (object or string)"),
20
+ headers: z
21
+ .record(z.string())
22
+ .optional()
23
+ .describe("Additional headers for this request. Do not use for auth - configure auth via environment variables."),
24
+ host: z
25
+ .string()
26
+ .optional()
27
+ .describe(descWithExamples("Override base URL for this request only", HOST_OVERRIDE_EXAMPLES)),
28
+ }, async ({ method, endpoint, body, headers, host, }) => {
29
+ try {
30
+ // Validate endpoint doesn't contain full URL
31
+ const urlPattern = /^(https?:\/\/|www\.)/i;
32
+ if (urlPattern.test(endpoint)) {
33
+ return createErrorResponse(new Error(`Invalid endpoint format. Do not include full URLs. Use just the path (e.g., "/api/users") and optionally specify 'host' to override the base URL.`), "rest-request");
34
+ }
35
+ const options = {
36
+ method,
37
+ endpoint,
38
+ body,
39
+ headers,
40
+ host,
41
+ };
42
+ const result = await ctx.restApi.request(options);
43
+ return createSuccessResponse(result);
44
+ }
45
+ catch (error) {
46
+ return createErrorResponse(error, "rest-request");
47
+ }
48
+ });
49
+ // Tool: rest-config
50
+ server.tool("rest-config", "Get the current REST API service configuration summary, including base URL, authentication method, SSL settings, and custom headers count.", {}, async () => {
51
+ try {
52
+ const summary = ctx.restApi.getConfigSummary();
53
+ return createSuccessResponse(summary);
54
+ }
55
+ catch (error) {
56
+ return createErrorResponse(error, "rest-config");
57
+ }
58
+ });
59
+ // Tool: rest-refresh-token
60
+ server.tool("rest-refresh-token", "Force refresh the OAuth2 access token. Clears the token cache and acquires a new token on the next request. Only relevant when using OAuth2 authentication.", {}, async () => {
61
+ try {
62
+ const authMethod = ctx.restApi.getAuthMethod();
63
+ if (authMethod !== "oauth2") {
64
+ return createErrorResponse(new Error(`Token refresh only available for OAuth2 authentication. Current auth method: ${authMethod}`), "rest-refresh-token");
65
+ }
66
+ ctx.restApi.clearTokenCache();
67
+ return createSuccessResponse({
68
+ message: "OAuth2 token cache cleared. A new token will be acquired on the next request.",
69
+ });
70
+ }
71
+ catch (error) {
72
+ return createErrorResponse(error, "rest-refresh-token");
73
+ }
74
+ });
75
+ // Tool: rest-batch-request
76
+ server.tool("rest-batch-request", "Execute multiple REST API requests sequentially. Useful for testing a series of related endpoints or performing a workflow. Returns results for all requests.", {
77
+ requests: z.array(z.object({
78
+ method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]),
79
+ endpoint: z.string(),
80
+ body: z.any().optional(),
81
+ headers: z.record(z.string()).optional(),
82
+ host: z.string().optional(),
83
+ })).describe("Array of request configurations to execute sequentially"),
84
+ stopOnError: z
85
+ .boolean()
86
+ .optional()
87
+ .describe("Stop executing remaining requests if one fails (default: false)"),
88
+ }, async ({ requests, stopOnError = false, }) => {
89
+ try {
90
+ const results = [];
91
+ for (let i = 0; i < requests.length; i++) {
92
+ const req = requests[i];
93
+ try {
94
+ const result = await ctx.restApi.request(req);
95
+ results.push({
96
+ index: i,
97
+ endpoint: req.endpoint,
98
+ success: !result.validation.isError,
99
+ result,
100
+ });
101
+ if (stopOnError && result.validation.isError) {
102
+ break;
103
+ }
104
+ }
105
+ catch (error) {
106
+ const errorMessage = error instanceof Error ? error.message : String(error);
107
+ results.push({
108
+ index: i,
109
+ endpoint: req.endpoint,
110
+ success: false,
111
+ error: errorMessage,
112
+ });
113
+ if (stopOnError) {
114
+ break;
115
+ }
116
+ }
117
+ }
118
+ return createSuccessResponse({
119
+ totalRequests: requests.length,
120
+ executedRequests: results.length,
121
+ successfulRequests: results.filter((r) => r.success).length,
122
+ results,
123
+ });
124
+ }
125
+ catch (error) {
126
+ return createErrorResponse(error, "rest-batch-request");
127
+ }
128
+ });
129
+ // Tool: rest-list-endpoints
130
+ server.tool("rest-list-endpoints", "List all available REST API endpoints with their supported HTTP methods. Use this to discover what entities/resources are available in the API. Requires REST_OPENAPI_URL configuration pointing to your API's OpenAPI/Swagger spec.", {
131
+ filter: z
132
+ .string()
133
+ .optional()
134
+ .describe(descWithExamples("Optional filter to match endpoint paths (case-insensitive contains match)", ENDPOINT_FILTER_EXAMPLES)),
135
+ }, async ({ filter }) => {
136
+ try {
137
+ const result = await ctx.restApi.listEndpointsAsync(filter);
138
+ return createSuccessResponse(result);
139
+ }
140
+ catch (error) {
141
+ return createErrorResponse(error, "rest-list-endpoints");
142
+ }
143
+ });
144
+ // Tool: rest-get-schema
145
+ server.tool("rest-get-schema", "Get the schema/field definitions for a specific entity. Returns field names, types, whether they're required, and any validation rules. Use this before creating or updating records to understand the data structure. Requires REST_OPENAPI_URL configuration pointing to your API's OpenAPI/Swagger spec.", {
146
+ entity: z
147
+ .string()
148
+ .describe(descWithExamples("Entity name (singular or plural)", ENTITY_EXAMPLES)),
149
+ }, async ({ entity }) => {
150
+ try {
151
+ if (!ctx.restApi.hasOpenApiConfig()) {
152
+ return createErrorResponse(new Error("No schema configuration available. Configure REST_OPENAPI_URL pointing to your API's OpenAPI/Swagger spec."), "rest-get-schema");
153
+ }
154
+ const schema = await ctx.restApi.getSchemaAsync(entity);
155
+ if (!schema) {
156
+ return createErrorResponse(new Error(`Entity '${entity}' not found. Use rest-list-endpoints to see available entities.`), "rest-get-schema");
157
+ }
158
+ return createSuccessResponse(schema);
159
+ }
160
+ catch (error) {
161
+ return createErrorResponse(error, "rest-get-schema");
162
+ }
163
+ });
164
+ console.error("rest-api tools registered: 6 tools");
165
+ }
166
+ //# sourceMappingURL=rest-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rest-tools.js","sourceRoot":"","sources":["../../src/tools/rest-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL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AC,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAC5D,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC,CACF,CAAC;IAEF,wBAAwB;IACxB,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,6SAA6S,EAC7S;QACE,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,CACP,gBAAgB,CAAC,kCAAkC,EAAE,eAAe,CAAC,CACtE;KACJ,EACD,KAAK,EAAE,EAAE,MAAM,EAAsB,EAAE,EAAE;QACvC,IAAI,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;gBACpC,OAAO,mBAAmB,CACxB,IAAI,KAAK,CACP,4GAA4G,CAC7G,EACD,iBAAiB,CAClB,CAAC;YACJ,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAExD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO,mBAAmB,CACxB,IAAI,KAAK,CACP,WAAW,MAAM,iEAAiE,CACnF,EACD,iBAAiB,CAClB,CAAC;YACJ,CAAC;YAED,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;QACvD,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Service context shared between MCP server entry points.
3
+ * Uses lazy getters to initialize services on-demand.
4
+ */
5
+ import type { RestApiService } from './services/rest-api-service.js';
6
+ export interface ServiceContext {
7
+ readonly restApi: RestApiService;
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC"}
package/build/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-consultant-tools/rest-api",
3
- "version": "27.0.0",
3
+ "version": "28.0.0-beta.10",
4
4
  "description": "MCP server for REST API testing with OAuth2 client credentials support - test HTTP endpoints with automatic JWT token generation",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -45,8 +45,9 @@
45
45
  "node": ">=18.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@mcp-consultant-tools/core": "27.0.0-beta.1",
48
+ "@mcp-consultant-tools/core": "28.0.0-beta.10",
49
49
  "@modelcontextprotocol/sdk": "^1.0.4",
50
+ "commander": "^14.0.3",
50
51
  "zod": "^3.24.1"
51
52
  },
52
53
  "devDependencies": {
@@ -54,6 +55,7 @@
54
55
  "typescript": "^5.8.2"
55
56
  },
56
57
  "bin": {
57
- "mcp-rest-api": "build/index.js"
58
+ "mcp-rest-api": "build/index.js",
59
+ "mcp-rest-api-cli": "build/cli.js"
58
60
  }
59
61
  }