@williamp29/project-mcp-server 1.0.3 → 1.0.4

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.
@@ -1,3 +1,4 @@
1
+ import { AuthContext } from "./api-explorer/auth/index.js";
1
2
  /**
2
3
  * The main MCP Server implementation that coordinates the OpenAPI parser,
3
4
  * tool generation, and API execution.
@@ -14,7 +15,11 @@ export declare class MCPServer {
14
15
  private toolGenerator;
15
16
  private apiExecutor;
16
17
  private authContext;
17
- constructor(specPath: string);
18
+ /**
19
+ * @param specPath - Path to the OpenAPI specification file.
20
+ * @param authContext - Optional custom AuthContext. If not provided, creates one from environment variables.
21
+ */
22
+ constructor(specPath: string, authContext?: AuthContext);
18
23
  private initParser;
19
24
  private registerTools;
20
25
  /**
@@ -21,11 +21,15 @@ export class MCPServer {
21
21
  toolGenerator;
22
22
  apiExecutor;
23
23
  authContext;
24
- constructor(specPath) {
24
+ /**
25
+ * @param specPath - Path to the OpenAPI specification file.
26
+ * @param authContext - Optional custom AuthContext. If not provided, creates one from environment variables.
27
+ */
28
+ constructor(specPath, authContext) {
25
29
  this.specPath = specPath;
26
30
  this.parser = new OpenAPIParser();
27
31
  this.toolGenerator = new ToolGenerator(this.parser);
28
- this.authContext = createAuthContextFromEnv();
32
+ this.authContext = authContext || createAuthContextFromEnv();
29
33
  this.apiExecutor = new ApiExecutor(undefined, this.authContext);
30
34
  this.server = new McpServer({
31
35
  name: "project-mcp-server",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamp29/project-mcp-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "A ModelContextProtocol server to let agents discover your project, such as APIs (using OpenAPI) or other resources.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",