intermcp 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +39 -21
  2. package/index.js +17 -5
  3. package/package.json +22 -2
package/README.md CHANGED
@@ -10,30 +10,38 @@
10
10
  ```
11
11
 
12
12
  ### Ultra-Fast, Safe Model Context Protocol (MCP) Engine & Multiplexing Hub in Pure Rust
13
- **Sub-millisecond dispatch • 457,000+ ops/sec*< 3.8 MB RAM • SafeFS Sandboxing • 1-Click Multi-IDE Setup**
14
-
15
- *Originally engineered for low-latency AI tool execution on the **Interlayer** blockchain; 100% open-source for the global developer ecosystem.*
16
-
17
- [![Crates.io](https://img.shields.io/badge/crates.io-v0.2.0-orange.svg?style=for-the-badge&logo=rust)](https://crates.io/crates/intermcp)
18
- [![npm](https://img.shields.io/badge/npm-v0.2.0-CB3837.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/intermcp)
19
- [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](LICENSE)
20
- [![CI Status](https://img.shields.io/badge/CI-passing-brightgreen.svg?style=for-the-badge&logo=githubactions)](https://github.com/Bharathcoorg/intermcp)
21
- [![Memory](https://img.shields.io/badge/RAM-<3.8MB-purple.svg?style=for-the-badge)](https://github.com/Bharathcoorg/intermcp)
22
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg?style=for-the-badge)](CONTRIBUTING.md)
23
-
24
- [Quickstart](#-1-click-installation--setup) • [Benchmarks](#-benchmarks) • [Key Features](#-key-features) • [Rust](#-rust-sdk-usage) • [TypeScript](#-typescript--node-sdk) • [Python](#-python-client--agent-usage) • [Go](#-go-client-usage) • [PHP](#-php-client-usage) • [Guides](#-developer-guides) • [Security](#-security--vulnerability-reporting)
13
+ **Sub-millisecond dispatch • pending benchmark • SafeFS Sandboxing • 1-Click Multi-IDE Setup**
14
+
15
+ *Ultra-fast, safe Model Context Protocol (MCP) engine and multiplexing hub in pure Rust, built for Interlayer Blockchain and open for all.*
16
+
17
+ <p align="center">
18
+ <a href="https://crates.io/crates/intermcp"><img src="https://img.shields.io/crates/v/intermcp.svg?style=for-the-badge&logo=rust" alt="Crates.io" /></a>
19
+ <a href="https://www.npmjs.com/package/intermcp"><img src="https://img.shields.io/npm/v/intermcp.svg?style=for-the-badge&logo=npm" alt="npm" /></a>
20
+ <a href="https://pypi.org/project/intermcp/"><img src="https://img.shields.io/pypi/v/intermcp.svg?style=for-the-badge&logo=pypi" alt="PyPI" /></a>
21
+ <a href="https://github.com/Bharathcoorg/intermcp/releases/tag/v0.3.0"><img src="https://img.shields.io/github/v/release/Bharathcoorg/intermcp?style=for-the-badge&logo=github" alt="GitHub release" /></a>
22
+ <a href="https://github.com/Bharathcoorg/intermcp/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Bharathcoorg/intermcp/ci.yml?branch=main&style=for-the-badge&logo=githubactions" alt="CI Status" /></a>
23
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge" alt="License: MIT" /></a>
24
+ </p>
25
+
26
+ | Platform / Ecosystem | Package Registry | Install Command | Links / Badges |
27
+ | :--- | :--- | :--- | :--- |
28
+ | **Rust (CLI Binary)** | **crates.io** | `cargo install intermcp` | [![crates.io](https://img.shields.io/crates/v/intermcp.svg)](https://crates.io/crates/intermcp) • [crates.io/crates/intermcp](https://crates.io/crates/intermcp) |
29
+ | **Rust (Library SDK)** | **crates.io** | `cargo add intermcp` | [docs.rs/intermcp](https://docs.rs/intermcp) |
30
+ | **JavaScript / TypeScript** | **npm** | `npm install intermcp` | [![npm](https://img.shields.io/npm/v/intermcp.svg)](https://www.npmjs.com/package/intermcp) • [npmjs.com/package/intermcp](https://www.npmjs.com/package/intermcp) |
31
+ | **Python** | **PyPI** | `pip install intermcp` | [![PyPI](https://img.shields.io/pypi/v/intermcp.svg)](https://pypi.org/project/intermcp/) • [pypi.org/project/intermcp](https://pypi.org/project/intermcp) |
32
+ | **Go** | **Go Modules** | `go get github.com/Bharathcoorg/intermcp/go/intermcp@v0.3.0` | [pkg.go.dev/github.com/Bharathcoorg/intermcp/go/intermcp](https://pkg.go.dev/github.com/Bharathcoorg/intermcp/go/intermcp) |
33
+ | **PHP** | **Packagist** | `composer require bharathcoorg/intermcp` | [packagist.org/packages/bharathcoorg/intermcp](https://packagist.org/packages/bharathcoorg/intermcp) |
34
+ | **Standalone Binaries** | **GitHub Releases** | Prebuilt binaries for Linux, macOS (ARM & Intel), Windows | [GitHub Releases](https://github.com/Bharathcoorg/intermcp/releases) |
25
35
 
26
36
  ---
27
37
 
28
- </div>
29
-
30
38
  ## 💡 Overview
31
39
 
32
40
  The **Model Context Protocol (MCP)** standardizes how language models (Claude Desktop, Cursor, Windsurf, Zed) interface with external developer tools, file systems, and databases.
33
41
 
34
42
  **`InterMCP`** is a minimal-dependency, pure Rust implementation of the MCP specification (2024-11-05), engineered for high-throughput, low-latency, and memory-constrained environments:
35
43
  - **Low-Latency Routing**: sub-millisecond in-process dispatch (see bench).
36
- - **Minimal Footprint**: Operates in under 3.8 MB of resident memory (RSS).
44
+ - **Minimal Footprint**: Operates with minimal resident memory (RSS; pending benchmark).
37
45
  - **SafeFS Sandboxing**: Canonical path containment preventing unauthorized directory traversal and symlink escapes.
38
46
  - **Universal Multiplexing Hub**: Spawns, health-checks, and aggregates multiple external MCP servers into a single stdio pipe.
39
47
  - **Dynamic Tool Discovery**: Reduces LLM context token consumption by injecting tool schemas on demand.
@@ -74,10 +82,18 @@ npx intermcp serve
74
82
 
75
83
  #### Option B: Via Cargo (Rust Developers)
76
84
  ```bash
