A Desktop Extension (DXT) that provides seamless access to Infactory's data analysis and API generation capabilities through Claude Desktop and other MCP clients.
Infactory transforms articles, data, and archives into AI-ready formats that can be safely queried, cited and licensed. This DXT extension provides a complete workflow from data upload to API deployment.
- Data Management: Upload CSV files and manage datasources
- Query Generation: Auto-generate queries or create custom ones from natural language
- API Deployment: Publish query programs as live API endpoints
- Chat Integration: Explore data through conversational interfaces
- Project Management: Create and manage projects and teams
- Download the DXT file
- Open Claude Desktop
- Go to Settings > Extensions
- Click "Install from file" and select the
.dxt
file - Configure your Infactory API key in the extension settings (see Configuration section below)
# Clone the repository
git clone https://github.com/infactory/infactory-mcp.git
cd infactory-mcp
# Install dependencies
npm install
# Build the extension
npm run build
# Package as DXT
npm run dxt:pack
The package is also available on npm as @infactory/infactory-mcp
:
# Install globally
npm install -g @infactory/infactory-mcp
# Or use with npx
npx @infactory/infactory-mcp
The extension requires configuration through the DXT user interface. After installation, you'll need to configure the following settings:
- Infactory API Key: Your Infactory API key (get this from your Infactory dashboard)
- This is a sensitive field that will be stored securely
- Required for all API operations
- Infactory API Base URL: API base URL (defaults to
https://api.infactory.ai
)- Only change this if you're using a custom Infactory instance
- Optional field with a sensible default
Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json
file:
{
"mcpServers": {
"infactory-mcp": {
"command": "npx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
Note: Replace nf--YOUR_API_KEY_HERE
with your actual Infactory API key.
Cursor
Add this to your Cursor MCP config file (usually at ~/.cursor/mcp.json
):
{
"mcpServers": {
"infactory-mcp": {
"command": "npx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
Windsurf
Add this to your Windsurf MCP config file:
{
"mcpServers": {
"infactory-mcp": {
"command": "npx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
VS Code
Add this to your VS Code MCP config file:
{
"mcp": {
"servers": {
"infactory-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
}
Zed
Add this to your Zed settings.json
:
{
"context_servers": {
"infactory-mcp": {
"command": {
"path": "npx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
},
"settings": {}
}
}
}
Cline
Add this to your Cline MCP settings:
{
"mcpServers": {
"infactory-mcp": {
"command": "npx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
},
"disabled": false,
"autoApprove": []
}
}
}
Using Alternative Package Managers
{
"mcpServers": {
"infactory-mcp": {
"command": "bunx",
"args": ["-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
{
"mcpServers": {
"infactory-mcp": {
"command": "deno",
"args": ["run", "--allow-env", "--allow-net", "npm:@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
Windows Configuration
For Windows users, the configuration is slightly different:
{
"mcpServers": {
"infactory-mcp": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@infactory/infactory-mcp"],
"env": {
"NF_API_KEY": "nf--YOUR_API_KEY_HERE",
"NF_BASE_URL": "https://api.infactory.ai"
}
}
}
}
-
Get Your Team ID
get_current_user
-
Create a Project
create_project {"name": "My Analysis Project", "teamId": "team-..."}
-
Upload CSV Data
upload_csv {"projectId": "proj-...", "filePath": "/path/to/data.csv", "datasourceName": "My Data"}
-
Check Processing Status
get_datasource_status {"datasourceId": "ds-..."}
-
Generate Queries
autogenerate_queries {"projectId": "proj-...", "count": 3}
-
Run a Query
run_query_program {"projectId": "proj-...", "queryProgramId": "qp-..."}
-
Create Custom Query
create_query_from_nl {"projectId": "proj-...", "question": "What is the average value by category?"}
-
Publish as API
publish_query_program {"queryProgramId": "qp-..."}
get_current_user
- Get user profile and team informationcreate_project
- Create a new projectlist_projects
- List all projects in a teamdelete_project
- Delete a project
upload_csv
- Upload a CSV file to create a datasourceget_datasource_status
- Check datasource processing statusdelete_datasource
- Delete a datasource
autogenerate_queries
- Generate starter queries based on datacreate_query_from_nl
- Create query from natural languagelist_query_programs
- List all query programs in a project
run_query_program
- Execute a query programpublish_query_program
- Publish query as live API
list_apis
- List deployed APIslist_api_endpoints
- List API endpointscall_live_api
- Call a live API endpoint
create_conversation
- Start a chat sessionsend_chat_message
- Send a message in chatget_conversation_graph
- Get conversation interaction graph
- Node.js 18+
- npm or yarn
- TypeScript
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Validate DXT manifest
npm run dxt:validate
# Run the MCP inspector to test tools
npm run inspector
# Or use npx directly
npx @modelcontextprotocol/inspector npx @infactory/infactory-mcp
# Build and package as DXT
npm run dxt:pack
This creates a .dxt
file that can be distributed and installed in Claude Desktop.
The extension includes comprehensive error handling:
- Timeout Management: All API calls have appropriate timeouts
- Configuration Validation: Ensures required settings are present
- Graceful Degradation: Handles network and API errors gracefully
- Detailed Logging: Provides clear error messages for debugging
- API keys are stored securely using the host's secure storage
- Sensitive configuration fields are marked appropriately
- All API calls use HTTPS with proper authentication
-
"NF_API_KEY not set"
- Ensure you've configured the "Infactory API Key" in the extension settings
- Verify the key is valid in your Infactory dashboard
- Check that the configuration was saved properly
-
"Could not get default team ID"
- Check your API key permissions
- Ensure you have access to at least one team
-
File upload failures
- Verify the file path exists and is accessible
- Check file size limits (typically 100MB)
- Ensure the file is a valid CSV
-
Query execution timeouts
- Large datasets may take longer to process
- Consider breaking data into smaller chunks
- Check your Infactory plan limits
-
Module resolution issues
- Try using
bunx
instead ofnpx
if you encounter module errors - Ensure Node.js v18 or higher is installed
- Use
@infactory/infactory-mcp@latest
to get the latest version
- Try using
Enable debug logging by setting the DEBUG
environment variable:
DEBUG=* npm run dev
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
MIT License - see LICENSE file for details.
- Documentation: https://docs.infactory.ai
- Issues: GitHub Issues
- Email: [email protected]
- Initial DXT release
- Complete MCP server implementation
- All core Infactory functionality
- Comprehensive error handling and timeouts
- DXT packaging and validation