0.1.1 โ€ข Published 9 months ago

@monkdb/monkdb-mcp v0.1.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
9 months ago

@monkdb/monkdb-mcp

Modular Command Protocol (MCP) Server for MonkDB โ€“ enabling LLMs to interact with MonkDB securely and efficiently using standardized tools like run_select_query, describe_table, health_check, and more.

npm license typescript build tests status


โœจ What is This?

This is an MCP server implementation in TypeScript for MonkDB, enabling:

  • LLM frameworks like Claude, LangChain, CrewAI, and others to interact with MonkDB.
  • Secure, controlled SQL access to MonkDB clusters.
  • Extensible plug-and-play architecture to add new tools and utilities.

๐Ÿš€ Features

  • โœ… Supports SELECT queries with parameterized inputs
  • ๐Ÿ“‹ Lists and describes MonkDB tables
  • ๐Ÿฉบ Provides health and version check utilities
  • ๐Ÿ” Uses environment-based credentials for safety
  • ๐Ÿ“ฆ Exports a clean API with startMonkDBMCPServer() entry point
  • ๐Ÿงช Production-ready with Jest-style unit tests

๐Ÿ“ฆ Installation

npm install @monkdb/monkdb-mcp

๐Ÿ› ๏ธ Usage

As a CLI (via stdio transport)

// server.mts
import { startMonkDBMCPServer } from '@monkdb/monkdb-mcp';

await startMonkDBMCPServer();

Run the server with:

node build/server.mjs

Or use in your MCP host like Claude Desktop, LangChain, etc.

๐Ÿ”ง Configuration

Create a .env file or use environment variables:

MONKDB_HOST=127.0.0.1
MONKDB_API_PORT=4200
MONKDB_USER=your_user
MONKDB_PASSWORD=your_password
MONKDB_SCHEMA=monkdb  # Optional (defaults to monkdb)

๐Ÿงฐ Supported Tools

Tool NameDescription
list_tablesLists tables under MONKDB_SCHEMA
run_select_queryExecutes SELECT queries (others are blocked)
health_checkRuns SELECT 1 to verify DB connectivity
get_server_versionReturns server version using SELECT version()
describe_tableLists columns and types of a table

๐Ÿงช Running Tests

This package includes unit tests using vitest. To run:

npm install
npm run build
npm vitest

๐Ÿงฉ Integrations

Can be used with:

  • โœ… Claude Desktop (via stdio)
  • โœ… LangChain or equivalents (as a tool or plugin)
  • โœ… CrewAI or equivalents (via custom agent tools)
  • โœ… CLI scripts or microservices needing DB interface

๐Ÿ“„ License

This project is licensed under Apache-2.0.

Contact Us

You may reach out to us at support@monkdb.com