AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified Apache-2.0 Self-run

SPEAR

mcp-lfedgeai-spear · by lfedgeai

Distributed Cloud-Edge Collaborative AI Agent Platform

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add mcp-lfedgeai-spear

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-lfedgeai-spear)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of SPEAR? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

SPEAR Next

SPEAR Next is the Rust/async implementation of SPEAR’s core services:

  • SMS: the metadata/control-plane server.
  • SPEARlet: the node-side agent/runtime.

Chinese README: [README.zh.md](./README.zh.md)

Repository layout

  • src/apps/sms: SMS binary entrypoint
  • src/apps/spearlet: SPEARlet binary entrypoint
  • web-admin/: Web Admin frontend source
  • assets/admin/: built Web Admin static assets embedded/served by SMS
  • samples/wasm-c/: C-based WASM samples (WASI)
  • docs/: design notes and usage guides

Architecture

Quick start

Prerequisites

  • Rust toolchain (latest stable recommended)
  • Docker (Docker Desktop on macOS/Windows, or Docker Engine on Linux)
  • Docker Compose v2 (docker compose)

This repo uses protoc-bin-vendored, so you typically don’t need to install protoc manually.

Run locally with Docker Compose (SMS + SPEARlet)

This is the recommended cross-platform local setup (no Kubernetes required). It runs:

  • SMS (gRPC + HTTP gateway + optional Web Admin)
  • SPEARlet (agent/runtime) connecting to SMS via the Compose network

Use the provided Compose file:

  • deploy/docker/compose.local.yaml

Start:

docker compose -f deploy/docker/compose.local.yaml up -d --build

Useful endpoints (default host ports):

  • SMS health: http://127.0.0.1:18080/health
  • SMS Swagger: http://127.0.0.1:18080/swagger-ui/
  • SPEAR Console (served by SMS): http://127.0.0.1:18080/console
  • SMS Web Admin: http://127.0.0.1:18082/
  • SPEARlet health: http://127.0.0.1:18081/health

Stop:

docker compose -f deploy/docker/compose.local.yaml down

Remove local data (volumes):

docker compose -f deploy/docker/compose.local.yaml down -v

Common build/network notes:

  • If Docker Hub is not reachable, override base images via environment variables (example mirrors):
export NODE_IMAGE=docker.m.daocloud.io/library/node:20-bookworm-slim
export RUST_IMAGE=docker.m.daocloud.io/library/rust:1.91-bookworm
export DEBIAN_IMAGE=docker.m.daocloud.io/library/debian:trixie-slim
docker compose -f deploy/docker/compose.local.yaml up -d --build
  • If you use Local AI Models (llama.cpp), SPEARlet needs llama-server. The Compose file defaults to a build target that includes it. You can override:
SPEARLET_BUILD_TARGET=runtime_with_node_and_llama docker compose -f deploy/docker/compose.local.yaml up -d --build spearlet

Build

make build

# release
make build-release

# build with Rust features (e.g. sled / rocksdb)
make FEATURES=sled build

# enable local microphone capture implementation (optional)
make FEATURES=mic-device build

# macOS shortcut (equivalent to FEATURES+=mic-device)
make mac-build

Run SMS

./target/debug/sms

# enable Web Admin
./target/debug/sms --enable-web-admin --web-admin-addr 127.0.0.1:8081

Useful endpoints:

  • HTTP gateway: http://127.0.0.1:8080
  • Swagger UI: http://127.0.0.1:8080/swagger-ui/
  • OpenAPI spec: http://127.0.0.1:8080/api/openapi.json
  • gRPC: 127.0.0.1:50051
  • Web Admin (when enabled): http://127.0.0.1:8081/admin

Run SPEARlet

SPEARlet connects to SMS once you provide --sms-grpc-addr (then it auto-registers by default).

./target/debug/spearlet --sms-grpc-addr 127.0.0.1:50051

Configuration

Config file locations

  • SMS: ~/.sms/config.toml (or --config )
  • SPEARlet: ~/.spear/config.toml (or --config )

Repo-shipped examples:

  • SMS: config/sms/config.toml
  • SPEARlet: config/spearlet/config.toml

Priority

  1. CLI --config file
  2. Home config (~/.sms/config.toml or ~/.spear/config.toml)
  3. Environment variables (SMS_*, SPEARLET_*)
  4. Built-in defaults

Secrets

Do not put secrets into config files. Use spearlet.ai.credentials[].api_key_env to reference environment variables and bind them from backends via credential_ref.

AI backend notes:

  • [[spearlet.ai.backends]] hosting is required and must be local or remote.
  • credential_ref is optional. If set, the referenced env var must exist (otherwise the backend is filtered). If not set, the backend is treated as “no-auth” (useful for self-hosted proxies).

Ollama discovery

SPEARlet can import models from a local Ollama on startup and materialize them as AI backends.

  • Docs: docs/ollama-discovery-en.md

Routing and debugging

  • Route by model: if some backends are configured with model = "...", requests can be routed by setting only model (no explicit backend required).
  • Observe the selected backend:
  • cchat_recv JSON includes a top-level _spear.backend / _spear.model.
  • Router emits a router selected backend debug log after selection.

Web Admin

Web Admin provides Nodes/Tasks/Files/AI Models pages.

  • AI Models provides an aggregated view across nodes, split into Local/Remote.
  • Local AI Models supports creating/deleting model deployments on a node.

Local model provisioning (llamacpp):

  • model is just a display key; actual download uses params.model_url when the model file is missing.
  • Supported params:
  • model_url: http/https URL to a .gguf file (large files are supported).
  • download_timeout_s: total download budget in seconds (default: 3600).
  • model_path: absolute path, or relative to spearlet.local_models_dir.
  • skip_download=1: fail if the model file is missing (no download).

Docs:

  • docs/web-admin-overview-en.md
  • docs/web-admin-ui-guide-en.md

WASM samples

make samples

Artifacts are written to samples/build/ (WASM-C), samples/build/js/ (WASM-JS), and samples/build/rust/ (WASM-Rust).

Docs:

  • docs/samples-build-guide-en.md
  • samples/README-en.md
  • samples/wasm-js/README-en.md
  • samples/wasm-rust/README-en.md
  • sdk/rust/crates/spear-boa/README.md
  • sdk/rust/crates/spear-wasm-helper/README.md
  • docs/spear-console-voice-input-design-en.md

Development

make help
make dev
make ci

UI tests (Playwright):

make test-ui

Documentation

  • docs/INDEX.md

License

Apache-2.0. See LICENSE.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.