Skip to main content

Add your description here

Project description

Meta Prompt MCP

This project is an implementation of the Meta-Prompting technique from the paper "Meta-Prompting: Enhancing Language Models with Task-Agnostic Scaffolding".

At its core, this MCP transforms a standard Language Model (LM) into a dynamic, multi-agent system without the complex setup. It works by having the LM adopt two key roles:

  1. The Conductor: A high-level project manager that analyzes a complex problem, breaks it down into smaller, logical subtasks, and delegates them.
  2. The Expert: Specialized agents (e.g., "Python Programmer," "Code Reviewer," "Creative Writer") that are "consulted" by the Conductor to execute each subtask.

The magic is that this entire collaborative workflow is simulated within a single LM. The Conductor and Experts are different modes of operation guided by a sophisticated system prompt, allowing the model to reason, act, and self-critique its way to a more robust and accurate solution. It's like having an automated team of AI specialists at your disposal, all powered by one model.

Meta Prompt Server MCP server

Demo

Demo Video

Getting Started

1. Clone the Repository

First, clone this repository to your local machine.

git clone https://github.com/tisu19021997/meta-prompt-mcp-server.git .
cd meta-prompt-mcp-server

2. Install uv

This project uses uv, an extremely fast Python package manager from Astral. If you don't have it installed, you can do so with one of the following commands.

Note: use which uv to know the path of your uv installation.

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

For more details, see the official uv installation guide.

Usage

To use this Meta Prompt MCP server, you need to configure your client (e.g., Cursor, Claude Desktop) to connect to it. Make sure to replace the placeholder paths with the actual paths on your machine.

Cursor

Add the following configuration to your mcp.json settings:

"meta-prompting": {
  "command": "path/to/your/uv",
  "args": [
    "--directory",
    "path/to/your/meta-prompt-mcp",
    "run",
    "mcp-meta-prompt"
  ]
}

Claude Desktop

Add the following configuration to your claude_desktop_config.json settings:

"meta-prompting": {
  "command": "path/to/your/uv",
  "args": [
    "--directory",
    "path/to/your/meta-prompt-mcp",
    "run",
    "mcp-meta-prompt"
  ]
}

Activating the Meta-Prompt Workflow

Important: To leverage the full power of this MCP, always start your request by invoking the meta_model_prompt (then fill in the query with your prompt, see Demo video) from the meta-prompting server. This is the official entry point that activates the Conductor/Expert workflow. Once the prompt is added, simply provide your problem statement.

How it Differs from the Paper

The core methodology in the original paper involves a two-step process for expert consultation:

  1. The "conductor" model generates instructions for an expert.
  2. A separate, independent LM instance (the "expert") is invoked with only those instructions to provide a response. This ensures the expert has "fresh eyes."

This implementation simplifies the process into a single LLM call. The conductor model generates the expert's name, instructions, and the expert's complete output within a single tool call. This is a significant difference that makes the process faster and less expensive, but it deviates from the "fresh eyes" principle of the original research.

Limitations

The expert_model tool in this MCP server is designed to use the ctx.sample() function to properly simulate a second, independent expert model call as described in the paper. However, this function is not yet implemented in most MCP clients (such as Cursor and Claude Desktop).

Due to this limitation, the server includes a fallback mechanism. When ctx.sample() is unavailable, the expert_model tool simply returns the output content that was generated by the conductor model in the tool call. This means the expert's response is part of the conductor's single generation, rather than a true, independent consultation.

Comparison

Below is two conversations I asked Claude to implement the Meta Prompt MCP Server itself, with and without Meta Prompt MCP.

Some artifacts are missing from the conversation but you could see the implementation with Meta Prompt MCP is much better, and it also did kind of "self-reviewing" by consulting a QA expert.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0.tar.gz (830.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 830.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b05178f09d03dc585d423c3fabdd3d6ce63faf1ac3995b1a240efd590937a3f
MD5 c1868ca417ffd4a343f35bbc70ddb3c5
BLAKE2b-256 df3b2b883b08d672be9931a8827877a39f153da0d73dd8c37c8ad3261cc64e1d

See more details on using hashes here.

File details

Details for the file iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_tisu19021997_meta_prompt_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dfe6bd6f16ffb2837cd76459713981e176abd7d561a3618deff4ace64f01da5
MD5 59f163d9bd77e6ade7355d407a1a7865
BLAKE2b-256 c21d8f7866eddd666834c8955032465b4493e5dcf1dc96dd3d29b3bc74875c38

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page