MCP Agent TypeScript Port
MCP 代理 TypeScript 端口
概述
MCP(模型上下文协议)代理 TypeScript 端口是 MCP 代理系统的一个健壮且类型安全的实现。它提供了一个灵活的框架,用于构建具有高级工作流管理、日志记录和执行功能的智能上下文感知代理。
这是lastmile-ai 原始 MCP Agent 框架的 TypeScript 端口。
Related MCP server: Orchestration MCP
特征
🚀模块化架构
全面的 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
贡献
分叉存储库
创建你的功能分支(
git checkout -b feature/AmazingFeature)提交您的更改(
git commit -m 'Add some AmazingFeature')推送到分支(
git push origin feature/AmazingFeature)打开拉取请求
执照
该项目遵循原始 MCP Agent 项目的许可证,可在此处找到。
致谢
特别感谢最初的 MCP Agent 开发人员为 AI 代理开发创建了一个创新框架。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
LLM Orchestration Agent (Mcp)
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn agent-ready TypeScript template for building Model Context Protocol (MCP) servers with standardized discovery flows and permission-aware tools. It provides pre-configured core and operable profiles to help developers quickly implement, test, and distribute production-ready MCP services.MIT
- FlicenseAqualityDmaintenanceA TypeScript MCP server for launching, tracking, and managing external coding-agent runs across local and remote backends like Codex and Claude Code. It allows top-level agents to orchestrate subagents through tools for spawning tasks, polling events, and handling interactive sessions.72-
- AlicenseAqualityBmaintenanceA TypeScript-based MCP server template for the Antigravity agentic environment, providing system status and SQLite database tools via stdio transport.1ISC
- AlicenseNot gradedqualityBmaintenanceAutomatically generates MCP tools, CLI, and web UI from TypeScript methods, enabling AI agents and chat clients to interact with custom capabilities defined once.252 npm100MIT