npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fabrx

v1.0.3

Published

MCP server for Fabrx - Build APIs from documents in your IDE

Readme

Fabrx MCP Server

Build APIs from documents directly in your IDE using the Model Context Protocol

Transform documents into production-ready APIs without leaving your code editor. The Fabrx MCP Server integrates seamlessly with MCP-compatible IDEs (Windsurf, Cursor, Claude Desktop) to provide AI-powered API generation.

Features

  • 🔐 Secure Device Authentication - OAuth 2.0 device flow (like GitHub CLI)
  • 📄 Document Processing - Upload PDFs, images, spreadsheets
  • 🏗️ Schema Generation - AI-powered schema extraction
  • 🚀 One-Click Deployment - Deploy APIs instantly
  • 📊 Usage Analytics - Monitor API performance
  • 🛠️ 11 MCP Tools - Full API management from your IDE

Installation

The Fabrx MCP server is available as an npm package. No installation required - use npx to run it directly:

npx fabrx login

Or install globally:

npm install -g fabrx

Requirements:

  • Node.js 18.0.0 or higher
  • MCP-compatible IDE (Windsurf, Cursor, Claude Desktop, etc.)

Quick Start

1. Authenticate

fabrx-mcp login

This will:

  • Open your browser for authorization
  • Show a device code (e.g., ABC-123)
  • Generate and store your API key securely

2. Configure Your IDE

Choose your IDE and follow the configuration instructions:

Config Location: ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "fabrx": {
      "command": "npx",
      "args": ["-y", "fabrx"],
      "env": {
        "FABRX_API_URL": "https://app.fabrx.ai"
      }
    }
  }
}

Note: Restart Windsurf after adding the configuration.

Config Location: ~/.cursor/mcp.json

{
  "mcpServers": {
    "fabrx": {
      "command": "npx",
      "args": ["-y", "fabrx"],
      "env": {
        "FABRX_API_URL": "https://app.fabrx.ai"
      }
    }
  }
}

Or install in one click: Add to Cursor (coming soon)

Note: Restart Cursor after adding the configuration.

Config Locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "fabrx": {
      "command": "npx",
      "args": ["-y", "fabrx"],
      "env": {
        "FABRX_API_URL": "https://app.fabrx.ai"
      }
    }
  }
}

Note: Restart Claude Desktop after adding the configuration.

Config Location: ~/.continue/config.json

{
  "mcpServers": {
    "fabrx": {
      "command": "npx",
      "args": ["-y", "fabrx"],
      "env": {
        "FABRX_API_URL": "https://app.fabrx.ai"
      }
    }
  }
}

Note: Reload VS Code window after adding the configuration.

3. Use in Your IDE

Now you can ask your AI assistant:

"Use Fabrx to create an API from this invoice.pdf"

"Deploy my invoice schema as an API"

"Show me my Fabrx usage stats"

Available Tools

The MCP server provides 11 tools for managing your Fabrx APIs:

Schema Management

  • list_schemas - List all your schemas
  • get_schema - Get schema details
  • create_schema - Create a new schema
  • update_schema - Modify existing schema
  • delete_schema - Remove a schema

API Management

  • list_apis - List deployed APIs
  • get_api - Get API details
  • deploy_schema - Deploy schema as API
  • delete_api - Remove deployed API

Document Processing

  • process_document - Upload and process documents

Account

  • get_usage_stats - View usage statistics

Example Usage

Process a Document

// AI assistant will use this tool automatically
"Process invoice.pdf and create a schema"

The MCP server will:

  1. Read the file
  2. Upload to Typeless
  3. Generate schema with AI
  4. Return the schema structure

Deploy an API

"Deploy my invoice schema as 'invoice-processor' API"

Results in:

  • Live API endpoint
  • Automatic documentation
  • Ready for production use

Check Usage

"What's my API usage this month?"

Returns:

  • API call counts
  • Response times
  • Error rates
  • Cost breakdown

CLI Commands

# Authenticate
fabrx-mcp login

# Check status
fabrx-mcp status

# Start server (usually automatic)
fabrx-mcp start

# Logout
fabrx-mcp logout

# Help
fabrx-mcp help

Configuration

Environment Variables

# Optional: Custom API URL
export FABRX_API_URL=https://fabrx.ai

# Optional: Custom device name
export DEVICE_NAME="My Laptop"

Config File

Configuration is stored in:

  • macOS/Linux: ~/.fabrx/config.json
  • Windows: %USERPROFILE%\.fabrx\config.json
{
  "apiUrl": "https://fabrx.ai",
  "apiKey": "fbx_mcp_xxxxx",
  "deviceName": "My Laptop"
}

Security

Authentication

The Fabrx MCP server uses OAuth 2.0 Device Authorization Grant (RFC 8628), similar to GitHub CLI:

  1. Run fabrx-mcp login
  2. Browser opens with a device code
  3. Sign in and approve the device
  4. API key is generated and stored locally

