Skip to main content
Glama

MCP Agent TypeScript Port

by waldzellai

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. 概述
    1. 特征
      1. 安装
        1. 通过 Smithery 安装
        2. 手动安装
      2. 快速入门
        1. 创建工作流
        2. 日志记录
        3. CLI 使用
      3. 执行器使用
        1. 配置
          1. 开发现状
            1. 原始项目
              1. 贡献
                1. 执照
                  1. 致谢

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      A TypeScript-based server that allows calling other MCP clients from your own MCP client, facilitating task delegation and context window offloading for enhanced multi-agent interactions.
                      Last updated -
                      3
                      14
                      JavaScript
                      MIT License
                      • Apple
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools for AI systems to interact with.
                      Last updated -
                      16
                      TypeScript
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.
                      Last updated -
                      67
                      TypeScript
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A template repository for building Model Context Protocol (MCP) servers that enables developers to create interactive AI agents with real-time bidirectional communication capabilities through WebSocket and SSE endpoints.
                      Last updated -
                      TypeScript
                      MIT License

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/waldzellai/mcp-agent-ts'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server