[GH-ISSUE #3718] [BUG]: Custom Agent Works, but MCP Tool Call Fails via AnythingLLM API #2397

Closed
opened 2026-02-22 18:29:29 -05:00 by yindo · 1 comment
Owner

Originally created by @rioultf on GitHub (Apr 25, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3718

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

TL; DR. I wasn't able to make a request to the AnythingLLM API that triggers the use of an MCP server. Has anyone succeeded?

I understand that to call an agent in the sense of custom skill, you need to use the API workspace/{slug}/chat (or stream-chat). I managed to do it:

curl -X 'POST' \
  'http://127.0.0.1:3001/api/v1/workspace/unicaen/chat' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer xxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": "@agent what is the temperature in 48.929557/-0.469883 ? /exit",
  "mode": "chat",
  "sessionId": "identifier-to-partition-chats-by-external-id",
  "reset": false
}'

The response is correct (my agent always returns 10):

{
  "id": "79a1e5df-7568-4e09-97fb-14300959d693",
  "type": "textResponse",
  "sources": [],
  "close": true,
  "error": null,
  "textResponse": "The current temperature at 48.929557, -0.469883 is 10°C.",
  "thoughts": [
    "[debug]: @agent is attempting to call `agent1` tool",
    "Mona Gent-v1.0.0 called with lat:48.929557 long:-0.469883..."
  ]
}

When I ask for the level on sensor 1, which is served by MCP, nothing happens. I managed to do it with the app.

Did I miss something?

Are there known steps to reproduce?

No response

Originally created by @rioultf on GitHub (Apr 25, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3718 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? TL; DR. I wasn't able to make a request to the `AnythingLLM` API that triggers the use of an MCP server. Has anyone succeeded? I understand that to call an agent in the sense of [custom skill](https://docs.anythingllm.com/agent/custom/developer-guide), you need to use the API [workspace/{slug}/chat](http://127.0.0.1:3001/api/docs/#/Workspaces/post_v1_workspace__slug__chat) (or `stream-chat`). I managed to do it: ```bash curl -X 'POST' \ 'http://127.0.0.1:3001/api/v1/workspace/unicaen/chat' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxx' \ -H 'Content-Type: application/json' \ -d '{ "message": "@agent what is the temperature in 48.929557/-0.469883 ? /exit", "mode": "chat", "sessionId": "identifier-to-partition-chats-by-external-id", "reset": false }' ``` The response is correct (my agent always returns 10): ```json { "id": "79a1e5df-7568-4e09-97fb-14300959d693", "type": "textResponse", "sources": [], "close": true, "error": null, "textResponse": "The current temperature at 48.929557, -0.469883 is 10°C.", "thoughts": [ "[debug]: @agent is attempting to call `agent1` tool", "Mona Gent-v1.0.0 called with lat:48.929557 long:-0.469883..." ] } ``` When I ask for *the level on sensor 1*, which is served by MCP, nothing happens. I managed to do it with the app. Did I miss something? ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:29:29 -05:00
yindo closed this issue 2026-02-22 18:29:29 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 25, 2025):

For MCP, we recently added support for the backend API to be able to also load MCP skills in addition to all the others:
https://github.com/Mintplex-Labs/anything-llm/pull/3683

However, this was merged after 1.8.0 was released, so it will be present in the next patch, next week for 1.8.1!

@timothycarambat commented on GitHub (Apr 25, 2025): For MCP, we recently added support for the backend API to be able to also load MCP skills in addition to all the others: https://github.com/Mintplex-Labs/anything-llm/pull/3683 However, this was merged _after_ 1.8.0 was released, so it will be present in the next patch, next week for 1.8.1!
yindo changed title from [BUG]: Custom Agent Works, but MCP Tool Call Fails via AnythingLLM API to [GH-ISSUE #3718] [BUG]: Custom Agent Works, but MCP Tool Call Fails via AnythingLLM API 2026-06-05 14:46:18 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2397