Skip to main content

MCP Server for Fabric AI Framework

Project description

Fabric MCP Server

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.

How it Works

  1. An MCP Host (e.g., an IDE extension) connects to this Fabric MCP Server.
  2. The Host discovers available tools (like fabric_run_pattern) via MCP's list_tools() mechanism.
  3. When the user invokes a tool (e.g., asking the IDE's AI assistant to refactor code using a Fabric pattern), the Host sends an MCP request to this server.
  4. The Fabric MCP Server translates the MCP request into a corresponding REST API call to a running fabric --serve instance.
  5. The fabric --serve instance processes the request (e.g., executes the pattern).
  6. 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 currently in the design phase. The core architecture and proposed tools are outlined in the High-Level Design Document.

Next Steps:

  • Select implementation language (Go/Python) and MCP library.
  • Implement the standalone MCP server.
  • Define detailed handling for streaming, variables, attachments, and errors.
  • Gather community feedback.

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)

Installation

From Source (for Development)

  1. Clone the repository:

    git clone https://github.com/ksylvan/fabric-mcp.git
    cd fabric-mcp
    
  2. Install dependencies using uv sync:

    uv sync --dev
    

    This command ensures your virtual environment matches the dependencies in pyproject.toml and uv.lock, creating the environment on the first run if necessary.

  3. 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!

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.

Contributing

Feedback on the design document is highly welcome! Please open an issue to share your thoughts or suggestions.

Read the contribution document here and please follow the guidelines for this repository.

License

Copyright (c) 2025, Kayvan Sylvan Licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fabric_mcp-0.4.0.tar.gz (161.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabric_mcp-0.4.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file fabric_mcp-0.4.0.tar.gz.

File metadata

  • Download URL: fabric_mcp-0.4.0.tar.gz
  • Upload date:
  • Size: 161.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for fabric_mcp-0.4.0.tar.gz
Algorithm Hash digest
SHA256 65f74284f12b7c06e690c0e12bfe68b6c12db2ed147f0bd253a3797410249e2a
MD5 0c3647ffe39c5e6b8baed4ee065d0afd
BLAKE2b-256 1b4ee7f9f825e26f60232a44a82d6006d1b81d3c6d6d2ce0306e96b034bc5a28

See more details on using hashes here.

File details

Details for the file fabric_mcp-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fabric_mcp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20d02dbd37641be28f0de1c62552678c38987fa0fb675b703f0874ee7b8328ea
MD5 450aa17e4967b221de1d18c9fcfa18f1
BLAKE2b-256 7d0f4f6f7b075fde717dd7e85d8ba0cb8d81b4b1659bd13f78285bcf56bed635

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page