Call Desearch tools through MCPJungle
Tested 18 November 2026.
For developers evaluating a local MCPJungle gateway. This example starts MCPJungle in development mode with an in-memory database, registers a loopback Desearch endpoint, and invokes the gateway tool. Registration and its bearer token disappear when the process exits. It does not configure a shared or production gateway.
Tested versions: MCPJungle 0.4.7, Darwin arm64 binary with the SHA-256 checked below. Desearch MCP server: 0.3.3.
Before you begin
Use Node.js 24.16.0, Python 3.12.13 and uv 0.12.1. These examples were tested on macOS with Apple Silicon on 17 November 2026. You need a Desearch API key with available credits, and network access to the npm and Python package registries and Desearch. Set DESEARCH_API_KEY in your shell using your secret manager before running the example. Keep it out of source files.
Desearch API requests use your account credits. Check Desearch pricing for current rates. This example calls the web-search tool once. Search titles and links can change between runs.
Keep the accompanying assets folder beside this guide. Run the commands in that directory. The package lock fixes Desearch MCP server 0.3.3 and its npm dependencies. The Python lock fixes the tested dependency set.
Download the assets
Save these files in an assets folder in your working directory, keeping the paths shown:
Install the pinned dependencies
Run a search
Save this as mcpjungle_search.py in the same directory:
Run it with your API key already present in the environment:
A successful run prints JSON containing a nonempty title and link. The test returned Our Documentation | Python.org. The returned link began with /go/v1/; treat it as a Desearch redirect path, rather than a canonical source URL. The response order and redirect token can change. The example stops its child processes on exit.
Troubleshooting
A missing or empty DESEARCH_API_KEY stops the example before starting either local process. CLI failures print only the operation and exit code, or a generic launch/timeout error. Command arguments, captured output and chained exceptions are suppressed because registration arguments contain the bearer token. Check the local listeners and key through your secret manager before retrying; do not paste credential-bearing commands or raw diagnostics into reports. Starting the stdio Desearch server directly without it produces DESEARCH_API_KEY environment variable is required and a nonzero exit. HTTP discovery can succeed without credentials: tools/list returned 200, while an unauthenticated tools/call returned HTTP 401 with isError: true and instructions to send a bearer token or x-api-key. Successful discovery alone does not prove search access. For a rejected key or insufficient credits, verify the key and account balance before retrying.
Use the Darwin arm64 artifact on Apple Silicon only. If you use a different OS or architecture, choose the appropriate official release and verify its published checksum; that route has not been tested by this guide. MCPJungle names the registered tool desearch__web-search, with two underscores. Its CLI writes the result to stderr, so the example reads both output streams.
The example requires unused loopback ports 19966 and 19967. A startup failure can mean a port is already occupied. It binds to 127.0.0.1 and is intended for a local test.