MCP Agent TypeScript Port

Official

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Supports contribution workflow through Git, including branching and pull requests

  • References the original project on GitHub and provides GitHub-based contribution workflow

  • Allows installation of the MCP Agent TypeScript port via npm package manager

MCP 代理 TypeScript 端口

概述

MCP(模型上下文协议)代理 TypeScript 端口是 MCP 代理系统的一个健壮且类型安全的实现。它提供了一个灵活的框架,用于构建具有高级工作流管理、日志记录和执行功能的智能上下文感知代理。

这是lastmile-ai 原始 MCP Agent 框架的 TypeScript 端口。

特征

  • 🚀模块化架构
    • 全面的 TypeScript 实现
    • 灵活、可扩展的设计
    • 类型安全接口
  • 📊高级工作流管理
    • 基于步骤的工作流程执行
    • 并发任务处理
    • 详细的上下文跟踪
  • 🔍强大的日志系统
    • 可配置的日志级别
    • 上下文丰富的日志记录
    • 日志导出功能
  • 🧰灵活的执行器
    • 任务队列
    • 超时处理
    • 并发任务管理
  • 🖥️ CLI 支持
    • 命令行界面
    • 轻松管理代理

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 MCP Agent TypeScript 端口:

npx -y @smithery/cli install @waldzellai/mcp-agent-ts --client claude

手动安装

npm install @waldzell/mcp-agent-ts

快速入门

创建工作流

import { BaseWorkflow } from '@waldzell/mcp-agent-ts'; class MyDataProcessingWorkflow extends BaseWorkflow { constructor() { super('my-workflow', 'Data Processing'); this.addStep({ id: 'extract', name: 'Data Extraction', execute: async (context) => { // Implement data extraction logic return { data: ['item1', 'item2'] }; } }); this.addStep({ id: 'transform', name: 'Data Transformation', execute: async (context) => { // Implement data transformation logic return { transformedData: ['ITEM1', 'ITEM2'] }; } }); } } async function runWorkflow() { const workflow = new MyDataProcessingWorkflow(); const results = await workflow.execute(); console.log(results); }

日志记录

import { debug, info, warn, error } from '@waldzell/mcp-agent-ts'; // Log with different levels debug('Debugging information', { userId: 123 }); info('System started'); warn('Potential issue detected'); error('Critical error occurred');

CLI 使用

# Start the MCP Agent npx mcp-agent start # List available tools npx mcp-agent list-tools # Set log level npx mcp-agent log-level debug

执行器使用

import { BaseExecutor, Task } from '@waldzell/mcp-agent-ts'; const executor = new BaseExecutor({ maxConcurrentTasks: 3, timeout: 60000 // 1-minute timeout }); const task: Task = { id: 'example-task', name: 'Sample Task', execute: async () => { // Task implementation return 'Task completed'; } }; await executor.enqueueTask(task);

配置

MCP 代理可以通过以下方式配置:

  • 环境变量
  • 配置文件
  • 程序化配置

开发现状

🚧早期开发🚧

此移植版本处于早期阶段,功能尚未完善。欢迎贡献和反馈!

原始项目

原始 MCP 代理: lastmile-ai/mcp-agent

贡献

  1. 分叉存储库
  2. 创建你的功能分支( git checkout -b feature/AmazingFeature
  3. 提交您的更改( git commit -m 'Add some AmazingFeature'
  4. 推送到分支( git push origin feature/AmazingFeature
  5. 打开拉取请求

执照

该项目遵循原始 MCP Agent 项目的许可证,可在此处找到。

致谢

特别感谢最初的 MCP Agent 开发人员为 AI 代理开发创建了一个创新框架。

-
security - not tested
F
license - not found
-
quality - not tested

MCP Agent 框架的 TypeScript 实现,提供用于构建具有高级工作流管理、日志记录和执行功能的上下文感知代理的工具。

  1. Overview
    1. Features
      1. Installation
        1. Installing via Smithery
        2. Manual Installation
      2. Quick Start
        1. Creating a Workflow
        2. Logging
        3. CLI Usage
      3. Executor Usage
        1. Configuration
          1. Development Status
            1. Original Project
              1. Contributing
                1. License
                  1. Acknowledgements
                    ID: lamjyav2ov