Skip to content

Angular based MCP apps example #423

Open

Description

@Avcharov

Is your feature request related to a problem? Please describe.
Building mcp apps with current examples setup is not smooth using angular as it doesn't have setting to bundle app into single file and there is not possibility to extend build settings with vite plugins as it is done for other frameworks

Describe the solution you'd like
Easy to understand example to build mcp apps with angular

Describe alternatives you've considered
One of possible ways is to make postbuild script which will inline .js and .css files to generated index.html .

One more is to use AnalogJS, Angular meta framework with viteSingleFile add-on, but still it is not Angular native solution.

I believe there is better way to do it.

Activity

  1. sabob commented on Feb 19, 2026

    @sabob

    Apologies for dumb question, but is my understanding correct that to deploy an Angular(or React etc) MCP App, we must bundle everything into a single html file? Meaning the index.html cannot have relative paths like:

    <script src="main.js"></script>
    

    The above request from without the iframe will return 404.

    The alternative is hosting assets at a absolute path or CDN?

    Kind regards

    Bob

  2. shteynu commented on Oct 9, 2026

    @shteynu

    We hit the same single-file problem and solved it on the plain Angular CLI — no Vite or Analog. After ng build, a small script folds Angular's chunks into one ES module with esbuild and inlines it plus the stylesheets into index.html, failing the build if anything still points at a local file. A starter mirroring basic-server-vue (get-time, callServerTool/sendMessage/sendLog/openLink, host theming, Angular 22 zoneless): https://github.com/shteynu/mcp-app-angular-starter

    On the single-file question above: yes, the resource is rendered as one document, unless you host the assets yourself and declare them in _meta.ui.csp.resourceDomains. Happy to have the starter linked from the community examples page (#627).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions