-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add index page #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@e18e/mcp-remote': patch | ||
| --- | ||
|
|
||
| Add a basic index page to the MCP server. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| declare module '*.html' { | ||
| const content: string; | ||
| export default content; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,230 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <title>e18e MCP server</title> | ||
| <meta | ||
| name="description" | ||
| content="The official e18e MCP server, advising agents on modern and performant best practices." | ||
| /> | ||
| <link rel="icon" href="/icons/icon.svg" type="image/svg+xml" /> | ||
| <style> | ||
| :root { | ||
| color-scheme: light dark; | ||
| --bg: #fdfcfa; | ||
| --fg: #1b1a17; | ||
| --muted: #5f5c54; | ||
| --border: #e5e1d8; | ||
| --code-bg: #f4f1ea; | ||
| --accent: #7bb560; | ||
| } | ||
|
|
||
| @media (prefers-color-scheme: dark) { | ||
| :root { | ||
| --bg: #17181a; | ||
| --fg: #ececec; | ||
| --muted: #a1a1a1; | ||
| --border: #2e2f33; | ||
| --code-bg: #212226; | ||
| } | ||
| } | ||
|
|
||
| * { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| margin: 0; | ||
| padding: 3rem 1.25rem 5rem; | ||
| background: var(--bg); | ||
| color: var(--fg); | ||
| font-family: | ||
| ui-sans-serif, | ||
| system-ui, | ||
| -apple-system, | ||
| 'Segoe UI', | ||
| Roboto, | ||
| sans-serif; | ||
| line-height: 1.6; | ||
| } | ||
|
|
||
| main { | ||
| max-width: 42rem; | ||
| margin: 0 auto; | ||
| } | ||
|
|
||
| header { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.9rem; | ||
| margin-bottom: 2.5rem; | ||
| } | ||
|
|
||
| header img { | ||
| width: 3rem; | ||
| height: 3rem; | ||
| } | ||
|
|
||
| h1 { | ||
| font-size: 1.75rem; | ||
| margin: 0; | ||
| letter-spacing: -0.02em; | ||
| } | ||
|
|
||
| h2 { | ||
| font-size: 1.1rem; | ||
| margin: 2.5rem 0 0.75rem; | ||
| letter-spacing: -0.01em; | ||
| } | ||
|
|
||
| h3 { | ||
| font-size: 0.95rem; | ||
| margin: 1.5rem 0 0.5rem; | ||
| color: var(--muted); | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| p, | ||
| li { | ||
| color: var(--muted); | ||
| } | ||
|
|
||
| a { | ||
| color: inherit; | ||
| text-decoration-color: var(--accent); | ||
| text-underline-offset: 2px; | ||
| } | ||
|
|
||
| ul { | ||
| padding-left: 1.1rem; | ||
| } | ||
|
|
||
| li { | ||
| margin: 0.35rem 0; | ||
| } | ||
|
|
||
| li strong { | ||
| color: var(--fg); | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| code { | ||
| font-family: ui-monospace, SFMono-Regular, Menlo, monospace; | ||
| font-size: 0.85em; | ||
| background: var(--code-bg); | ||
| border-radius: 4px; | ||
| padding: 0.1rem 0.35rem; | ||
| } | ||
|
|
||
| pre { | ||
| background: var(--code-bg); | ||
| border: 1px solid var(--border); | ||
| border-radius: 8px; | ||
| padding: 0.9rem 1rem; | ||
| overflow-x: auto; | ||
| } | ||
|
|
||
| pre code { | ||
| background: none; | ||
| padding: 0; | ||
| font-size: 0.8rem; | ||
| color: var(--fg); | ||
| } | ||
|
|
||
| .endpoint { | ||
| display: inline-block; | ||
| font-family: ui-monospace, SFMono-Regular, Menlo, monospace; | ||
| font-size: 0.9rem; | ||
| background: var(--code-bg); | ||
| border: 1px solid var(--border); | ||
| border-radius: 8px; | ||
| padding: 0.4rem 0.7rem; | ||
| margin-top: 0.25rem; | ||
| } | ||
|
|
||
| footer { | ||
| margin-top: 3.5rem; | ||
| padding-top: 1.25rem; | ||
| border-top: 1px solid var(--border); | ||
| font-size: 0.85rem; | ||
| color: var(--muted); | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <main> | ||
| <header> | ||
| <img src="/icons/icon.svg" alt="" /> | ||
| <h1>e18e MCP server</h1> | ||
| </header> | ||
|
|
||
| <p> | ||
| The official | ||
| <a href="https://e18e.dev">e18e</a> MCP server, advising agents on | ||
| modern and performant JavaScript practices. It flags inefficient or | ||
| outdated npm packages and serves migration guides for moving off them. | ||
| </p> | ||
|
|
||
| <p>The server is hosted over streamable HTTP at:</p> | ||
| <p class="endpoint">https://mcp.e18e.dev/mcp</p> | ||
|
|
||
| <h2>Configure your agent</h2> | ||
|
|
||
| <h3>Claude Code</h3> | ||
| <p> | ||
| Run the following command, where <code>[scope]</code> is one of | ||
| <code>user</code>, <code>project</code> or <code>local</code>: | ||
| </p> | ||
| <pre><code>claude mcp add -t http -s [scope] e18e https://mcp.e18e.dev/mcp</code></pre> | ||
|
|
||
| <h3>Other clients</h3> | ||
| <p> | ||
| Refer to your client's documentation for remote (streamable HTTP) | ||
| servers and use the URL above. Most clients accept a config of this | ||
| shape: | ||
| </p> | ||
| <pre><code>{ | ||
| "mcpServers": { | ||
| "e18e": { | ||
| "type": "http", | ||
| "url": "https://mcp.e18e.dev/mcp" | ||
| } | ||
| } | ||
| }</code></pre> | ||
| <p> | ||
| A local <code>stdio</code> version is also available on npm as | ||
| <a href="https://npmx.dev/package/@e18e/mcp">@e18e/mcp</a>, with | ||
| per-client setup instructions in | ||
| <a href="https://github.com/e18e/e18e-mcp#readme">the README</a>. | ||
| </p> | ||
|
|
||
| <h2>What it exposes</h2> | ||
| <ul> | ||
| <li> | ||
| <strong>npm-i-checker</strong>: checks an install command (<code | ||
| >npm i</code | ||
| >, <code>pnpm add</code>, <code>yarn add</code>, <code>bun i</code>) | ||
| for packages with better alternatives. | ||
| </li> | ||
| <li> | ||
| <strong>code-checker</strong>: parses a source file and suggests | ||
| replacements for the modules it imports. | ||
| </li> | ||
| <li> | ||
| <strong>lookup-replacement</strong>: looks up replacements by package | ||
| name, replacement text or topic. | ||
| </li> | ||
| <li> | ||
| <strong>replacement-docs</strong>: a resource template | ||
| (<code>e18e://docs/{slug}</code>) serving curated migration guides. | ||
| </li> | ||
| </ul> | ||
|
|
||
| <footer> | ||
| <a href="https://github.com/e18e/e18e-mcp">Source on GitHub</a> · | ||
| <a href="https://e18e.dev">e18e.dev</a> | ||
| </footer> | ||
| </main> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you tested it and it works but then why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we import it in the worker so typescript needs to know what it exports. If you think there's another way, do tell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only meant that I wasn't sure if the worker was able to resolve that import but just realized I could've just visited the preview...it is fine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It surprised me too 😄 TIL about
rules