Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
external_bridge.h File Reference

Unix socket MCP bridge — exposes a running engine to external clients. More...

#include <entropic/entropic_export.h>
#include <entropic/types/config.h>
#include <nlohmann/json_fwd.hpp>
#include <atomic>
#include <chrono>
#include <filesystem>
#include <memory>
#include <mutex>
#include <string>
#include <thread>
#include <unordered_map>
#include <unordered_set>
#include <vector>
Include dependency graph for external_bridge.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  entropic::ExternalBridge
 Unix socket MCP bridge for external client access. More...
 
struct  entropic::ExternalBridge::AsyncTask
 Async task state for background entropic.ask runs. More...
 

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Typedefs

using entropic_handle_t = entropic_engine *
 

Detailed Description

Unix socket MCP bridge — exposes a running engine to external clients.

When mcp.external.enabled is true, the engine starts an ExternalBridge that listens on a unix domain socket and serves JSON-RPC 2.0 (MCP protocol) to external clients such as Claude Code. The bridge operates on the already-configured engine handle — no second engine instance.

Exposed tools:
  • entropic.ask — submit a prompt, get the full response
  • entropic.status — engine version + message count
  • entropic.context_clear — reset conversation
  • entropic.context_count — message count
Socket path:
Uses ExternalMCPConfig.socket_path if set, otherwise derived from the project directory via compute_socket_path().
Thread safety:
The bridge runs a background accept loop. Each connected client is served sequentially (one request at a time). The engine handle's api_mutex serializes access to the engine.
Version
2.0.8

Definition in file external_bridge.h.

Typedef Documentation

◆ entropic_handle_t

Definition at line 49 of file external_bridge.h.