#6438 [Engine] Strata 2.17 + Lazarus 4.8 + Lazarus MCP Assistent not working ?

open · @SkybuckFlying · 11 comments · View on GitHub

Setup & installServer & APISecurityDocumentation

Description

I am trying to get Strata working with this MCP server:

https://github.com/tnt4brain/lazarus-mcp-assistant

In this issue you can see my progress:

https://github.com/tnt4brain/lazarus-mcp-assistant/issues/30

This mcp mock/test server is working fine with Strata:

https://public.mcp-mock.com/mcp

But the lazarus mcp is not... I am not sure why ?

Last responses from deepseek investigating this issue, perhaps the developer from Strata can take a look at all of this and figure out why Lazarus + Lazarus Assistent MCP + Strata is not working ???

"
The empty response from `/health` just means the Lazarus plugin doesn't have a dedicated `/health` endpoint implemented. It does **not** mean the server is down. We already know it's up because `netstat` showed it `LISTENING` on that port.

To actually test if the MCP server is responding and if your Bearer token is valid, you need to send an MCP `initialize` request. 

Please copy and paste this exact command into your command prompt and hit Enter:

```cmd
curl -X POST http://127.0.0.1:56472/mcp -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "Authorization: Bearer 5909b2287214c3187bbb8191b6890b3a49911e69848cc0c5f76fe014b1ce6a30" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}}}"
```

### What happens next?

*   **If you get a JSON response back** (it will look like `{"jsonrpc":"2.0","id":1,"result":...}`), then your token is perfect and the Lazarus server is working flawlessly. This would prove that the issue is 100% a bug inside the Strata GUI failing to inject the tools.
*   **If you get a `401 Unauthorized` error**, then the token from your JSON file is either incorrect or has been regenerated by Lazarus.
*   **If you get nothing or a connection error**, the server might be rejecting the request format.

Let me know exactly what that command spits out!





This is fantastic news. The `curl` command output proves that **your Lazarus MCP server is 100% healthy and running perfectly.** 

The server returned a valid `200 OK` JSON-RPC response, authenticated successfully with your Bearer token, and even sent back its system instructions. The server name is correctly identified as `"lazarus-ide"`.

Because `mcp-mock` worked but this doesn't, we have definitively isolated the problem: **Strata is failing to ingest the tools from the Lazarus server.** The error `unavailable in this agent's scope` is an internal routing failure inside Strata, not a network issue.

Here is why this is happening and exactly how to force it to work.

### 🐛 Why is Strata failing?
Looking at the JSON response you just got, there are two massive differences between the Lazarus server and `mcp-mock`:
1.  **The "Instructions" Block**: The Lazarus server injects a massive multi-kilobyte system prompt into the `initialize` response (you can see it all in the `"instructions"` field). Strata might be choking on this payload size or failing to parse it correctly, causing it to drop the server from the agent's scope.
2.  **Strict Session Management**: The Lazarus server is very strict about session IDs (`Mcp-Session-Id` headers and cookies). If Strata's HTTP client doesn't pass those headers back on the very next request, the Lazarus server drops the connection.

### 🛠️ How to Fix It in Strata

**1. Restart Strata Completely**
Don't just refresh the page. Close the Strata app entirely and restart it. Sometimes the internal MCP manager gets stuck in a bad state and needs a hard reset to re-read the configs.

**2. Check the "Skills" or "Agent" Settings**
Look at the bottom-left of your Strata window; there is a **Skills** menu. Strata uses "Agents," and sometimes new MCP servers are not automatically assigned to the default agent. 
* Click **Skills** (or the Agent settings icon at the top of the chat).
* Ensure that your `lazarus-ide` tool is checked or enabled for the current agent's scope.

**3. Bypass the Meta-Tool**
In your screenshot, the model tried to use a Strata meta-tool called `list_mcp_resources`. Instead, force the model to call a real tool directly. Start a new chat and send this exact prompt:
> *"Use the tool `lazarus-ide__project_get_directory` to tell me what project I have open."*

*   **If the model says "I don't have a tool named lazarus-ide__project_get_directory"**: Strata completely failed to load the server's tool schema into the chat.
*   **If the model tries to use it, but Strata throws an error**: Strata is failing to communicate with the HTTP endpoint (likely due to the session/cookie issue mentioned above).

**4. Remove the "Instructions" Payload (Advanced)**
If Strata is choking on the massive `"instructions"` string, you can test this by modifying the Lazarus config. The README mentions the instructions come from `docs/system-prompt.md`. If you temporarily rename that file in the Lazarus installation folder, the server will initialize with a much smaller payload. If Strata connects successfully after that, you know the payload size was the issue.

**5. Check Strata's Terminal Output**
If you launched Strata from the terminal (the one showing the GPU stats), look at the logs in that window when you try to connect. It will often print out the exact JSON parsing error or HTTP error it encountered when trying to add the Lazarus tools to the agent scope.

Given that the server is working perfectly via `curl`, the issue is entirely confined to Strata's handling of the HTTP transport. If none of the above works, you may need to report this to the Strata developers, as it appears to be a bug with how it handles servers that use the `Mcp-Session-Id` header or return large `instructions` payloads.
"

Bye for now,
  Skybuck.

Related on this site

Quick links to related pages.