agent-farm

bjoernbethge/agent-farm

3.2

If you are the rightful owner of agent-farm and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Agent Farm is a DuckDB-powered MCP server with LLM integration via Ollama, designed to facilitate advanced data processing and model interactions.

Tools
3
Resources
0
Prompts
0

🚜 Agent Farm 🦆

Python DuckDB Ollama Docker MCP Query Farm License: MIT

🌾 DuckDB-powered MCP Server with SQL macros for LLM agents - Web Search, Python execution, RAG, and more.

DuckDBOllamaDockerQuery Farm


✨ Features

FeatureDescription
🦆 MCP ServerExposes DuckDB as an MCP server for Claude and other LLM clients
🔍 Auto-DiscoveryAutomatically discovers MCP configurations from standard locations
🤖 LLM IntegrationSQL macros for calling Ollama models (local and cloud)
🛠️ Tool CallingFull function calling support for agentic workflows
🌐 Web SearchDuckDuckGo and Brave Search integration
💻 Shell ExecutionRun shell commands and Python code via UV
📄 Web ScrapingFetch and extract text from web pages
🧠 RAG SupportEmbeddings and vector similarity search
📦 Rich ExtensionsPre-configured with useful DuckDB extensions

📦 DuckDB Extensions

ExtensionTypeDescription
httpfsCoreHTTP/S3 filesystem access
jsonCoreJSON parsing and extraction
icuCoreInternational unicode support
vssCoreVector similarity search
ducklakeCoreDelta Lake / Iceberg support
lindelCoreLinear algebra operations
http_clientCommunityHTTP GET/POST requests
duckdb_mcpCommunityMCP protocol support
jsonataCommunityJSONata query language
shellfsCommunityShell command execution
zipfsCommunityZIP file access

🚀 Installation

Using pip:

pip install agent-farm

Using uv (recommended):

uv add agent-farm

From source:

git clone https://github.com/bjoernbethge/agent-farm.git
cd agent-farm
uv sync --dev

🎯 Quick Start

Run the MCP server:

agent-farm

Or as a module:

python -m agent_farm

🌾 SQL Macros

🤖 Cloud LLM Models (via Ollama)

SELECT deepseek('Explain quantum computing');
SELECT kimi_think('Solve this step by step: ...');
SELECT qwen3_coder('Write a Python function for...');
SELECT gemini('Summarize this text...');

🔍 Web Search

SELECT ddg_instant('Python programming');
SELECT ddg_abstract('machine learning');
SELECT brave_search('DuckDB tutorial');

💻 Shell & Python Execution

SELECT shell('ls -la');
SELECT py('print(2+2)');
SELECT py_with('requests', 'import requests; print(requests.__version__)');
SELECT py_script('script.py');

🌐 Web Scraping

SELECT fetch('https://example.com');
SELECT fetch_text('https://example.com');
SELECT fetch_json('https://api.example.com/data');
SELECT fetch_ua('https://example.com');  -- with User-Agent

📁 File & Git Operations

SELECT read_file('path/to/file.txt');
SELECT git_status();
SELECT git_log(10);
SELECT git_diff();

🧠 RAG & Embeddings

SELECT embed('Hello world');
SELECT semantic_score('query', 'document');
SELECT rag_query('What is the price?', 'Product: Widget, Price: 49.99');
SELECT rag_think('Complex question', 'Long context...');

⚡ Power Macros

SELECT search_and_summarize('What is DuckDB?');
SELECT analyze_page('https://example.com', 'What is this page about?');
SELECT review_code('src/main.py');
SELECT explain_code('src/main.py');
SELECT generate_py('fibonacci function');

🐳 Docker

docker build -t agent-farm .
docker run -v /data:/data -p 8080:8080 agent-farm

📋 Requirements

  • 🐍 Python >= 3.11
  • 🦆 DuckDB >= 1.1.0
  • 🦙 Ollama (for LLM features)

📄 License

MIT License - see for details.


🚜 Happy Farming! 🦆