Skip to main content

A simple Altibase MCP server

Project description

Altibase MCP Server

Overview

  • A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through Altibase. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
  • It is based on https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite and modified for Altibase.

Components

Resources

The server exposes a single dynamic resource:

  • memo://insights: A continuously updated business insights memo that aggregates discovered insights during analysis
    • Auto-updates as new insights are discovered via the append-insight tool

Prompts

The server provides a demonstration prompt:

  • mcp-demo: Interactive prompt that guides users through database operations
    • Required argument: topic - The business domain to analyze
    • Generates appropriate database schemas and sample data
    • Guides users through analysis and insight generation
    • Integrates with the business insights memo

Tools

The server offers six core tools:

Query Tools

  • read_query

    • Execute SELECT queries to read data from the database
    • Input:
      • query (string): The SELECT SQL query to execute
    • Returns: Query results as array of objects
  • write_query

    • Execute INSERT, UPDATE, or DELETE queries
    • Input:
      • query (string): The SQL modification query
    • Returns: { affected_rows: number }
  • create_table

    • Create new tables in the database
    • Input:
      • query (string): CREATE TABLE SQL statement
    • Returns: Confirmation of table creation

Schema Tools

  • list_tables

    • Get a list of all tables in the database
    • No input required
    • Returns: Array of table names
  • describe_table

    • View schema information for a specific table
    • Input:
      • table_name (string): Name of table to describe
    • Returns: Array of column definitions with names and types

Analysis Tools

  • append_insight
    • Add new business insights to the memo resource
    • Input:
      • insight (string): Business insight discovered from data analysis
    • Returns: Confirmation of insight addition
    • Triggers update of memo://insights resource

Prereqisite

Unixodbc setting example for Linux

  • install : sudo apt-get install unixodbc-dev
  • example configuration :
$ cat /etc/odbc.ini 
[PYODBC]
Driver          = /home/hess/work/altidev4/altibase_home/lib/libaltibase_odbc-64bit-ul64.so
Database        = mydb
ServerType      = Altibase
Server          = 127.0.0.1
Port            = 21121
UserName        = SYS
Password        = MANAGER
FetchBuffersize = 64
ReadOnly        = no

$ cat /etc/odbcinst.ini 
[ODBC]
Trace=Yes
TraceFile=/tmp/odbc_trace.log

ODBC DSN setting example for Windows

  • Altibase Windows ODBC driver is registered during Altibase Windows client installation procedure.
  • Add a ODBC DSN for Altibase.
  • example configuration :
[Altibase Connection Config]
Windows DSN Name: PYODBC
host(name or IP): 192.168.1.210
Port(default 20300): 21121
User: SYS
Password: MANAGER
Database: mydb
NLS_USE: UTF-8

Usage with Claude Desktop

  • Install Claude for desktop.

uv

  • Install uv
  • uv is a fast Python package installer and resolver, aiming to be a drop-in replacement for pip and pip-tools.
# Add the server to your claude_desktop_config.json
"mcpServers": {
  "altibase": {
    "command": "uv",
    "args": [
      "--directory",
      "path/to/repository/directory",
      "run",
      "mcp-server-altibase",
      "--odbc-dsn",
      "PYODBC"
    ]
  }
}

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_altibase-0.0.1.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_altibase-0.0.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_altibase-0.0.1.tar.gz.

File metadata

  • Download URL: mcp_server_altibase-0.0.1.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mcp_server_altibase-0.0.1.tar.gz
Algorithm Hash digest
SHA256 14154e86ccde0241559133ee318c7969e237582b1f8d62d1f0b34711a5daed18
MD5 6bdf1c1259e310206582596503600a57
BLAKE2b-256 ba24a3fa37350df228190e0c173fe37f323debd48d1f6b2e5c02a8daac766e02

See more details on using hashes here.

File details

Details for the file mcp_server_altibase-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_altibase-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a15079ea6ddc7c9ca9a5734d34e3866b5bd996ee99fdbc56c8b7af1287d72fab
MD5 b7e8f1be8bfd637c2515d0e4073cf6d3
BLAKE2b-256 5d15fe4dd3ec582e6b932a9fa9f786c509997249b5dbfb540a6aaf12bd6d52a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page