Skip to content

steve-goldberg/NocoBot

Repository files navigation

NocoBot

Telegram Bot + Python SDK for Self-Hosted NocoDB

License: AGPL-3.0 Python 3.10+

Chat with your NocoDB databases through Telegram. Powered by an LLM agent with 62 MCP tools.


📰 News

  • 2026-03-12 🏷️ Renamed repo to NocoBot — bot takes the spotlight
  • 2026-03-12 🛡️ Security lockdown: default-deny access, API key leak prevention, error sanitization
  • 2026-03-12 ⚡ Persistent MCP sessions with lazy reconnect — no more per-call handshakes
  • 2026-03-12 💬 Progressive text streaming and markdown table rendering in Telegram
  • 2026-03-12 🔧 Rate limiting, session management, and media handling (photos/voice/docs)
  • 2026-03-12 🐛 Hardened nocobot: 12 issues closed, 25+ fixes shipped
  • 2026-02-15 🔄 FastMCP 3.0.2 upgrade, CLI env var passthrough fix
  • 2026-02-14 🤖 nocobot — Telegram bot with NocoDB MCP agent integration
  • 2026-02-14 📦 Monorepo restructure for independent Dokploy deployment
  • 2026-02-13 ⌨️ Auto-generated CLI via FastMCP generate-cli
  • 2026-02-12 📚 Doc tools for mcp-remote compatibility
  • 2026-02-11 🚀 FastMCP 3.0 upgrade with Streamable HTTP transport
  • 2026-02-11 📦 Schema export tools and workflow prompts
  • 2026-02-11 🐳 Dokploy deployment guide for remote MCP

What is NocoBot?

NocoBot is a Telegram bot that lets you query and manage your self-hosted NocoDB databases using natural language. Ask it to list tables, create records, update fields, or export data — it figures out the right API calls and does it for you.

Under the hood, NocoBot connects an LLM (Claude, GPT, or any OpenRouter model) to NocoDB through the Model Context Protocol (MCP). The bundled Python SDK exposes 60 tools covering the full NocoDB API, which the bot's agent loop calls as needed to fulfill your requests.


Key Features

Telegram Bot

  • Natural language interface — ask questions, get answers from your database
  • LLM-powered agent loop — automatic tool selection and multi-step reasoning
  • Progressive text streaming — responses appear incrementally, not all at once
  • Media support — send photos, voice, audio, and documents
  • Per-user rate limiting — configurable token bucket (10 msg/60s default)
  • Session management — multi-turn conversations with automatic history trimming
  • Default-deny access control — allowlist-based, secure by default
  • Commands/new (clear history), /stop (cancel processing), /help

NocoDB SDK + MCP Server + CLI

  • Python SDK — full v3 Data API + hybrid v2/v3 Meta API (123 tests)
  • MCP Server — 60 tools for Claude Desktop and AI integrations (FastMCP 3.0)
  • CLI — 60 commands auto-generated from MCP server
  • Self-hosted first — built for community edition, not enterprise

Architecture


Quick Start

NocoBot (Telegram)

# Install
pip install git+https://github.com/steve-goldberg/NocoBot.git#subdirectory=nocobot

# Configure
export TELEGRAM_TOKEN="your-telegram-bot-token"
export OPENROUTER_API_KEY="your-openrouter-key"
export NOCODB_MCP_URL="http://your-mcp-server/mcp"
export TELEGRAM_ALLOW_FROM='["your_telegram_username"]'

# Run
python -m nocobot

NocoDB MCP Server

# Install with MCP server
pip install "nocodb[cli,mcp] @ git+https://github.com/steve-goldberg/NocoBot.git#subdirectory=nocodb"

# Configure
export NOCODB_URL="http://localhost:8080"
export NOCODB_TOKEN="your-api-token"

# Run MCP server (HTTP)
python -m nocodb.mcpserver --http --port 8000

# Or use the CLI directly
nocodb records list BASE_ID TABLE_ID

Python SDK

from nocodb import APIToken
from nocodb.infra.requests_client import NocoDBRequestsClient

client = NocoDBRequestsClient(APIToken("your-token"), "http://localhost:8080")
records = client.records_list_v3(base_id, table_id)

Monorepo Structure

Service Path Description Dokploy Context
nocobot /nocobot/ Telegram bot with MCP agent nocobot
nocodb /nocodb/ Python SDK + MCP Server + CLI nocodb

Documentation

Document Description
Deploy Bot Telegram bot Dokploy deployment
Deploy MCP MCP server Dokploy deployment
SDK Python client API reference
CLI Command-line interface usage
MCP Server AI assistant integration
Filters Query filter system

Recent Changes

  • Persist tool calls and results to conversation history for better multi-turn conversations
  • Media file size limit (20MB) and disk cap (500MB) for safe media handling
  • Hardened error messages — no more leaking NocoDB internals to users
  • Persistent MCP session with lazy reconnect (no more per-call TCP handshakes)
  • TTL eviction for stale sessions and rate limiter buckets
  • Progressive text streaming and markdown table rendering
  • Default-deny access control and API key leak prevention

Contributing

See CONTRIBUTING.md for guidelines.


License

AGPL-3.0

SDK based on nocodb-python-client by Samuel Lopez Saura (MIT 2022).

About

Talk to your NocoDB databases through Telegram. An LLM-powered agent that turns natural language into API calls, with full schema control and workflow guides, backed by a complete Python SDK for self-hosted NocoDB.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages