Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ updates:
schedule:
interval: weekly
day: monday
time: "09:00"
time: '09:00'
timezone: Asia/Kolkata
open-pull-requests-limit: 3
commit-message:
prefix: "chore(deps)"
prefix: 'chore(deps)'
groups:
npm-minor-and-patch:
update-types:
Expand All @@ -22,8 +22,8 @@ updates:
schedule:
interval: weekly
day: monday
time: "09:00"
time: '09:00'
timezone: Asia/Kolkata
open-pull-requests-limit: 2
commit-message:
prefix: "chore(deps)"
prefix: 'chore(deps)'
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ concurrency:
cancel-in-progress: true

jobs:
build:
name: Build
check:
name: Check
runs-on: ubuntu-latest
timeout-minutes: 10
env:
Expand All @@ -34,5 +34,5 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build site
run: npm run build
- name: Check formatting and build
run: npm run check
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
.astro/
node_modules/
package-lock.json
public/pagefind/
5 changes: 4 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export default defineConfig({
{ tag: 'meta', attrs: { property: 'og:image:width', content: '1731' } },
{ tag: 'meta', attrs: { property: 'og:image:height', content: '909' } },
{ tag: 'meta', attrs: { name: 'twitter:image', content: 'https://mcplab.dev/og.png' } },
{ tag: 'script', content: `const storedTheme = localStorage.getItem('starlight-theme'); if (storedTheme !== 'light' && storedTheme !== 'dark') localStorage.setItem('starlight-theme', matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); document.addEventListener('DOMContentLoaded', () => document.querySelector('select[aria-label="Select theme"] option[value="auto"]')?.remove());` },
{
tag: 'script',
content: `const storedTheme = localStorage.getItem('starlight-theme'); if (storedTheme !== 'light' && storedTheme !== 'dark') localStorage.setItem('starlight-theme', matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); document.addEventListener('DOMContentLoaded', () => document.querySelector('select[aria-label="Select theme"] option[value="auto"]')?.remove());`,
},
],
social: [
{ icon: 'heart', label: 'Support MCP Lab', href: '/support' },
Expand Down
69 changes: 69 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 29 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{
"name": "mcplab.dev",
"private": true,
"type": "module",
"version": "0.1.0",
"engines": {
"node": ">=22.19.0"
},
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.41.7",
"@vercel/analytics": "^2.0.1",
"astro": "^7.1.6",
"astro-mermaid": "^2.1.0",
"mermaid": "^11.17.0",
"sharp": "^0.35.3"
}
"name": "mcplab.dev",
"private": true,
"type": "module",
"version": "0.1.0",
"engines": {
"node": ">=22.19.0"
},
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"check": "npm run format:check && npm run build",
"format": "prettier --write .",
"format:check": "prettier --check .",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.41.7",
"@vercel/analytics": "^2.0.1",
"astro": "^7.1.6",
"astro-mermaid": "^2.1.0",
"mermaid": "^11.17.0",
"sharp": "^0.35.3"
},
"devDependencies": {
"prettier": "^3.9.6",
"prettier-plugin-astro": "^0.14.1"
}
}
15 changes: 15 additions & 0 deletions prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import('prettier').Config} */
export default {
plugins: ['prettier-plugin-astro'],
printWidth: 120,
singleQuote: true,
useTabs: true,
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
],
};
16 changes: 12 additions & 4 deletions src/content/docs/docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ hero:
import { Card, CardGrid } from '@astrojs/starlight/components';

<CardGrid>
<Card title="Run a scenario" icon="rocket">Define a tool call, timeout, and expectations in JSON.</Card>
<Card title="Inject a fault" icon="warning">Use delay, hang, or disconnect to exercise recovery paths.</Card>
<Card title="Verify state" icon="approve-check">Add a sequential observer call such as `ping`.</Card>
<Card title="Report clearly" icon="document">Produce console output or stable JSON for CI.</Card>
<Card title="Run a scenario" icon="rocket">
Define a tool call, timeout, and expectations in JSON.
</Card>
<Card title="Inject a fault" icon="warning">
Use delay, hang, or disconnect to exercise recovery paths.
</Card>
<Card title="Verify state" icon="approve-check">
Add a sequential observer call such as `ping`.
</Card>
<Card title="Report clearly" icon="document">
Produce console output or stable JSON for CI.
</Card>
</CardGrid>

