MCP Server Returns Wrong/Generic Responses in n8n Chat

Hi everyone,

I’m currently testing an MCP integration between n8n and the YouTrack (Issue tracker) MCP server.

The MCP server itself appears to work correctly, because when using the same server from Zed Editor, I get accurate results from YouTrack.

However, when using the MCP through an n8n AI chat (or also a workflow with an AI agent) , the responses are incorrect or generic.

Setup

  • n8n Chat
  • MCP Server: YouTrack MCP
  • Authentication: Bearer token
  • MCP endpoint:
    https://youtrack.server.url/mcp

The same endpoint and bearer token are used in both n8n and Zed Editor.


Problem

When asking a question like:

“What is the newest issue in project IT?”

the n8n chat returns something unrelated like:

This appears to be a response from a Knowledge Base search that returned no results (the articlesPage array is empty).

How can I help you with your articles?

- Search for articles
- View an article
- Create a new article
- Update an article

This suggests the MCP tool call may not be interpreted correctly, or the agent may be selecting the wrong MCP capability/tool.


Expected Behavior

When asking the exact same question in Zed Editor using the same MCP server, I get the correct result:

Based on the search results, the newest issue in the YouTrack Project "IT" is:

IT-5077 — <title>

Created: May 15, 2026
Reporter: <name>
Type: Task
State: Submitted

So the MCP server itself appears functional.


Questions

  1. Has anyone seen a same/similar behavior and knows how to resolve it?

Additional Notes

  • No obvious execution errors appear in n8n

  • The MCP connection test succeeds

  • The issue seems to be related to how the AI agent chooses or interprets MCP tools

  • I am currently comparing behavior between:

    • same MCP endpoint
    • same bearer token
    • same underlying model (qwen 3.6 via ollama)

Any ideas or debugging tips would be appreciated.

Or is this something I should rase on the n8n github?

Currently running on n8n Version 2.17.5 (self hosted).

Maybe this is related to this? Reddit - Please wait for verification or MCP Server: Connection successful but tools are not being invoked by n8n - #6 by Gregs ?

The wrong tool selection is the core issue. The n8n AI agent uses the MCP tool list returned at connection time to decide which tool to call. If tool names or descriptions are ambiguous or overlapping, the LLM picks the wrong one.

A few things to check:

  1. Open the MCP node in n8n and look at the tool list it discovers. Compare the tool names to what Zed is using. YouTrack MCP likely exposes separate tools for articles and for issues. The agent is matching your prompt to the articles search tool instead of the issues tool.

  2. The model matters here. Qwen 3.6 via Ollama has weaker tool routing than GPT-4o or Claude. Try the same prompt with a stronger model. If it works with a different model and fails with Qwen, the issue is model-side not n8n-side.

  3. Add a system prompt to your AI agent node that explicitly names which tools to use for which types of queries. Something like: To search for issues in YouTrack, use the search_issues tool. This steers the LLM toward the right tool when descriptions alone are not distinctive enough.

  4. You are on 2.17.5 which is behind current. MCP tool call handling has had fixes in recent releases. Worth testing on the latest before going to GitHub.

hi @Njo_D, good morning!

which tools/capabilities is the MCP exposing?
is the agent able to differentiate them correctly?
have you tested an extremely explicit instruction, something like “use the issue search tool only”, to see if the problem is agent routing and not the MCP?
i would also try to capture the actual tool traces/MCP calls in n8n to confirm which capability the agent is selecting. right now the response suggests it’s falling back to the Knowledge Base tool, but we still need to validate whether the problem is in n8n’s agent routing or in the response returned by the MCP server itself.