Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
91c051c
feat(ui): add @frontmcp/ui library for platform-aware HTML components
frontegg-david Nov 26, 2025
6caa860
feat(auth): enhance authorization module with new utilities and sessi…
frontegg-david Nov 26, 2025
b834d25
Merge branch 'main' into enhance-authentication
frontegg-david Nov 26, 2025
bfc7f67
feat(theme): enhance theme configuration with DeepPartial type for ne…
frontegg-david Nov 26, 2025
b425014
Merge branch 'main' into enhance-authentication
frontegg-david Nov 26, 2025
e254794
Merge branch 'main' into enhance-authentication
frontegg-david Nov 26, 2025
ceb1d91
refactor(auth): remove legacy provider token handling and improve typ…
frontegg-david Nov 26, 2025
2c7711e
feat(auth): implement public and orchestrated authentication modes wi…
frontegg-david Nov 27, 2025
c78b0de
Merge branch 'main' into enhance-authentication
frontegg-david Nov 27, 2025
d06f4ab
refactor(auth): improve code formatting and organization across multi…
frontegg-david Nov 27, 2025
a6c2e5b
refactor(list-notes): destructure input parameters for improved reada…
frontegg-david Nov 27, 2025
7310b5e
feat(auth): implement public mode for authentication-free testing in …
frontegg-david Nov 27, 2025
44a6253
feat(auth): add support for stateless HTTP transport mode for anonymo…
frontegg-david Nov 27, 2025
702fb99
feat(auth): enhance transport configuration for stateless HTTP and pu…
frontegg-david Nov 27, 2025
5952d3e
feat(auth): add end-to-end tests for orchestrated and public authenti…
frontegg-david Nov 28, 2025
b771d77
Merge branch 'main' into enhance-authentication
frontegg-david Nov 28, 2025
60a0734
feat(auth): enhance authentication error handling and add prompt requ…
frontegg-david Nov 28, 2025
1210bbe
fix(auth): clarify session ID handling in authentication flow
frontegg-david Nov 28, 2025
f118c61
fix(errors): override cause property in error classes for clarity
frontegg-david Nov 28, 2025
485078b
feat(notification): add support for resource subscription and unsubsc…
frontegg-david Nov 28, 2025
030ab50
Merge branch 'main' into add-missing-mcp-parts
frontegg-david Nov 29, 2025
238f524
fix(docs): resolve merge conflicts and clean up mode documentation
frontegg-david Nov 29, 2025
a95b598
refactor: simplify handler signatures and improve type safety in MCP …
frontegg-david Nov 29, 2025
7989439
refactor: remove deprecated McpLoggingLevel type and improve type saf…
frontegg-david Nov 29, 2025
b89b4f0
refactor: streamline session handling in authorization for HTTP and S…
frontegg-david Nov 29, 2025
520f22e
Merge branch 'main' into add-missing-mcp-parts
frontegg-david Nov 29, 2025
113ddfb
refactor: update configuration retrieval and improve type safety in Z…
frontegg-david Nov 29, 2025
a1cdbe2
refactor: enhance mock configuration creation with nested structure s…
frontegg-david Nov 30, 2025
47cf023
refactor: update import paths and enhance default values in schemas
frontegg-david Nov 30, 2025
23b718b
feat: implement SynonymExpansionService for enhanced query relevance
frontegg-david Nov 30, 2025
bfb4dd9
feat: add examples metadata to tools for improved discoverability and…
frontegg-david Nov 30, 2025
6fa75d8
feat: add missing MCP context configuration and Codex home setup
frontegg-david Nov 30, 2025
4fea313
refactor: optimize transformation logic in concat.transform.ts for be…
frontegg-david Nov 30, 2025
0ffcc88
feat: enhance string extraction logic with context-aware checks for l…
frontegg-david Nov 30, 2025
31cfadd
feat: export findAvailablePort function and update default protocol v…
frontegg-david Nov 30, 2025
7af6e15
feat: improve security model by refining global whitelisting and disa…
frontegg-david Nov 30, 2025
7114c18
feat: enhance security presets by blocking additional dangerous ident…
frontegg-david Nov 30, 2025
d29508d
feat: update E2E tests to enable prompt access and adjust server conf…
frontegg-david Nov 30, 2025
81b7b35
refactor: moved ast-guard, vectoriadb and enclave-vm outside the fron…
frontegg-david Nov 30, 2025
dd673f3
feat: update package references from @frontmcp/enclave to enclave-vm …
frontegg-david Dec 1, 2025
7b835b1
feat: update transformIgnorePatterns to include enclave-vm and ast-guard
frontegg-david Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 22 additions & 1 deletion .github/workflows/codex-mintlify-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
run: |
set -euo pipefail
mkdir -p .github/codex/mcp-context
CODEX_HOME="${RUNNER_TEMP}/codex-home"
mkdir -p "$CODEX_HOME"