## Protocol compatibility
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/docs/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ graph LR
CLI --> Server
```

*Figure 1. Current server and stdio transport architecture.*
_Figure 1. Current server and stdio transport architecture._

## Scenario execution path

Expand Down Expand Up @@ -54,7 +54,7 @@ sequenceDiagram
Runner->>Runner: Produce combined scenario recording
```

*Figure 2. Primary and optional observer calls execute sequentially.*
_Figure 2. Primary and optional observer calls execute sequentially._

## Responsibilities

Expand Down Expand Up @@ -89,7 +89,7 @@ flowchart TD
AssertionFailure --> Final
```

*Figure 3. Observer verification and failure handling.*
_Figure 3. Observer verification and failure handling._

:::note[Deliberate boundary]
The current architecture is not a proxy and does not orchestrate external MCP clients. Streamable HTTP and target-client adapters are future work.
Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ Console is the default. Pass `--report json` for machine-readable scenario resul

## Exit codes

| Code | Meaning |
| --- | --- |
| `0` | All expectations passed |
| `2` | Scenario ran, but one or more assertions failed |
| `1` | Scenario could not be loaded or executed |
| Code | Meaning |
| ---- | ----------------------------------------------- |
| `0` | All expectations passed |
| `2` | Scenario ran, but one or more assertions failed |
| `1` | Scenario could not be loaded or executed |

JSON command error codes are `invalid_arguments`, `scenario_load_failed`, and `scenario_execution_failed`.
2 changes: 1 addition & 1 deletion src/content/docs/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ flowchart TD
Response --> Evaluation[Future AGI Evaluation]
```

*Figure 1. External validation path for the `hang` fault.*
_Figure 1. External validation path for the `hang` fault._

### What was validated

Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/docs/reporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ The console reporter shows the scenario name, observed outcome, duration, assert

```json
{
"name": "bounded delay succeeds",
"outcome": "success",
"durationMs": 251.25,
"passed": true,
"failures": []
"name": "bounded delay succeeds",
"outcome": "success",
"durationMs": 251.25,
"passed": true,
"failures": []
}
```

Expand Down
40 changes: 20 additions & 20 deletions src/content/docs/docs/scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ A scenario describes one primary tool call, its deadline, and the expected obser

```json
{
"name": "bounded delay succeeds",
"call": { "tool": "delay", "args": { "delayMs": 250 } },
"timeoutMs": 1000,
"expect": {
"outcome": "success",
"maxDurationMs": 500,
"result": { "isError": false, "textContains": "\"status\":\"delayed\"" }
}
"name": "bounded delay succeeds",
"call": { "tool": "delay", "args": { "delayMs": 250 } },
"timeoutMs": 1000,
"expect": {
"outcome": "success",
"maxDurationMs": 500,
"result": { "isError": false, "textContains": "\"status\":\"delayed\"" }
}
}
```

Expand All @@ -26,18 +26,18 @@ Use `observe` to make a separate call after the primary path. The calls are sequ

```json
{
"name": "server remains responsive after a delay",
"call": { "tool": "delay", "args": { "delayMs": 250 } },
"timeoutMs": 1000,
"expect": { "outcome": "success" },
"observe": {
"call": { "tool": "ping", "args": {} },
"timeoutMs": 1000,
"expect": {
"outcome": "success",
"result": { "isError": false, "textContains": "\"status\":\"ok\"" }
}
}
"name": "server remains responsive after a delay",
"call": { "tool": "delay", "args": { "delayMs": 250 } },
"timeoutMs": 1000,
"expect": { "outcome": "success" },
"observe": {
"call": { "tool": "ping", "args": {} },
"timeoutMs": 1000,
"expect": {
"outcome": "success",
"result": { "isError": false, "textContains": "\"status\":\"ok\"" }
}
}
}
```

Expand Down
Loading