{"id":44975910,"url":"https://github.com/k-l-lambda/other-agent-mcp","last_synced_at":"2026-02-18T17:04:32.560Z","repository":{"id":327916091,"uuid":"1113608125","full_name":"k-l-lambda/other-agent-mcp","owner":"k-l-lambda","description":"An MCP (Model Context Protocol) server that provides a LangChain.js-powered subagent tool. It allows Claude Code (or any MCP client) to delegate tasks to another LLM.","archived":false,"fork":false,"pushed_at":"2025-12-10T09:42:45.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-10T10:52:10.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k-l-lambda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T08:02:28.000Z","updated_at":"2025-12-10T09:42:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/k-l-lambda/other-agent-mcp","commit_stats":null,"previous_names":["k-l-lambda/other-agent-mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/k-l-lambda/other-agent-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-l-lambda%2Fother-agent-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-l-lambda%2Fother-agent-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-l-lambda%2Fother-agent-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-l-lambda%2Fother-agent-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k-l-lambda","download_url":"https://codeload.github.com/k-l-lambda/other-agent-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-l-lambda%2Fother-agent-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-18T17:04:31.223Z","updated_at":"2026-02-18T17:04:32.542Z","avatar_url":"https://github.com/k-l-lambda.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Other MCP\n\nAn MCP (Model Context Protocol) server that provides LangChain.js-powered subagent tools with session management. It allows Claude Code (or any MCP client) to delegate tasks to another LLM while maintaining conversation context.\n\n## Features\n\n- **Multi-provider support**: OpenAI-compatible APIs (Qwen, DeepSeek, local models) and Anthropic-compatible APIs\n- **Model registry**: Configure multiple models and switch between them at runtime\n- **Session management**: Create persistent conversations that maintain context across multiple messages\n- **Session logging**: All conversations are automatically saved as markdown files in the `sessions/` directory\n- **Built-in tools**: Agents can read files, list directories, search with grep, and more\n- **Simple integration**: Works with Claude Code via `claude mcp add`\n\n## Installation\n\n```bash\ncd /path/to/other-mcp\nnpm install\nnpm run build\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `SUBAGENT_PROVIDER` | `openai` or `anthropic` | `openai` |\n| `SUBAGENT_BASE_URL` | API base URL | Provider default |\n| `SUBAGENT_API_KEY` | API key (required) | - |\n| `SUBAGENT_MODEL` | Default model ID | `gpt-4o-mini` / `claude-sonnet-4-20250514` |\n| `SUBAGENT_MODELS` | JSON model registry | `{}` |\n\n### Using .env File\n\nCreate a `.env` file in the project root:\n\n```bash\n# Provider: 'openai' or 'anthropic'\nSUBAGENT_PROVIDER=openai\n\n# API endpoint (for OpenAI-compatible APIs)\nSUBAGENT_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1\n\n# Your API key\nSUBAGENT_API_KEY=sk-your-api-key-here\n\n# Default model\nSUBAGENT_MODEL=qwen-max\n\n# Model registry (JSON format)\n# Simple format: model name -\u003e model ID\nSUBAGENT_MODELS={\"qwen-max\":\"qwen-max\",\"qwen-turbo\":\"qwen-turbo\",\"qwen-plus\":\"qwen-plus\"}\n```\n\n### Model Registry Format\n\nThe `SUBAGENT_MODELS` environment variable supports two formats:\n\n**Simple format** - Just map names to model IDs (uses default provider settings):\n\n```json\n{\n  \"qwen\": \"qwen-max\",\n  \"gpt4o\": \"gpt-4o-mini\",\n  \"turbo\": \"qwen-turbo\"\n}\n```\n\n**Full config format** - Override provider/baseUrl per model:\n\n```json\n{\n  \"qwen\": {\n    \"provider\": \"openai\",\n    \"modelId\": \"qwen-max\",\n    \"baseUrl\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\",\n    \"apiKey\": \"sk-qwen-key\"\n  },\n  \"claude\": {\n    \"provider\": \"anthropic\",\n    \"modelId\": \"claude-3-5-haiku-latest\",\n    \"baseUrl\": \"https://api.anthropic.com\"\n  },\n  \"local\": {\n    \"provider\": \"openai\",\n    \"modelId\": \"llama3\",\n    \"baseUrl\": \"http://localhost:11434/v1\",\n    \"apiKey\": \"ollama\"\n  }\n}\n```\n\n## Adding to Claude Code\n\n### Basic Setup (Single Model)\n\n```bash\nclaude mcp add -s user subagent \\\n  -e \"SUBAGENT_PROVIDER=openai\" \\\n  -e \"SUBAGENT_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1\" \\\n  -e \"SUBAGENT_API_KEY=your-api-key\" \\\n  -e \"SUBAGENT_MODEL=qwen-max\" \\\n  -- node /path/to/other-mcp/dist/index.js\n```\n\n### Multi-Model Setup\n\n```bash\nclaude mcp add -s user subagent \\\n  -e \"SUBAGENT_PROVIDER=openai\" \\\n  -e \"SUBAGENT_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1\" \\\n  -e \"SUBAGENT_API_KEY=your-api-key\" \\\n  -e \"SUBAGENT_MODEL=qwen-max\" \\\n  -e 'SUBAGENT_MODELS={\"qwen-max\":\"qwen-max\",\"qwen-turbo\":\"qwen-turbo\",\"qwen-plus\":\"qwen-plus\"}' \\\n  -- node /path/to/other-mcp/dist/index.js\n```\n\n### Multi-Provider Setup\n\nFor using multiple providers (e.g., both Qwen and local Ollama):\n\n```bash\nclaude mcp add -s user subagent \\\n  -e \"SUBAGENT_PROVIDER=openai\" \\\n  -e \"SUBAGENT_API_KEY=your-qwen-key\" \\\n  -e 'SUBAGENT_MODELS={\"qwen\":{\"provider\":\"openai\",\"modelId\":\"qwen-max\",\"baseUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\"},\"local\":{\"provider\":\"openai\",\"modelId\":\"llama3\",\"baseUrl\":\"http://localhost:11434/v1\",\"apiKey\":\"ollama\"}}' \\\n  -- node /path/to/other-mcp/dist/index.js\n```\n\n## MCP Tools\n\n### run_agent\n\nRun a LangChain agent with the given prompt (stateless, single-turn).\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `prompt` | string | Yes | The task/prompt for the agent |\n| `system_prompt` | string | No | System prompt for the agent |\n| `max_iterations` | number | No | Max tool iterations (default: 10) |\n| `model` | string | No | Model name from SUBAGENT_MODELS |\n\n**Example:**\n\n```\nmcp__other__run_agent(prompt=\"Summarize the key points of quantum computing\")\nmcp__other__run_agent(prompt=\"Translate to Chinese\", model=\"qwen-turbo\")\n```\n\n### list_models\n\nList all available models configured in SUBAGENT_MODELS.\n\n**Example output:**\n\n```\n## Available Models\n\n| Name | Provider | Model ID | Base URL |\n|------|----------|----------|----------|\n| _default | openai | qwen-max | https://dashscope.aliyuncs.com/compati... |\n| qwen-max | openai | qwen-max | (default) |\n| qwen-turbo | openai | qwen-turbo | (default) |\n| qwen-plus | openai | qwen-plus | (default) |\n\nUse the `model` parameter in `run_agent` to select a model by name.\n```\n\n### create_session\n\nCreate a new conversation session that maintains context across multiple messages.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `model` | string | No | Model name from SUBAGENT_MODELS |\n| `system_prompt` | string | No | System prompt for the session |\n\n**Example:**\n\n```\nmcp__other__create_session(model=\"gpt-5.1\", system_prompt=\"You are a helpful assistant\")\n# Returns: session_id\n```\n\n### send_message\n\nSend a message to an existing session and get a response. The conversation history is preserved.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `session_id` | string | Yes | The session ID to send the message to |\n| `message` | string | Yes | The message to send |\n\n**Example:**\n\n```\nmcp__other__send_message(session_id=\"abc-123\", message=\"Hello, how are you?\")\nmcp__other__send_message(session_id=\"abc-123\", message=\"What did I just say?\")\n# The agent remembers the previous message\n```\n\n### list_sessions\n\nList all active conversation sessions.\n\n**Example output:**\n\n```\n## Active Sessions\n\n| Session ID | Model | Messages | Last Active |\n|------------|-------|----------|-------------|\n| `d7fbfd49...` | gpt-5.1 | 7 | 2025-12-10T07:59:32.956Z |\n\nTotal: 1 session(s)\n```\n\n### get_session_history\n\nGet the conversation history of a specific session.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `session_id` | string | Yes | The session ID to get history for |\n\n### delete_session\n\nDelete a conversation session.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `session_id` | string | Yes | The session ID to delete |\n\n## Agent Tools (Built-in)\n\nThe agent has access to the following read-only tools for exploring the file system:\n\n### read_file\n\nRead the contents of a file.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `file_path` | string | Yes | The path to the file to read |\n| `max_lines` | number | No | Maximum number of lines to read |\n\n### list_directory\n\nList the contents of a directory with file sizes and modification times.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `directory_path` | string | Yes | The path to the directory to list |\n| `show_hidden` | boolean | No | Whether to show hidden files (default: false) |\n\n### grep\n\nSearch for a pattern in files using regular expressions.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `pattern` | string | Yes | The regex pattern to search for |\n| `path` | string | Yes | The file or directory path to search in |\n| `ignore_case` | boolean | No | Whether to ignore case (default: false) |\n| `max_results` | number | No | Maximum number of results per file |\n\n### glob\n\nFind files matching a glob pattern.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `pattern` | string | Yes | The glob pattern to match (e.g., \"*.ts\") |\n| `path` | string | Yes | The directory to search in |\n\n### file_info\n\nGet detailed information about a file or directory.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `file_path` | string | Yes | The path to the file or directory |\n\n## Provider Examples\n\n### Qwen (Alibaba Cloud)\n\n```bash\nSUBAGENT_PROVIDER=openai\nSUBAGENT_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1\nSUBAGENT_API_KEY=sk-your-qwen-key\nSUBAGENT_MODEL=qwen-max\n```\n\n### DeepSeek\n\n```bash\nSUBAGENT_PROVIDER=openai\nSUBAGENT_BASE_URL=https://api.deepseek.com/v1\nSUBAGENT_API_KEY=sk-your-deepseek-key\nSUBAGENT_MODEL=deepseek-chat\n```\n\n### OpenAI\n\n```bash\nSUBAGENT_PROVIDER=openai\n# SUBAGENT_BASE_URL not needed for official OpenAI\nSUBAGENT_API_KEY=sk-your-openai-key\nSUBAGENT_MODEL=gpt-4o-mini\n```\n\n### Anthropic\n\n```bash\nSUBAGENT_PROVIDER=anthropic\n# SUBAGENT_BASE_URL not needed for official Anthropic\nSUBAGENT_API_KEY=sk-ant-your-key\nSUBAGENT_MODEL=claude-3-5-haiku-latest\n```\n\n### Ollama (Local)\n\n```bash\nSUBAGENT_PROVIDER=openai\nSUBAGENT_BASE_URL=http://localhost:11434/v1\nSUBAGENT_API_KEY=ollama\nSUBAGENT_MODEL=llama3\n```\n\n## Development\n\n```bash\n# Build\nnpm run build\n\n# Test tools/list\necho '{\"jsonrpc\":\"2.0\",\"method\":\"tools/list\",\"id\":1}' | node dist/index.js\n\n# Test list_models with config\nexport SUBAGENT_API_KEY=test\nexport SUBAGENT_MODELS='{\"model1\":\"gpt-4o\",\"model2\":\"qwen-max\"}'\necho '{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"name\":\"list_models\",\"arguments\":{}},\"id\":2}' | node dist/index.js\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-l-lambda%2Fother-agent-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk-l-lambda%2Fother-agent-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-l-lambda%2Fother-agent-mcp/lists"}