85
+ # Install the standalone binary globally
77
86
  cargo install intermcp
87
+
88
+ # Or install precompiled binary instantly without compilation:
89
+ cargo binstall intermcp
90
+
91
+ # Run 1-click configuration
78
92
  intermcp setup
79
93
  ```
80
94
 
95
+ > 💡 **Compilation Note**: `cargo install` compiles `ring` from source, which requires a standard C compiler (`gcc`, `clang`, or MSVC). On minimal Linux containers (like Alpine or minimal Docker), install `build-essential` or use the 1-click prebuilt shell installer (`curl -fsSL https://raw.githubusercontent.com/Bharathcoorg/intermcp/main/install.sh | sh`).
96
+
81
97
  ---
82
98
 
83
99
  ## 🎯 Supported IDEs & AI Environments
@@ -106,9 +122,9 @@ Micro-benchmarks conducted on an AMD Ryzen 9 / Apple Silicon system processing 5
106
122
  | Metric | Reference Node.js SDK (`@modelcontextprotocol/sdk`) | Reference Python SDK (`mcp`) | **InterMCP (Pure Rust)** |
107
123
  | :--- | :---: | :---: | :---: |
108
124
  | **Cold Boot Latency** | 420 ms | 680 ms | **0.4 ms** |
109
- | **Memory Footprint (RSS)** | 162 MB | 114 MB | **< 3.8 MB** |
125
+ | **Memory Footprint (RSS)** | 162 MB | 114 MB | **pending benchmark** |
110
126
  | **Average Dispatch Latency** | 45.0 ms | 62.0 ms | **sub-millisecond (< 5 µs in-process)** |
