MCP-Inception MCP server

Enables MCP clients communicating with other MCP clients through this MCP server.
Back to servers
Setup instructions
Provider
Tane van Wifferen
Release date
Jan 26, 2025
Language
TypeScript
Stats
26 stars

This MCP-Inception server allows you to call other MCP clients from your MCP client, enabling task delegation and context window offloading. It acts as an agent for your agent, letting you distribute work across multiple LLMs in parallel or sequential workflows.

Installation

Prerequisites

Before installing the MCP-Inception server, you need to set up the MCP client CLI:

  1. Install the MCP client CLI:

    # Follow the installation instructions for mcp-client-cli
    # from https://github.com/adhikasp/mcp-client-cli
    
  2. Create a bash script to run the MCP client (save this as run_llm.sh and make it executable):

    #!/bin/bash
    source ./venv/bin/activate
    llm --no-confirmations
    

Server Installation

  1. Install the package dependencies:

    npm install
    
  2. Build the server:

    npm run build
    
  3. Configure your Claude Desktop to use the server:

    On MacOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json

    On Windows: Edit %APPDATA%/Claude/claude_desktop_config.json

    Add the following configuration:

    {
      "mcpServers": {
        "mcp-inception": {
          "command": "node",
          "args": ["~/path/to/mcp-inception/build/index.js"],
          "disabled": false,
          "autoApprove": [],
          "env": {
            "MCP_INCEPTION_EXECUTABLE": "./run_llm.sh",
            "MCP_INCEPTION_WORKING_DIR": "/path/to/mcp-client-cli-working-dir"
          }
        }
      }
    }
    

Usage

The MCP-Inception server provides several powerful tools for task delegation and distributed processing:

Basic LLM Query

Use the execute_mcp_client tool to ask questions to a separate LLM:

Tool: execute_mcp_client
Parameters: 
{
  "question": "What is the current weather in London?"
}

This will return just the final answer, ignoring any intermediate steps the LLM took.

Parallel Execution

The execute_parallel_mcp_client tool allows you to run the same prompt against multiple inputs in parallel:

Tool: execute_parallel_mcp_client
Parameters:
{
  "mainPrompt": "What is the current time in this city?",
  "inputs": ["London", "Paris", "Tokyo", "Rio", "New York", "Sydney"]
}

This will run the query for each city in parallel and return all results.

Map-Reduce Processing

For more complex distributed processing, use execute_map_reduce_mcp_client:

Tool: execute_map_reduce_mcp_client
Parameters:
{
  "mapPrompt": "Summarize the key points from this document: {item}",
  "reducePrompt": "Combine these summaries into a comprehensive analysis: {accumulator}\n\nNew information: {result}",
  "items": ["document1.txt content...", "document2.txt content...", "document3.txt content..."],
  "initialValue": "Initial analysis framework..."
}

This tool:

  1. Processes each item in parallel using the mapPrompt
  2. Sequentially combines results using the reducePrompt
  3. Returns a final consolidated output

Troubleshooting

If you encounter issues, you can use the MCP Inspector for debugging:

npm run inspector

This will provide a URL to access debugging tools in your browser, which is helpful since MCP servers communicate over stdio.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-inception" '{"command":"node","args":["~/Documents/Cline/MCP/mcp-inception/build/index.js"],"disabled":false,"autoApprove":[],"env":{"MCP_INCEPTION_EXECUTABLE":"./run_llm.sh","MCP_INCEPTION_WORKING_DIR":"/mcp-client-cli working dir"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-inception": {
            "command": "node",
            "args": [
                "~/Documents/Cline/MCP/mcp-inception/build/index.js"
            ],
            "disabled": false,
            "autoApprove": [],
            "env": {
                "MCP_INCEPTION_EXECUTABLE": "./run_llm.sh",
                "MCP_INCEPTION_WORKING_DIR": "/mcp-client-cli working dir"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-inception": {
            "command": "node",
            "args": [
                "~/Documents/Cline/MCP/mcp-inception/build/index.js"
            ],
            "disabled": false,
            "autoApprove": [],
            "env": {
                "MCP_INCEPTION_EXECUTABLE": "./run_llm.sh",
                "MCP_INCEPTION_WORKING_DIR": "/mcp-client-cli working dir"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later