Environment
- Semble version: v0.1.10
- OS: macOS (darwin)
- Agent: OpenCode (Claude Code-compatible MCP client)
- Python/uv: uvx via
uvx --from "semble[mcp]" semble
- Repo size: Java project, ~48 relevant files for JDBC module
Description
When using the Semble MCP server through an agent harness (OpenCode), the semble_search tool consistently returns MCP error -32001: Request timed out on the first several queries. The exact same queries work immediately via the CLI.
Reproduction Steps
- Configure Semble as MCP server in the agent config:
{
"mcp": {
"semble": {
"type": "local",
"command": ["uvx", "--from", "semble[mcp]", "semble"]
}
}
}
- Start agent session and invoke semble_search with any query:
- Query: JDBC type conversion ResultSet PreparedStatement DataType
- Mode: hybrid or bm25
- top_k: 1–5
- repo:
- Result: MCP error -32001: Request timed out (repeated across 5+ attempts)
- Run the same query via CLI:
uvx --from "semble[mcp]" semble search "AbstractJdbcRowDataConverter"
Result: Returns results in ~1 second.
Expected Behavior
MCP tool should return search results within a reasonable timeout, matching CLI performance.
Actual Behavior
MCP tool times out with MCP error -32001: Request timed out on every attempt. CLI works fine with same repo and query.
Additional Context
- CLI version works correctly after a manual semble search run
- No ~/.cache/semble directory exists (first run)
- MCP server appears to start successfully (no startup errors)
- Timeout occurs even with minimal query (DataType, bm25 mode, top_k: 1)
- After CLI indexing, MCP tool eventually works on subsequent calls
- Suggests the MCP server may not be handling initial indexing asynchronously or may have a different timeout/initialization path than CLI
Possible Causes
- MCP server initialization blocks on indexing without proper async handling
- MCP transport layer timeout is too short for cold-start indexing
- Index cache path differs between CLI and MCP server (~/.cache/semble not created)
- MCP server may not be reusing the same index location as CLI
Workaround
Run semble search via CLI once to pre-build the index, then MCP tool works on subsequent calls.
Environment
uvx --from "semble[mcp]" sembleDescription
When using the Semble MCP server through an agent harness (OpenCode), the
semble_searchtool consistently returnsMCP error -32001: Request timed outon the first several queries. The exact same queries work immediately via the CLI.Reproduction Steps
{ "mcp": { "semble": { "type": "local", "command": ["uvx", "--from", "semble[mcp]", "semble"] } } }uvx --from "semble[mcp]" semble search "AbstractJdbcRowDataConverter"
Result: Returns results in ~1 second.
Expected Behavior
MCP tool should return search results within a reasonable timeout, matching CLI performance.
Actual Behavior
MCP tool times out with MCP error -32001: Request timed out on every attempt. CLI works fine with same repo and query.
Additional Context
Possible Causes
Workaround
Run semble search via CLI once to pre-build the index, then MCP tool works on subsequent calls.