Security Features

  • Local Storage - API keys stored in ~/.fabrx/config.json (like GitHub CLI)
  • Server-Side Hashing - Keys hashed with SHA-256 before storage
  • One-Time Display - Keys shown only once during login
  • User Approval - Explicit device authorization required
  • Revocable - Keys can be revoked anytime from dashboard

Security Risks & Best Practices

Prompt Injection

Like all LLM integrations, the MCP server is susceptible to prompt injection attacks. An attacker could trick the LLM into executing malicious commands through user content.

Recommendations:

  1. Manual Approval - Always review tool calls before executing (enabled by default in most MCP clients)
  2. Development First - Use with development/staging environments, not production
  3. Least Privilege - Only grant access to necessary resources
  4. Monitor Usage - Regularly check API usage for anomalies
  5. Rotate Keys - Periodically re-authenticate to get fresh keys

Revoking Access

From Dashboard:

  1. Go to https://app.fabrx.ai/settings/devices
  2. Find your device
  3. Click "Revoke Access"

From CLI:

fabrx-mcp logout

If you lose your API key:

  1. Run fabrx-mcp logout
  2. Run fabrx-mcp login again
  3. Approve the new device

Troubleshooting

"Not logged in" error

fabrx-mcp login

"Invalid API key" error

Your key may have been revoked. Re-authenticate:

fabrx-mcp logout
fabrx-mcp login

MCP server not appearing in IDE

  1. Check IDE MCP configuration
  2. Restart IDE after config changes
  3. Verify installation: which fabrx-mcp

Connection errors

Check API URL:

fabrx-mcp status

Verify connectivity:

curl https://fabrx.ai/api/health

Development

Build from Source

git clone https://github.com/fabrx-ai/mcp-server.git
cd mcp-server
npm install
npm run build
npm link

Run Tests

npm test

Development Mode

npm run dev

API Reference

FabrxClient

import { FabrxClient } from '@fabrx/mcp-server';

const client = new FabrxClient(
  'https://fabrx.ai',
  'your-api-key'
);

// List schemas
const schemas = await client.listSchemas();

// Create schema
const schema = await client.createSchema('Invoice', {
  type: 'object',
  properties: {
    total: { type: 'number' },
    date: { type: 'string' }
  }
});

// Deploy API
const result = await client.deploySchema(schema.id, 'invoice-api');
console.log(result.endpoint_url);

DeviceFlowClient

import { DeviceFlowClient } from '@fabrx/mcp-server';

const auth = new DeviceFlowClient('https://fabrx.ai');

const token = await auth.authorize({
  apiUrl: 'https://fabrx.ai',
  deviceName: 'My App',
  openBrowser: true
});

console.log('API Key:', token.access_token);

Examples

Example 1: Process Multiple Documents

// AI: "Process all PDFs in this folder"

// MCP server will:
for (const file of pdfFiles) {
  await processDocument({ file_path: file });
}

Example 2: Batch Deploy APIs

// AI: "Deploy all my schemas"

const schemas = await listSchemas();
for (const schema of schemas) {
  if (schema.status === 'draft') {
    await deploySchema(schema.id, `${schema.name}-api`);
  }
}

Example 3: Monitor Performance

// AI: "How are my APIs performing?"

const stats = await getUsageStats('7d');
console.log(`
  Total Requests: ${stats.total_requests}
  Success Rate: ${stats.success_rate}%
  Avg Response Time: ${stats.avg_response_time}ms
`);

Integrations

Works With

  • Windsurf - AI-powered IDE
  • Cursor - AI code editor
  • Claude Desktop - Anthropic's desktop app
  • ✅ Any MCP-compatible application

Coming Soon

  • VS Code extension
  • JetBrains plugin
  • Emacs package

Resources

  • Documentation: https://fabrx.ai/docs
  • MCP Guide: https://fabrx.ai/docs/mcp
  • API Reference: https://fabrx.ai/docs/api
  • Examples: https://github.com/fabrx-ai/examples
  • Discord: https://discord.gg/fabrx

Support

  • Issues: https://github.com/fabrx-ai/mcp-server/issues
  • Email: [email protected]
  • Discord: https://discord.gg/fabrx

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

MIT © Fabrx

Changelog

v1.0.2 (2025-10-16)

  • 📝 Docs: Enhanced README with IDE-specific configurations following Supabase/Stripe patterns
  • 📝 Docs: Added collapsible IDE sections for better navigation
  • 📝 Docs: Improved security documentation with prompt injection warnings

v1.0.1 (2025-10-16)

  • 🐛 Fix: Browser opening with correct URL (trim newlines from server response)

v1.0.0 (2025-10-13)

  • 🎉 Initial release
  • 🔐 Device flow authentication (OAuth 2.0)
  • 🛠️ 11 MCP tools for full API management
  • 📄 Document processing support
  • 📊 Usage analytics and monitoring

Made with ❤️ by Fabrx

Transform documents into APIs in seconds, not days.