@breadai/protocol-mcp-client
v0.1.2
Published
MCP client plugin for bread — connect agents to MCP servers (config-level or per-agent) over stdio, Streamable HTTP, or legacy SSE, with credential-aware auth signing.
Maintainers
Readme
@breadai/protocol-mcp-client
Consume Model Context Protocol servers from bread agents:
config-level servers (stdio or Streamable HTTP, with automatic legacy-SSE fallback) shared
across agents, plus per-agent inline external servers under cfg.plugins.mcp_client. Imported
tools are snake_case-sanitized, namespaced <server>__<tool>, permission-tagged
plugin:mcp_client/…, and auth-signed per request (expiring tokens refresh naturally). Speaks
the 2025-11-25 protocol revision by default; set versionNegotiation: { mode: 'auto' } on a
server to probe for 2026-07-28 instead.
bun add @breadai/protocol-mcp-client # or: npm i @breadai/protocol-mcp-clientimport { defineConfig } from '@breadai/core'
import { mcpClient } from '@breadai/protocol-mcp-client'
export default defineConfig({
entrypoints: ['researcher'],
plugins: [
mcpClient({
servers: [{ name: 'filesystem', command: 'npx', args: ['@modelcontextprotocol/server-filesystem', '.'] }],
}),
],
})// agents/researcher/agent.ts — opt this agent into a server (or inline one):
plugins: { mcp_client: { servers: ['filesystem'] } }Part of bread — an explicit-by-design framework for AI agents. Docs: MCP client · all docs.
License
MIT © Matteo Zambon
