AD

asyrjasalo/dynamic-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

13 stars 7 forks Качество 77 Тренд 20MIT

MCP proxy server that reduces LLM context overhead with on-demand tool loading from multiple upstream servers.

Обзор

MCP proxy server that reduces LLM context overhead by grouping tools from multiple upstream MCP servers and loading tool schemas on-demand. Instead of requiring you to expose all MCP servers upfront (which can consume thousands of tokens), dynamic-mcp exposes only two MCP tools initially. It supports tools, resources, and prompts from upstream MCP servers with stdio, HTTP, and SSE transports, handles OAuth, and automatically retries failed connections. Use uvx to run the PyPI package in your agent's MCP settings: You can set the DYNAMIC_MCP_CONFIG environment variable and omit the config path. Download a release for your operating system and put dmcp in your PATH: Set the DYNAMIC_MCP_CONFIG environment variable and omit the args altogether. The binary is then available at ~/.cargo/bin/dmcp ($CARGO_HOME/bin/dmcp).

README

Показан фрагмент оригинального README. Открыть оригинал.

dynamic-mcp

MCP proxy server that reduces LLM context overhead by grouping tools from multiple upstream MCP servers and loading tool schemas on-demand.

Instead of requiring you to expose all MCP servers upfront (which can consume thousands of tokens), dynamic-mcp exposes only two MCP tools initially.

It supports tools, resources, and prompts from upstream MCP servers with stdio, HTTP, and SSE transports, handles OAuth, and automatically retries failed connections.

Quick Start

Installation

Option 1: Python package

Use uvx to run the PyPI package in your agent’s MCP settings:

{
  "mcpServers": {
    "dynamic-mcp": {
      "command": "uvx",
      "args": ["dmcp", "/path/to/your/dynamic-mcp.json"]
    }
  }
}

You can set the DYNAMIC_MCP_CONFIG environment variable and omit the config path.

Option 2: Native binary

Download a release for your operating system and put dmcp in your PATH:

{
  "mcpServers": {
    "dynamic-mcp": {
      "command": "dmcp"
    }
  }
}

Set the DYNAMIC_MCP_CONFIG environment variable and omit the args altogether.

Option 3: Compile from source

Install from crates.io:

cargo install dynamic-mcp

The binary is then available at ~/.cargo/bin/dmcp ($CARGO_HOME/bin/dmcp).

Import from AI Coding Tools

Dynamic-mcp can automatically import MCP server configurations from popular AI coding tools.

Supported Tools (``):

  • Cursor (cursor)
  • OpenCode (opencode)
  • Claude Desktop (claude-desktop)
  • Claude Code CLI (claude)
  • Visual Studio Code (vscode)
  • Cline (cline)
  • KiloCode (kilocode)
  • Codex CLI (codex)
  • Gemini CLI (gemini)
  • Google Antigravity (antigravity)

Quick Start

Import from project config (run in project directory):

dmcp import 

Import from global/user config:

dmcp import --global 

Force overwrite (skip confirmation prompt):

dmcp import  --force

The command will:

  1. Detect your tool’s config location
  2. Parse the existing MCP servers
  3. Interactively prompt for descriptions
  4. Interactively prompt for feature selection (tools, resources, prompts)
  5. Normalize environment variable formats
  6. Generate dynamic-mcp.json

Example Import

$ dmcp import cursor

🔄 Starting import from cursor to dynamic-mcp format
📖 Reading config from: .cursor/mcp.json

✅ Found 2 MCP server(s) to import

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Server: filesystem
Type: stdio

Config details:
  command: "npx"
  args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]

💬 Enter description for 'filesystem' (what this server does): File operations on /tmp directory

🔧 Keep all features (tools, resources, prompts) for 'filesystem'? [Y/n]:
Открыть полный README на GitHub

Установка

uvx dmcp /path/to/your/dynamic-mcp.json
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "dynamic-mcp": { "command": "uvx", "args": ["dmcp", "/path/to/your/dynamic-mcp.json"] } } }