Fabric MCP Server for Cline AI Execution
Enable AI-driven task execution with the Fabric MCP server, integrating Fabric patterns into Cline to expose tools and enhance Cline's capabilities.
npx -y @adapoet/fabric-mcp-serverOverview
The Fabric MCP Server is a lightweight Model Context Protocol (MCP) implementation designed to expose tool APIs for Cline-based AI agents. It maps Fabric-style tool patterns into an HTTP/WebSocket-compatible server so that language models and assistants using Cline can discover, invoke, and monitor external tools in a standardized way. The server acts as a bridge between AI execution logic and real-world actions (shell commands, file operations, HTTP calls, custom scripts), enabling safe, auditable tool use from agent prompts.
This server is useful for developers building AI-driven workflows and agent integrations: it centralizes tool registration, enforces simple access controls, and provides a JSON-based protocol for request/response streaming and status updates. Use it to prototype tool-backed agents, attach tools to Cline clients, or orchestrate multi-step tasks where an LLM delegates actions to deterministic tooling.
Features
- MCP-compatible endpoints for tool discovery and invocation
- Registerable tool patterns including command, file, and HTTP utilities
- JSON request/response with support for streaming/partial output
- Simple token-based authentication and configurable CORS
- Lightweight Python-based server for local development and deployment
- Logging and audit trails for executed tool calls
- Extensible plugin pattern to add custom tool handlers
Installation / Configuration
Prerequisites: Python 3.9+ and a virtual environment. Replace commands with your preferred package manager if needed.
Clone the repository and install dependencies:
Start the server with the provided module entrypoint (default host 127.0.0.1, port 8080):
# run with defaults
# specify host/port and token
Configuration can be supplied via a YAML/JSON file or environment variables. Example YAML (config.yaml):
server:
host: 0.0.0.0
port: 8080
cors:
token: "replace-with-secret"
tools:
- id: shell.exec
type: shell
description: Execute shell commands (restricted)
allow_args: true
- id: files.read
type: file
description: Read files from workspace
base_path: /workspace
Run with a config file:
Docker example (build locally):
Available Tools / Resources
The server exposes a discoverable list of registered tools and their schemas. Common built-in resources include:
- GET /v1/tools — list available tools and metadata
- POST /v1/execute — invoke a tool (JSON body)
- GET /v1/execute/{id}/status — check execution status
- WebSocket /v1/stream/{run_id} — subscribe to streaming output/events
- GET /health — simple readiness/liveness probe
Typical tool types provided out of the box:
- shell — execute shell commands with argument sanitization
- file — read/write operations bounded to a base path
- http — make outbound HTTP requests (useful for APIs)
- script — run a registered script/function inside the server process
Authentication is handled by a token header (Authorization: Bearer Agent-driven CI helper File-aware code assistant Orchestration of multi-step tasks Safe production integrations For source code, issues, and contributions, see the project on GitHub: https://github.com/adapoet/fabric-mcp-server.Use Cases
Getting started tips