Fabric MCP Server
Bridge between Fabric AI framework and MCP applications, enabling use of Fabric patterns and models in MCP-compatible environments like IDEs.
README
Fabric MCP Server
| main | develop | |||
|---|---|---|---|---|
<div align="center"> <img src="https://github.com/ksylvan/fabric-mcp/blob/main/docs/logo.png?raw=true" alt="fabric-mcp logo" width="200" height="200"> <a href="https://mseep.ai/app/ksylvan-fabric-mcp"><img src="https://mseep.net/pr/ksylvan-fabric-mcp-badge.png" alt="MseeP.ai Security Assessment Badge" height="200"></a> </div>
Connect the power of the Fabric AI framework to any Model Context Protocol (MCP) compatible application.
This project implements a standalone server that bridges the gap between Daniel Miessler's Fabric framework and the Model Context Protocol (MCP). It allows you to use Fabric's patterns, models, and configurations directly within MCP-enabled environments like IDE extensions or chat interfaces.
Imagine seamlessly using Fabric's specialized prompts for code explanation, refactoring, or creative writing right inside your favorite tools!
Table of Contents
What is this?
- Fabric: An open-source framework for augmenting human capabilities using AI, focusing on prompt engineering and modular AI workflows.
- MCP: An open standard protocol enabling AI applications (like IDEs) to securely interact with external tools and data sources (like this server).
- Fabric MCP Server: This project acts as an MCP server, translating MCP requests into calls to a running Fabric instance's REST API (
fabric --serve).
Key Goals & Features (Based on Design)
- Seamless Integration: Use Fabric patterns and capabilities directly within MCP clients without switching context.
- Enhanced Workflows: Empower LLMs within IDEs or other tools to leverage Fabric's specialized prompts and user configurations.
- Standardization: Adhere to the open MCP standard for AI tool integration.
- Leverage Fabric Core: Build upon the existing Fabric CLI and REST API without modifying the core Fabric codebase.
- Expose Fabric Functionality: Provide MCP tools to list patterns, get pattern details, run patterns, list models/strategies, and retrieve configuration.
- Expose Pattern Prompts: Fabric patterns are also exposed as MCP prompts so users can discover and invoke reusable pattern templates directly through prompt-aware clients.
How it Works
- An MCP Host (e.g., an IDE extension) connects to this Fabric MCP Server.
- The Host discovers available tools (like
fabric_run_pattern) via MCP'slist_tools()mechanism and available Fabric pattern templates via MCP'sprompts/listmechanism. - When the user invokes a tool or prompt (e.g., asking the IDE's AI assistant to refactor code using a Fabric pattern), the Host sends an MCP request to this server.
- The Fabric MCP Server translates the MCP request into a corresponding REST API call to a running
fabric --serveinstance. - The
fabric --serveinstance executes the pattern. - The Fabric MCP Server receives the response (potentially streaming) from Fabric and translates it back into an MCP response for the Host.
Project Status
This project is feature-complete.
The project was completed by using the BMAD-METHOD (Breakthrough Method of Agile Ai-Driven Development).
The core architecture and proposed tools are outlined in the High-Level Architecture Document.
You can also use to explore the source code.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
- Python >= 3.10
- uv (Python package and environment manager) for developers
Installation From Source (for developers)
-
Clone the repository:
git clone https://github.com/ksylvan/fabric-mcp.git cd fabric-mcp -
Install dependencies using uv sync:
uv sync --devThis command ensures your virtual environment matches the dependencies in
pyproject.tomlanduv.lock, creating the environment on the first run if necessary. -
Activate the virtual environment (uv will create it if needed):
-
On macOS/Linux:
source .venv/bin/activate -
On Windows:
.venv\Scripts\activate
-
Now you have the development environment set up!
Installation From PyPI (for users)
If you just want to use the fabric-mcp server without developing it, you can install it directly from PyPI:
# Using pip
pip install fabric-mcp
# Or using uv
uv pip install fabric-mcp
This will install the package and its dependencies. You can then run the server using the fabric-mcp command.
Configuration (Environment Variables)
The fabric-mcp server can be configured using the following environment variables:
FABRIC_BASE_URL: The base URL of the running Fabric REST API server (fabric --serve).- Default:
http://127.0.0.1:8080
- Default:
FABRIC_API_KEY: The API key required to authenticate with the Fabric REST API server, if it's configured to require one.- Default: None (Authentication is not attempted if not set).
FABRIC_MCP_LOG_LEVEL: Sets the logging verbosity for thefabric-mcpserver itself.- Options:
DEBUG,INFO,WARNING,ERROR,CRITICAL(case-insensitive). - Default:
INFO
- Options:
You can set these variables in your shell environment (or put them into a .env file in the working directory) before running fabric-mcp:
export FABRIC_BASE_URL="http://your-fabric-host:port"
# This must match the key used by fabric --serve
export FABRIC_API_KEY="your_secret_api_key"
export FABRIC_MCP_LOG_LEVEL="DEBUG"
# Standard I/O transport (default)
fabric-mcp --stdio
# HTTP Streamable transport for HTTP-based MCP clients
fabric-mcp --http-streamable
# Custom host/port for HTTP transport
fabric-mcp --http-streamable --host 0.0.0.0 --port 3000 --mcp-path /message
Transport Options
The fabric-mcp server supports multiple transport methods:
--stdio: Standard I/O transport for direct MCP client integration (default)--http-streamable: HTTP-based transport that runs a full HTTP server for MCP communication--host: Server bind address (default: 127.0.0.1)--port: Server port (default: 8000)--mcp-path: MCP endpoint path (default: /message)
For more details on transport configuration, see the Infrastructure and Deployment Overview.
Contributing
Read the contribution document here and please follow the guidelines for this repository.
Also refer to the cheat-sheet for contributors which contains a micro-summary of the development workflow.
License
Copyright (c) 2025, Kayvan Sylvan Licensed under the MIT License.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。