111
- | **Throughput (Single Core)** | 1,420 ops/s | 890 ops/s | **457,042 ops/s\*** |
127
+ | **Throughput (Single Core)** | 1,420 ops/s | 890 ops/s | **pending benchmark** |
112
128
  | **Runtime Dependencies** | Node.js + npm dependencies | Python 3.10+ + virtualenv | **None (Static Binary)** |
113
129
 
114
130
  Reproduce locally with:
@@ -173,8 +189,8 @@ Any environment variables containing sensitive keys (`API_KEY`, `SECRET`, `TOKEN
173
189
  ### 7. Deterministic Query Micro-Caching (`--cache`)
174
190
  Caches read-only, idempotent operations (such as system diagnostics) using SHA-256 fingerprinting. Read/write filesystem tools remain uncached to guarantee fresh data.
175
191
 
176
- ### 8. ADR 001: Signed Execution Receipts & Provenance (`--receipts`)
177
- Generates tamper-evident cryptographic receipts for every tool execution using RFC 8785 JSON Canonicalization Scheme (JCS) and HMAC-SHA256 digital signatures. Authenticate offline with:
192
+ ### 8. ADR 001: HMAC-Authenticated Execution Receipts & Provenance (`--receipts`)
193
+ Generates tamper-evident cryptographic receipts for every tool execution using RFC 8785 JSON Canonicalization Scheme (JCS) and HMAC-SHA256 authentication codes. Authenticate offline with:
178
194
  ```bash
179
195
  intermcp verify-receipts audit.receipts.json --key secret-key
180
196
  ```
@@ -222,7 +238,7 @@ max_calls_per_minute = 60
222
238
  ```
223
239
 
224
240
  ### 14. Dynamic Data-Flow Taint Tracking (`src/taint.rs`)
225
- Enforces MCP-native confidentiality and provenance labels (`Public`, `Internal`, `Confidential`, `Untrusted`). Prevents untrusted web search data or community upstream inputs from flowing directly into privileged sinks (`system_run_command`, writing executable scripts) without human supervisor approval.
241
+ Enforces MCP-native confidentiality and provenance labels (`Public`, `Internal`, `Confidential`, `Untrusted`). Prevents untrusted web search data or community upstream inputs from flowing directly into privileged sinks (`system_run_command`, writing executable scripts) without human supervisor approval. Note: Taint propagation across unstructured text transformations is cooperative and tracked on structured JSON envelopes.
226
242
 
227
243
  ### 15. WebAssembly Module Inspector (`src/wasm.rs`)
228
244
  WASM module inspector (validates header, version, declared memory, exports — does NOT execute bytecode in an isolated VM).
@@ -239,6 +255,8 @@ Implements the **2024-11-05 Model Context Protocol specification**:
239
255
  - `system_info`, `system_run_command`
240
256
  - `intermcp_search_tools` (when `--smart-discovery` is enabled)
241
257
 
258
+ > ⚠️ **Disclaimer**: The Gravity DEX tools in this release return hardcoded placeholder data. They are demo/stub and MUST NOT be used for trading, valuation, or financial decisions.
259
+
242
260
  ### Resources (`resources/list`, `resources/read`)
243
261
  - `system://diagnostics`: Host architecture, CPU, and process memory telemetry.
244
262
 
@@ -264,7 +282,7 @@ use serde_json::json;
264
282
 
265
283
  #[tokio::main]
266
284
  async fn main() -> Result<()> {
267
- let mut server = Server::new("custom-server", "0.2.0");
285
+ let mut server = Server::new("custom-server", "0.3.0");
268
286
 
269
287
  server.add_tool(Box::new(SimpleTool::new(
270
288
  "calculate_hash",
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** InterMCP Node.js / TypeScript SDK v0.2.0 */
1
+ /** InterMCP Node.js / TypeScript SDK v0.3.0 */
2
2
  const { spawn } = require("child_process");
3
3
  const readline = require("readline");
4
4
  const path = require("path");
@@ -6,6 +6,7 @@ const path = require("path");
6
6
  class InterMcpClient {
7
7
  constructor(options = {}) {
8
8
  this.plugin = options.plugin || null;
9
+ this.binaryPath = options.binaryPath || null;
9
10
  this.proc = null;
10
11
  this.rl = null;
11
12
  this.requestId = 0;
@@ -15,15 +16,26 @@ class InterMcpClient {
15
16
  async start() {
16
17
  const isWin = process.platform === "win32";
17
18
  const binaryName = isWin ? "intermcp.exe" : "intermcp";
18
- const binPath = path.join(__dirname, "target", "release", binaryName);
19
+ const defaultRelease = path.join(__dirname, "target", "release", binaryName);
20
+ const defaultDebug = path.join(__dirname, "target", "debug", binaryName);
21
+
22
+ let cmd = this.binaryPath;
23
+ if (!cmd) {
24
+ if (require("fs").existsSync(defaultRelease)) {
25
+ cmd = defaultRelease;
26
+ } else if (require("fs").existsSync(defaultDebug)) {
27
+ cmd = defaultDebug;
28
+ } else {
29
+ cmd = "cargo";
30
+ }
31
+ }
19
32
 
20
- const cmd = require("fs").existsSync(binPath) ? binPath : "cargo";
21
33
  const args = cmd === "cargo"
22
34
  ? ["run", "--manifest-path", path.join(__dirname, "Cargo.toml"), "--", "serve", ...(this.plugin ? ["--plugin", this.plugin] : [])]
23
35
  : ["serve", ...(this.plugin ? ["--plugin", this.plugin] : [])];
24
36
 
25
37
  this.proc = spawn(cmd, args, {
26
- stdio: ["pipe", "pipe", "inherit"],
38
+ stdio: ["pipe", "pipe", "pipe"],
27
39
  });
28
40
 
29
41
  this.rl = readline.createInterface({
@@ -51,7 +63,7 @@ class InterMcpClient {
51
63
  // Handshake
52
64
  await this.request("initialize", {
53
65
  protocolVersion: "2024-11-05",
54
- clientInfo: { name: "intermcp-node-client", version: "0.2.0" },
66
+ clientInfo: { name: "intermcp-node-client", version: "0.3.0" },
55
67
  });
56
68
  }
57
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intermcp",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Ultra-fast, safe Model Context Protocol (MCP) engine and multiplexing hub in pure Rust, built for Interlayer Blockchain and open for all",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -22,12 +22,32 @@
22
22
  "keywords": [
23
23
  "mcp",
24
24
  "model-context-protocol",
25
+ "mcp-server",
26
+ "mcp-client",
27
+ "mcp-runtime",
28
+ "mcp-hub",
25
29
  "ai",
30
+ "ai-agents",
31
+ "agentic-ai",
32
+ "autonomous-agents",
33
+ "function-calling",
34
+ "tool-calling",
35
+ "blockchain",
36
+ "interlayer",
37
+ "interlayer-blockchain",
38
+ "web3",
39
+ "decentralized-ai",
26
40
  "claude",
41
+ "claude-desktop",
27
42
  "cursor",
43
+ "windsurf",
44
+ "cline",
28
45
  "llm",
46
+ "llm-tools",
29
47
  "rust",
30
- "agent",
48
+ "systems-programming",
49
+ "safefs",
50
+ "zero-trust",
31
51
  "developer-tools"
32
52
  ],
33
53
  "author": "Bharath B R <bharathcoorg7@gmail.com>",