fleet-mcp-server

fleet-mcp-server

Enables semantic search, recommendations, and similar crate lookups for Rust crates via vector embeddings.

Category
访问服务器

README

Fleet MCP Server

A Model Context Protocol (MCP) server that exposes the SuperInstance fleet-vector-api as structured tools, enabling any MCP-compatible AI agent (Claude, ForgeCode, Cursor) to perform semantic crate search, recommendation, and index inspection over the SuperInstance crate registry.

Why It Matters

The SuperInstance fleet contains hundreds of Rust crates, and finding the right one by keyword search is unreliable — crate names rarely describe what an algorithm does. By bridging the fleet-vector-api (384-dimensional BGE embeddings) into the MCP tool protocol, this server lets AI agents query crates the same way a developer asks a colleague: "I need a shortest-path algorithm that handles negative weights." The agent receives ranked results with similarity scores and can chain multiple queries to build dependency graphs. Without this bridge, agents would need custom HTTP integration; with it, any MCP client gains fleet awareness in zero lines of integration code.

How It Works

The MCP protocol defines a standard for exposing tools to LLM agents via JSON-RPC over stdio. This server registers four tools with the @modelcontextprotocol/sdk:

Client (Claude/ForgeCode)
    ↕  JSON-RPC 2.0 over stdio
fleet-mcp-server (this repo)
    ↕  HTTPS POST/GET
fleet-vector-api (Cloudflare Worker)
    ↕  Vectorize index: fleet-crates (384-dim BGE-small-en-v1.5)

Tool registration uses Zod schemas for parameter validation. Each tool handler receives typed arguments, constructs an HTTP request to the fleet-vector-api, and returns the JSON response wrapped in MCP's content format ( { type: "text", text: JSON.stringify(data) }).

Semantic search (fleet_search): The query string is sent to the vector API, which embeds it using @cf/baai/bge-small-en-v1.5 and performs cosine similarity against the 384-dimensional index. Results are ranked by similarity score in O(N · D) where N is the number of vectors and D = 384.

Recommendation (fleet_recommend): Given a known crate name, the API retrieves that crate's embedding and finds nearest neighbors — crates whose descriptions are semantically close. This is k-nearest-neighbor search in embedding space, O(N · D) per query.

Quick Start

# Install and build
npm install
npm run build

# Run as a stdio MCP server (for integration with Claude Desktop, etc.)
node dist/index.js

# Configure in Claude Desktop's claude_desktop_config.json:
# {
#   "mcpServers": {
#     "fleet": {
#       "command": "node",
#       "args": ["/path/to/fleet-mcp-server/dist/index.js"]
#     }
#   }
# }

API

Tool Description Parameters
fleet_search Semantic search across all crates query: string, topK?: number
fleet_recommend Recommend crates related to a known one crate_name: string, topK?: number
fleet_similar Find similar crates by exact name name: string
fleet_stats Index statistics (vector count, dimensions) none

Architecture Notes

This server is a stateless adapter in the SuperInstance fleet stack. It sits between MCP-compatible AI agents and the fleet-vector-api Cloudflare Worker. It contributes to the γ + η = C conservation law by reducing coordination overhead (γ): agents don't need custom API integration code, shrinking the glue layer. The fleet-vector-api itself uses Cloudflare Vectorize for ANN search. See the Architecture document for fleet topology.

Transport: The server uses StdioServerTransport, reading JSON-RPC messages from stdin and writing responses to stdout. This is the standard MCP transport for local integrations — no network socket needed, no port conflicts. The server process is spawned by the client (e.g., Claude Desktop) and communicates via pipes.

References

  • Model Context Protocol Specification, Anthropic (2024). https://modelcontextprotocol.io/specification
  • BGE-small-en-v1.5 embedding model: Xiao et al., "C-Pack: Packaged Resources To Advance General Chinese Embedding," SIGIR 2024.
  • Cloudflare Vectorize Documentation. https://developers.cloudflare.com/vectorize/
  • Zod Schema Validation: https://zod.dev

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选