← 피드로
https://mcp.decile.com is an MCP Server I built that uses Ember.js!
Okay, perhaps I overstated that a bit. The MCP server was built using a whole bunch of stuff for the backend, frontend, and infrastructure from Kubernetes to Starlette to Django REST Framework to nginx to … you name it. Ember.js only powers the MCP Apps that are embedded by the MCP Server (about 5 of them so far). Unsurprisingly, ember was well suited to this problem (although not perfect).
What went well?
- The “gjs” file format is very pleasant for human authoring and AI did a great job of working with it. I suspect that this is because it uses strict imports for everything so the AI (or human) don’t have to rely on implicit context in order to reason about what a component does.
- The new build system based on Vite was lightning fast and flexible! I was able to make the customizations I needed to execute in an MCP App context pretty easily.
- Using a monorepo with shared components importable by any of the MCP Apps and tree-shaken away if not used was very convenient! Sharing the boilerplate lint config files, vite configs, etc., as importable “.mjs” files to avoid copying those across each separate mcp-app (and full ember app).
- Using an Ember.js service to abstract away the mcp-apps SDK into a more reactive, “ember native” API was really easy and makes testing trivial.
'use strict';
module.exports = function (environment) {
const modulePrefix = 'view-audience';
const ENV = {
modulePrefix,
environment,
rootURL: '/',
locationType: 'hash',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {},
},
APP: {
MCP_SERVER_BASE_URL: '__MCP_SERVER_BASE_URL__',
},
'mcp-app': {
appInfo: {
name: modulePrefix,
title: 'View Audience',
version: '1.0.0',
},
capabilities: { availableDisplayModes: ['inline', 'fullscreen'] },
},
};
...
return ENV;
};
Enter fullscreen mode Exit fullscreen mode
What didn’t go so well?
- Originally, I planned on using the new
renderComponent(helper that allows rendering an individual component instead of a full app with router, service injections, etc., but I quickly started to miss the things the app provided. - The bundle size is larger than desired, but much of that is actually the MCP Apps SDK, which bundles every locale of zod.
There’s a lot more to speak to but I’m out of time (it’s 9 AM now)!
추출 본문 · 출처: dev.to · https://dev.to/les2/i-used-emberjs-to-make-an-mcp-server-33f7
답글 남기기