echo "Setting up Mintlify MCP context..."

Expand Down Expand Up @@ -103,8 +105,26 @@ jobs:
- Include tags for filtering ("latest", "version X.Y")
GUIDELINES

echo "✓ MCP context prepared"
cat > "$CODEX_HOME/config.toml" << 'EOF'
[features]
# Enable the Rust MCP client (needed for HTTP/OAuth MCP support)
rmcp_client = true

# --- Mintlify Documentation Server ---
# Provides access to Mintlify documentation best practices
[mcp_servers.mintlify_docs]
type = "http"
url = "https://mintlify.com/docs/mcp"
http_headers = { "X-MCP-Readonly" = "true" }
startup_timeout_sec = 30
tool_timeout_sec = 60
EOF

echo "✓ MCP context prepared and Codex home configured"
echo "mcp_enabled=true" >> "$GITHUB_OUTPUT"
echo "codex_home=${CODEX_HOME}" >> "$GITHUB_OUTPUT"
env:
RUNNER_TEMP: ${{ runner.temp }}

- name: Prepare diff context for Codex
id: ctx
Expand Down Expand Up @@ -586,6 +606,7 @@ jobs:
uses: openai/codex-action@v1
with:
openai-api-key: ${{ secrets.CODEX_OPENAI_KEY }}
codex-home: ${{ steps.mcp.outputs.codex_home }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

openai/codex-action v1 parameters documentation

💡 Result:

The openai/codex-action@v1 GitHub Action accepts the following inputs and exposes these outputs:

Inputs

  • openai-api-key — API key (secret). [required if using the proxy]. [1]
  • responses-api-endpoint — Optional override for Responses API endpoint (e.g. Azure). [1]
  • prompt — Inline prompt text (provide this OR prompt-file). [1]
  • prompt-file — Path to a file containing the prompt (provide this OR prompt). [1]
  • output-file — File path to write the final Codex message (optional). [1]
  • working-directory — Directory passed to codex exec --cd (defaults to repo root). [1]
  • sandbox — Sandbox mode: workspace-write (default), read-only, or danger-full-access. [1]
  • codex-version — Version of the @openai/codex package to install. [1]
  • codex-args — Extra arguments forwarded to codex exec; accepts JSON arrays (e.g. ["--flag","value"]) or shell-style strings. [1]
  • safety-strategy — Controls runner privileges; valid values include drop-sudo (default), unprivileged-user, read-only, unsafe. [1]
  • codex-user — (used with unprivileged-user safety-strategy; see examples). [1]

Outputs

  • final-message — Final message returned by codex exec. [1]

Notes

  • The action installs the Codex CLI and starts a Responses API proxy; Azure usage requires the full Responses API URL (including /v1/responses). [1]
  • For more configuration options and examples (including sandbox and Azure guidance) see the repo README and the Codex docs. [1][2]

Sources
[1] openai/codex-action README (GitHub).
[2] OpenAI Codex developer docs (Codex SDK / action overview).


🏁 Script executed:

# First, let's examine the workflow file to understand the context
find . -name "codex-mintlify-docs.yml" -type f

Repository: agentfront/frontmcp

Length of output: 106


🏁 Script executed:

# Let's also search for any action definitions in the repository
find .github -name "action.yml" -o -name "action.yaml"

Repository: agentfront/frontmcp

Length of output: 45


🏁 Script executed:

# Read the workflow file around line 609 to understand the context
sed -n '600,620p' .github/workflows/codex-mintlify-docs.yml

Repository: agentfront/frontmcp

Length of output: 833


Remove codex-home parameter—it is not a valid input for openai/codex-action@v1.

The codex-home parameter passed on line 609 is not recognized by the openai/codex-action@v1 action and will be silently ignored. The official action inputs do not include this parameter. If the intention is to set a working directory for Codex, use the working-directory parameter instead.

🤖 Prompt for AI Agents
In .github/workflows/codex-mintlify-docs.yml around line 609, the step is
passing an invalid input named `codex-home` to openai/codex-action@v1; remove
the `codex-home: ${{ steps.mcp.outputs.codex_home }}` line and, if the goal was
to change the action's working directory, replace it by setting
`working-directory:` on the job/step (or use the action's supported inputs) so
only valid inputs are passed to openai/codex-action@v1.

prompt-file: .github/codex/prompts/update-docs.md
output-file: ${{ env.CODEX_OUT }}
model: "gpt-5.1-codex"
Expand Down
21 changes: 2 additions & 19 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Located in `/libs/*`:

Located in `/libs/*`:

- **ast-guard** (`libs/ast-guard`) - JavaScript AST security validation with extensible rules
- **json-schema-to-zod-v3** (`libs/json-schema-to-zod-v3`) - JSON Schema to Zod converter
- **mcp-from-openapi** (`libs/mcp-from-openapi`) - Generate MCP servers from OpenAPI specs
- **vectoriadb** (`libs/vectoriadb`) - Lightweight in-memory vector database

> **Note:** `ast-guard`, `vectoriadb`, and `enclave-vm` have been moved to the [enclave monorepo](https://github.com/agentfront/enclave).

### Demo Apps

Expand Down Expand Up @@ -84,23 +84,6 @@ export * from './errors';

### Helper/Independent Libraries

#### ast-guard

- **Type**: Helper library (independent, publishable)
- **Purpose**: Bank-grade JavaScript validation using AST analysis
- **Security Model**: Four-tier preset system (STRICT > SECURE > STANDARD > PERMISSIVE)
- **Test Count**: 188 tests with 95.11% coverage
- **Key Rules**: DisallowedIdentifier, NoEval, NoAsync, CallArgumentValidation, etc.
- **Documentation**: SECURITY-AUDIT.md documents all 67 blocked attack vectors
- **Usage**: Can be used by @frontmcp packages or independently

#### vectoriadb

- **Type**: Helper library (independent, publishable)
- **Purpose**: Lightweight in-memory vector database for embeddings
- **Use Case**: Semantic search, RAG systems, similarity matching
- **Usage**: Can be used by @frontmcp packages or independently

#### json-schema-to-zod-v3

- **Type**: Helper library (independent, publishable)
Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,31 +301,37 @@ FrontMCP][3])

### Servers

`@FrontMcp({...})` defines **info**, **apps**, **http**, **logging**, **session**, and optional **auth**. Keep it
minimal or scale up with providers and plugins. ([The FrontMCP Server - FrontMCP][5])
The FrontMCP server is defined with a single decorator: `@FrontMcp({...})`. It configures **info**, **apps**, **http**,
**logging**, **session**, and optional **auth**. Start minimal and scale up with providers and plugins.
([The FrontMCP Server - FrontMCP][5])

### Apps

Use `@App` to group **tools**, **resources**, **prompts**, plus **providers**, **adapters**, and **plugins**. With
`splitByApp: true`, each app gets its own scope/base path and, if needed, its own auth surface. ([Apps - FrontMCP][6])
Apps are the **organizational units** for capabilities. Each app groups related **tools**, **resources**, and **prompts**
into a cohesive domain, along with **providers**, **adapters**, and **plugins**. With `splitByApp: true`, apps get
isolated scopes and auth surfaces. ([Apps - FrontMCP][6])

### Tools

Typed actions with schemas (class `@Tool` or inline `tool({...})(handler)`). Use the Zod‑field **shape** style for
`inputSchema`. ([Tools - FrontMCP][4])
Tools are **typed actions** that execute operations with side effects. They're the primary way to enable an AI model to
interact with external systems—calling APIs, modifying data, performing calculations, or triggering workflows. Use the
class `@Tool` decorator or inline `tool({...})(handler)` with Zod schemas. ([Tools - FrontMCP][4])

### Resources

Readable data by URI or RFC6570 template (see `@Resource` / `@ResourceTemplate`). ([Resources - FrontMCP][7])
Resources expose **readable data** to an AI model's context. Unlike tools that execute actions with side effects,
resources are designed for read-only data retrieval—configuration files, user profiles, documents, or any content
the model needs to reference. ([Resources - FrontMCP][7])

### Prompts

Reusable templates returning MCP `GetPromptResult`, with typed arguments. ([Prompts - FrontMCP][8])
Prompts provide **reusable message templates** for AI interactions. They return MCP `GetPromptResult` with typed
arguments, enabling consistent conversation patterns. ([Prompts - FrontMCP][8])

### Providers / Adapters / Plugins

Inject shared services, generate tools from OpenAPI, and add cross‑cutting behavior like caching and hooks. ([Add
OpenAPI Adapter - FrontMCP][9])
Inject shared services, generate tools from OpenAPI specs, and add cross‑cutting behavior like caching and hooks.
([Add OpenAPI Adapter - FrontMCP][9])

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { test, expect } from '@frontmcp/testing';
test.describe('Orchestrated Auth Mode E2E', () => {
test.use({
server: './src/main.ts',
port: 3105,
});

test.describe('Unauthenticated Access', () => {
Expand Down Expand Up @@ -139,10 +138,7 @@ test.describe('Orchestrated Auth Mode E2E', () => {
});
});

// TODO: Prompts registration for apps needs to be implemented
// The prompts capability is advertised but prompts/list returns "Method not found"
// This is a pre-existing issue to be fixed separately
test.describe.skip('Prompt Access', () => {
test.describe('Prompt Access', () => {
test('should list prompts for authenticated user', async ({ server, auth }) => {
const token = await auth.createToken({
sub: 'user-123',
Expand Down
1 change: 1 addition & 0 deletions apps/auth/demo-orchestrated-auth/jest.e2e.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
testEnvironment: 'node',
testMatch: ['<rootDir>/e2e/**/*.e2e.test.ts'],
testTimeout: 60000,
maxWorkers: 1,
setupFilesAfterEnv: ['<rootDir>/../../../libs/testing/src/setup.ts'],
transform: {
'^.+\\.[tj]s$': [
Expand Down
6 changes: 1 addition & 5 deletions apps/auth/demo-public/e2e/public-auth.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { test, expect } from '@frontmcp/testing';
test.describe('Public Auth Mode E2E', () => {
test.use({
server: './src/main.ts',
port: 3103,
publicMode: true,
});

Expand Down Expand Up @@ -81,10 +80,7 @@ test.describe('Public Auth Mode E2E', () => {
});
});

// TODO: Prompts registration for apps needs to be implemented
// The prompts capability is advertised but prompts/list returns "Method not found"
// This is a pre-existing issue to be fixed separately
test.describe.skip('Prompt Access', () => {
test.describe('Prompt Access', () => {
test('should list prompts without auth', async ({ mcp }) => {
const prompts = await mcp.prompts.list();

Expand Down
1 change: 1 addition & 0 deletions apps/auth/demo-public/jest.e2e.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
testEnvironment: 'node',
testMatch: ['<rootDir>/e2e/**/*.e2e.test.ts'],
testTimeout: 60000,
maxWorkers: 1,
setupFilesAfterEnv: ['<rootDir>/../../../libs/testing/src/setup.ts'],
transform: {
'^.+\\.[tj]s$': [
Expand Down
2 changes: 2 additions & 0 deletions apps/auth/demo-public/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const port = parseInt(process.env['PORT'] ?? '3003', 10);
enableStreamableHttp: true,
enableStatelessHttp: false,
requireSessionForStreamable: false,
enableLegacySSE: true, // Enable legacy SSE endpoint (/sse)
enableSseListener: true, // Enable SSE listener for modern SSE with session
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
import { TestServer } from '@frontmcp/testing';
import { expect } from '@jest/globals';

const PORT = 3104;
const ENV = {
PORT: String(PORT),
IDP_PROVIDER_URL: 'https://auth.example.com',
IDP_EXPECTED_AUDIENCE: 'https://api.example.com',
};
Expand All @@ -25,7 +23,6 @@ describe('Transparent Auth Mode E2E', () => {

beforeAll(async () => {
server = await TestServer.start({
port: PORT,
command: 'npx tsx ./src/main.ts',
env: ENV,
startupTimeout: 30000,
Expand All @@ -41,7 +38,7 @@ describe('Transparent Auth Mode E2E', () => {

describe('Unauthorized Access', () => {
it('should return 401 for unauthorized requests', async () => {
const response = await fetch(`http://localhost:${PORT}/`, {
const response = await fetch(`${server!.info.baseUrl}/`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand All @@ -62,7 +59,7 @@ describe('Transparent Auth Mode E2E', () => {

describe('Protected Resource Metadata', () => {
it('should expose protected resource metadata endpoint', async () => {
const response = await fetch(`http://localhost:${PORT}/.well-known/oauth-protected-resource`, {
const response = await fetch(`${server!.info.baseUrl}/.well-known/oauth-protected-resource`, {
method: 'GET',
headers: { Accept: 'application/json' },
redirect: 'manual', // Disable automatic redirect following
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* eslint-disable */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Replace blanket ESLint disable with specific rule exemptions.

The /* eslint-disable */ comment disables all linting rules. If linting issues exist, disable only the specific rules that are problematic rather than all rules.

Apply this approach instead:

-/* eslint-disable */
+/* eslint-disable import/no-default-export */

(Adjust the specific rule as needed based on actual violations)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/* eslint-disable */
/* eslint-disable import/no-default-export */
🤖 Prompt for AI Agents
In apps/auth/demo-transparent-auth/jest.e2e.config.ts around line 1, the file
currently uses a blanket "/* eslint-disable */" which disables all linting;
replace it by removing that comment and instead add targeted
eslint-disable-next-line or file-level exemptions for only the specific rules
causing violations (identify the actual lint errors by running ESLint, then add
precise rule names, e.g. "/* eslint-disable rule-name */" or inline disables on
the offending lines), keeping comments minimal and scoped to the exact
rules/lines so that other lint rules remain enforced.

export default {
displayName: 'demo-showcase-e2e',
preset: '../../jest.preset.js',
displayName: 'demo-transparent-auth-e2e',
preset: '../../../jest.preset.js',
testEnvironment: 'node',
testMatch: ['<rootDir>/e2e/**/*.e2e.ts'],
testTimeout: 30000,
setupFilesAfterEnv: ['<rootDir>/../../libs/testing/src/setup.ts'],
testMatch: ['<rootDir>/e2e/**/*.e2e.test.ts'],
testTimeout: 60000,
maxWorkers: 1,
setupFilesAfterEnv: ['<rootDir>/../../../libs/testing/src/setup.ts'],
transform: {
'^.+\\.[tj]s$': [
'@swc/jest',
Expand Down Expand Up @@ -36,11 +37,12 @@ export default {
moduleFileExtensions: ['ts', 'js', 'html'],
transformIgnorePatterns: ['node_modules/(?!(jose)/)'],
moduleNameMapper: {
'^@frontmcp/testing$': '<rootDir>/../../libs/testing/src/index.ts',
'^@frontmcp/testing/setup$': '<rootDir>/../../libs/testing/src/setup.ts',
'^@frontmcp/sdk$': '<rootDir>/../../libs/sdk/src/index.ts',
'^@frontmcp/adapters$': '<rootDir>/../../libs/adapters/src/index.ts',
'^@frontmcp/plugins$': '<rootDir>/../../libs/plugins/src/index.ts',
'^@frontmcp/testing$': '<rootDir>/../../../libs/testing/src/index.ts',
'^@frontmcp/testing/setup$': '<rootDir>/../../../libs/testing/src/setup.ts',
'^@frontmcp/sdk$': '<rootDir>/../../../libs/sdk/src/index.ts',
'^@frontmcp/sdk/(.*)$': '<rootDir>/../../../libs/sdk/src/$1',
'^@frontmcp/adapters$': '<rootDir>/../../../libs/adapters/src/index.ts',
'^@frontmcp/plugins$': '<rootDir>/../../../libs/plugins/src/index.ts',
},
coverageDirectory: 'test-output/jest/coverage-e2e',
};
4 changes: 2 additions & 2 deletions apps/auth/demo-transparent-auth/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const port = parseInt(process.env['PORT'] ?? '3004', 10);
auth: {
mode: 'transparent',
remote: {
provider: process.env['IDP_PROVIDER_URL'] || 'https://auth.example.com',
provider: process.env['IDP_PROVIDER_URL'] || 'https://sample-app.frontegg.com',
dcrEnabled: false,
},
expectedAudience: process.env['IDP_EXPECTED_AUDIENCE'] || 'https://api.example.com',
expectedAudience: process.env['IDP_EXPECTED_AUDIENCE'] || 'https://sample-app.frontegg.com',
requiredScopes: [],
allowAnonymous: false,
anonymousScopes: ['anonymous'],
Expand Down
67 changes: 0 additions & 67 deletions apps/demo-showcase/e2e/openapi.e2e.ts

This file was deleted.

Loading
Loading