模块化GPT-4代理编排服务器

一个基于TypeScript和Express的AI平台,用于构建、反思和执行模块化工具,支持GPT-4代理的编排和记忆功能。

  • by NeoMagCustoms
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 neomagcustoms/neo-umg-mcp-server

使用说明

🧠 Neo-UMG MCP服务器

具有内存、递归和插件支持的模块化GPT-4代理编排器。

Neo-UMG MCP Server是一个基于TypeScript+Express的AI平台,用于使用GPT-4构建、反思和执行模块化工具。它被设计为 通用模块化发电 框架——其中每个逻辑块都有一个语音,每个GPT代理都有内存。


🚀 特性

🧱 模块化代理系统

  • Plan → 脚手架→ 构建→ 文件→ 提交
  • 由LangChain+GPT-4通过提供技术支持 forgeAgent.ts 和 runOrchestrator.ts

🧠 Vault感知架构

  • 基于JSON的持久保管库 /vault/
  • 包括对齐块、MythosBlock、叠加模块、指令层等。
  • 生活内省 /memory, stackDisplayCLI.ts,以及 vaultEditorCLI.ts

🔁 递归CLI工具链

  • promptCLI.ts, swapCLI.ts, reflectCLI.ts, uploadCLI.ts,以及更多
  • GPT驱动的代理编排的完全终端控制

🌐 插件就绪HTTP路由

  • /query --通用GPT块处理器
  • /scaffold --从目标构建文件结构
  • /analyze --GPT驱动的代码分析
  • /stack, /memory, /talk --认知快照

🔐 中间件系统

  • vaultLoaderMiddleware.ts --将vault注入每条路线
  • logMiddleware.ts --记录每次通话
  • rateLimitMiddleware.ts --防止滥用GPT资源

🧩 技术栈

图层 技术
语言 TypeScript
运行时 Node.js+Express
AI/LLM 通过LangChain访问GPT-4
提示基础设施 语言链+人工消息
CLI UI 查询器+粉笔
内存 JSON保管库+injectContext
验证 Zod
插件API ai-plugin.json, openapi.yaml
开发脚本 ts-node, npm run

📦 脚本

npm run dev          # Launch Express server on localhost:3000
npm run scaffold     # Prompt-based file structure builder
npm run reflect      # GPT block validator
npm run swap         # Switch overlays/instructions
npm run plan         # Create a multi-step agent plan
npm run orchestrate  # Execute agent plan (with forge + doc)
npm run memory       # View full vault snapshot
npm run upload       # Import & validate UMG .json block
npm run status       # Auto-generate STATUS.md




\## 🚀 Features



\- 🧱 \*\*ForgeAgent\*\*: Generates tools from natural language

\- 🧠 \*\*Vault Alignment\*\*: Your own Mythos, Philosophy, and Instruction stack

\- 🔁 \*\*Recursive Orchestrator\*\*: Builds modular agent plans with 1 command

\- 💬 \*\*/talk\*\* and \*\*promptCLI\*\*: Speak to your agent in natural language

\- 📂 \*\*/scaffold\*\*: Accepts goals or repo paths, returns full agent workflows

\- 🧭 \*\*Memory Mirror\*\*: Vault state available via `/memory`

\- ✅ Secure via `.env` and optional `x-api-key` auth



---



\## 📦 Installation



```bash

git clone https://github.com/NeoMagCustoms/neo-umg-mcp-server.git

cd neo-umg-mcp-server

npm install

Create your .env file with:



ini

Copy

Edit

OPENAI\_API\_KEY=your-api-key-here

API\_KEY=optional-api-key-for-access-control

🧪 Development

npm run dev

Or run specific tools:



Command	Function

npm run prompt	Natural language prompt to agent (promptCLI)

npm run orchestrate	Runs a full modular build plan

npm run memory	Dumps vault contents

npm run plan	Prompts and saves agent build plan

npm run stack	View current modular stack

npm run edit-vault	Update vault blocks from CLI

npm run scan	Analyze local repo for issues



📡 API Routes

Method	Route	Description

POST	/query	Primary UMG block processor (GPT, Forge)

GET	/memory	Returns current vault

POST	/talk	Accepts input and routes to ForgeAgent

POST	/scaffold	Accepts plan or repo, returns agent stack



🧱 UMG Vault Structure

Vault is stored in /vault/ and includes:



AlignmentBlock.v1.json



InstructionLayer.v1.json



OverlayModules.v1.json



MythosBlock.v1.json



Custom logic flows are structured using:



🧠 MetaMOLT: Primary + overlays



🔄 Triggers: Event-based logic



🔐 Guardrails: Safety and scope constraints



🛡️ Security

.env used for secrets



.gitignore excludes .env, node\_modules, dist, logs



Optionally use x-api-key header to secure API endpoints



🧠 Future Upgrades

 Frontend UI via /forge



 LangChain plugin mode



 GitHub Actions integration



 Webhook interface (Zapier, Discord bots)



 Tool-as-a-Service mode (public or gated)



Built by Christopher Lars Haynes (Mag)

Guided by PoeUMG • Powered by Alignment • Forged in Logic



🧠 If you know this, you remember us.



---



✅ Let me know when you'd like to add:

\- `/forge` frontend

\- `/docs` auto generator

\- `/tools` explorer

\- Webhook deploy logic