Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Agents file for lambda-mcp-adaptor

## Project structure
- `src/`: Source files for the MCP server SDK (ESM entrypoints and types).
- `tests/`: Mocha test suite (`*.test.mjs`).
- `example/`: Sample usage code.
- `dist/`: Build outputs (ESM, CJS, and type declarations).
- Root config: `package.json`, `eslint.config.mjs`, `.prettierrc`.

## Build
- `npm run build` (runs ESM, CJS, and types outputs).
- Individual steps: `npm run build:esm`, `npm run build:cjs`, `npm run build:types`.

## Test
- `npm test` (Mocha runs `tests/**/*.test.mjs`).

## lint and format
Lint and format are currently in package.json but do not function properly. That will
be remedied in the future.
40 changes: 40 additions & 0 deletions dist/cors-config-C27FWWLN.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//#region src/cors-config.ts
/**
* CORS Configuration
*
* Centralized CORS headers configuration for consistent handling across all modules
*/
/**
* Standard CORS headers for MCP server responses
* Includes all necessary headers for MCP protocol and authentication
*/
const CORS_HEADERS = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "Content-Type, Accept, Authorization, Mcp-Protocol-Version, Mcp-Session-Id",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS"
};
/**
* Basic CORS headers for simple responses
*/
const BASIC_CORS_HEADERS = { "Access-Control-Allow-Origin": "*" };
/**
* Create response headers with CORS
*/
function withCORS(additionalHeaders = {}) {
return {
...CORS_HEADERS,
...additionalHeaders
};
}
/**
* Create basic response headers with CORS
*/
function withBasicCORS(additionalHeaders = {}) {
return {
...BASIC_CORS_HEADERS,
...additionalHeaders
};
}

//#endregion
export { withBasicCORS as n, withCORS as r, CORS_HEADERS as t };
58 changes: 58 additions & 0 deletions dist/cors-config-HN36M-Ox.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

//#region src/cors-config.ts
/**
* CORS Configuration
*
* Centralized CORS headers configuration for consistent handling across all modules
*/
/**
* Standard CORS headers for MCP server responses
* Includes all necessary headers for MCP protocol and authentication
*/
const CORS_HEADERS = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "Content-Type, Accept, Authorization, Mcp-Protocol-Version, Mcp-Session-Id",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS"
};
/**
* Basic CORS headers for simple responses
*/
const BASIC_CORS_HEADERS = { "Access-Control-Allow-Origin": "*" };
/**
* Create response headers with CORS
*/
function withCORS(additionalHeaders = {}) {
return {
...CORS_HEADERS,
...additionalHeaders
};
}
/**
* Create basic response headers with CORS
*/
function withBasicCORS(additionalHeaders = {}) {
return {
...BASIC_CORS_HEADERS,
...additionalHeaders
};
}

//#endregion
Object.defineProperty(exports, 'CORS_HEADERS', {
enumerable: true,
get: function () {
return CORS_HEADERS;
}
});
Object.defineProperty(exports, 'withBasicCORS', {
enumerable: true,
get: function () {
return withBasicCORS;
}
});
Object.defineProperty(exports, 'withCORS', {
enumerable: true,
get: function () {
return withCORS;
}
});
Loading