Skip to content

Feature Request: Allow Custom Initialization Context in Chat Mode (--system-prompt / --init-prompt) #152

@ChristianWeinrich

Description

@ChristianWeinrich

Feature Request: Custom System Prompt or Init Prompt for Chat Mode

Hi 👋 — first off: great work on mcp-cli, I really enjoy using it!
There’s one feature I’d really love to see for the chat mode.


What’s missing?

Currently, the chat mode uses a fixed internal system prompt, which cannot be modified.
In many workflows, though, I want to inject specific context at the start of a session — either by:

  • fully replacing the system prompt, or
  • extending it with a prefix or postfix, or
  • (as a fallback) injecting an initial user prompt right after startup.

Use case example

For GitHub repositories and GH MCP Server, I often want to scope the conversation like this:

ALL following prompts are related to the organization '$ORG' and the repository '$REPO'.
Only change this if the user explicitly overrides it.

Right now, I have to paste that every time manually — which gets tedious.


Proposed solution

Introduce CLI options to control the initialization context for chat sessions:

✅ Option A: Full control via system prompt override

--system-prompt "<TEXT>"

Replaces the internal system prompt completely.


✅ Option B: Fine-grained control via prefix/postfix

--system-prompt-prefix "<TEXT>"
--system-prompt-postfix "<TEXT>"

Inserts text before/after the default system prompt.
These flags would be mutually exclusive with --system-prompt.


✅ Optional fallback: init as first user prompt

--init-prompt "<TEXT>"

Adds the given text as the first user message (if overriding the system prompt is too invasive to implement right away).


Expected behavior

  1. If --system-prompt is given → internal system prompt is replaced
  2. If prefix/postfix is given → internal system prompt is modified
  3. If --first-prompt is given → added as initial user message after system prompt
  4. If nothing is passed → behavior stays exactly as today

Let me know if you'd be open to this — I'd be happy to help implement it or contribute a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions