home / mcp / sp database mcp server

SP Database MCP Server

sp 4a architecture mcp

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jjvvv-sp-enterprise-mcp": {
      "command": "uvx",
      "args": [
        "sp-database-mcp[postgresql]"
      ],
      "env": {
        "DATABASE_URL": "postgresql://user:password@host:port/database"
      }
    }
  }
}

SP Database MCP Server provides a real-time MCP endpoint that exposes database table structure information to AI assistants. It supports multiple database types, can query either low-code schema definitions or traditional database metadata, and can automatically generate up-to-date table structure docs for use in your MCP workflows.

How to use

You run the MCP server locally or remotely and connect your MCP client to it. The server can be accessed via standard IO-based runners (stdio) or remotely through an HTTP-based MCP endpoint if configured. When you query for a table’s structure, you get a detailed description of the table and its columns, including business-context field descriptions when available.

The server prioritizes two query modes. First, it uses the low-code system schema so you get rich, business-oriented field descriptions. If that mode cannot fulfill the request, it falls back to traditional database metadata to return technical field information. This ensures you always get up-to-date and complete table structure information for common databases like MySQL and PostgreSQL.

How to install

Prerequisites: you need Python installed (and optionally Node tools if you intend to use two setup methods). You also need access to a database you want to expose.

Install via Python package index with PostgreSQL support included or install the PostgreSQL-only variant as needed.

pip install "sp-database-mcp[postgresql]"
```

```bash
uv add "sp-database-mcp[postgresql]"
```

# Optional: install only MySQL support
pip install sp-database-mcp[mysql]
pip install sp-database-mcp[postgresql]

Additional sections

Configuration is driven by environment variables. The primary variable is the database connection string. You can point the server to PostgreSQL or MySQL by setting DATABASE_URL to the appropriate connection string. You may also configure an API URL if you intend to fetch data from an external API instead of a local database.

Typical environment variables you will use include:

- DATABASE_URL: connection string for the database (e.g., postgresql://user:password@host:port/database or mysql://user:password@host:port/database)

If you want to run a local development variant, you can use the dev flow which runs the server via Python from source using UVX tooling.

{
  "mcpServers": {
    "sp-database-mcp-dev": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/sp-database-mcp",
        "run",
        "python",
        "-m",
        "sp_database_mcp.server"
      ],
      "env": {
        "DATABASE_URL": "postgresql://user:password@host:port/database"
      }
    }
  }
}
```

```json
{
  "mcpServers": {
    "sp-database-mcp": {
      "command": "uvx",
      "args": ["sp-database-mcp[postgresql]"],
      "env": {
        "DATABASE_URL": "postgresql://user:password@host:port/database"
      }
    }
  }
}