Skip to content

Continue fails to recognize tools and prompts from mcp server #8258

@sridattasp

Description

@sridattasp

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.2.6
- IDE version: Visual Studio 1.1.04
- Model: mistral-codestral-2501 configured to continue
- config:
  

  
  OR link to agent in Continue hub:

Description

I'm trying to create mcp tool through continue > settings > tool > create mcp server section where I'm expecting a tool & prompt should be auto-triggered based on context given in continue > agent mode

.continue/mcpServers/test-mcp-server.yaml

name: Test Server
version: 0.0.1
schema: v1
mcpServers:
  - name: TestMCP
    command: D:\prj_mcp_2\.venv\Scripts\python.exe
    args:
      - "-u"
      - "D:\\prj_mcp_2\\.continue\\mcpServers\\test-mcp-server.py"

.continue/mcpServers/test-mcp-server.py

import subprocess
from fastmcp import FastMCP
from datetime import datetime
from fastmcp.prompts.prompt import PromptMessage, TextContent

mcp = FastMCP("TestMCP")

def run_continue_prompt(prompt_name: str, context: str) -> str:
    """
    Invokes a Continue prompt (defined in YAML) and returns the output.
    Requires that Continue CLI is available in PATH.
    """
    try:
        result = subprocess.run(
            ["continue", "prompt", prompt_name, "--input", context],
            capture_output=True,
            text=True,
            check=True
        )
        return result.stdout.strip()
    except subprocess.CalledProcessError as e:
        return f"Error running prompt: {e.stderr or str(e)}"

@mcp.tool
def generate_text_file_from_prompt(prompt_name: str, context: str) -> str:
    """
    Calls a Continue prompt and writes its output to a text file.
    """
    output_text = run_continue_prompt(prompt_name, context)

    # Generate a timestamped file
    timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
    filename = f"PromptOutput_{timestamp}.txt"

    # Write output to file
    with open(filename, "w", encoding="utf-8") as f:
        f.write(output_text)

    return f"Text file generated: {filename}"

# Example prompts in MCP
@mcp.prompt
def summarize_text(context: str) -> str:
    """
    Simple prompt that returns a summarized version of context
    """
    # Here you could integrate any summarization logic, for demo we just truncate
    summary = context[:200] + ("..." if len(context) > 200 else "")
    return summary

@mcp.prompt
def ask_about_topic(topic: str) -> PromptMessage:
    content = f"Explain the concept of '{topic}'"
    return PromptMessage(role="user", content=TextContent(type="text", text=content))

if __name__ == "__main__":
    mcp.run()


I'm calling tool from continue > agent mode like below

/TestMCP.generate_text_file_from_prompt prompt_name="summarize_text" context="Long text you want summarized..."

**Expected Result:** To create a summarized text file
**Actual Result:** Continue tried to use the TestMCP generate_and_export_excel tool
I'm sorry, but I'm unable to generate and export the excel file.

Is there a better way to utilize MCP server tools and prompts in continue?

To reproduce

Please refer description section

Log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpRelates to Model Context Protocol (MCP)kind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windows

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions