coremcp

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: Apache-2.0

README ΒΆ

CoreMCP

CI License Go Version Release

Model Context Protocol (MCP) server for database operations

CoreMCP by CoreBaseHQ provides a secure, extensible bridge between AI assistants (like Claude Desktop) and your databases through the Model Context Protocol.

πŸš€ Features

⚠️ Safety First: CoreMCP is designed to be Read-Only by default. We strongly recommend creating a specific database user with SELECT permissions only.

  • πŸ”Œ Multiple Database Support: MSSQL, Firebird (coming soon), and extensible adapter system
  • πŸ›‘οΈ Secure: Read-only mode support, connection string isolation
  • 🎯 MCP Native: Built specifically for Model Context Protocol
  • πŸ”§ Easy Configuration: Simple YAML-based setup
  • πŸ“¦ Lightweight: Single binary, no runtime dependencies

πŸ“‹ Requirements

  • Go 1.23 or higher (for building from source)
  • Database drivers are embedded in the binary

πŸ”§ Installation

From Source
git clone https://github.com/corebasehq/coremcp.git
cd coremcp
go build -o coremcp ./cmd/coremcp
Binary Release

Download the latest release from the Releases page.

βš™οΈ Configuration

Create a coremcp.yaml file in your working directory:

server:
  name: "coremcp-agent"
  version: "0.1.0"
  transport: "stdio"
  port: 8080

logging:
  level: "info"
  format: "json"

sources:
  - name: "my_database"
    type: "mssql"
    dsn: "sqlserver://username:password@localhost:1433?database=mydb&encrypt=disable"
    readonly: true

See coremcp.example.yaml for more examples.

DSN Format

Microsoft SQL Server:

sqlserver://username:password@host:port?database=dbname&encrypt=disable

Dummy (for testing):

dummy://test

🎯 Usage

Start the MCP Server
coremcp serve --config coremcp.yaml

Or use stdio transport (default):

coremcp serve -t stdio
Use with Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "coremcp": {
      "command": "/path/to/coremcp",
      "args": ["serve", "-c", "/path/to/coremcp.yaml"],
      "env": {}
    }
  }
}

πŸ—οΈ Architecture

coremcp/
β”œβ”€β”€ cmd/coremcp/       # CLI application entry point
β”‚   β”œβ”€β”€ main.go        # Main entry
β”‚   β”œβ”€β”€ root.go        # Root command
β”‚   └── serve.go       # Serve command
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ adapter/       # Database adapters
β”‚   β”‚   β”œβ”€β”€ factory.go # Adapter factory pattern
β”‚   β”‚   β”œβ”€β”€ dummy/     # Dummy adapter (for testing)
β”‚   β”‚   └── mssql/     # MSSQL adapter
β”‚   β”œβ”€β”€ config/        # Configuration management
β”‚   β”œβ”€β”€ core/          # Core type definitions
β”‚   └── server/        # MCP server implementation
└── coremcp.yaml       # Configuration file

πŸ”Œ Available Tools

query_database

Executes SQL queries on configured database sources.

Parameters:

  • source_name (required): Name of the database source from config
  • query (required): SQL query to execute

Example:

SELECT * FROM users WHERE id = 1

πŸ› οΈ Adding Custom Adapters

  1. Create a new package in pkg/adapter/yourdb/
  2. Implement the core.Source interface
  3. Register in pkg/adapter/factory.go

See pkg/adapter/dummy/dummy.go for a simple example.

🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details.

πŸ”’ Security

For security concerns, please see SECURITY.md.

πŸ“„ License

Apache License 2.0 - see LICENSE for details.

🌟 Roadmap

  • PostgreSQL adapter
  • MySQL adapter
  • Firebird adapter (in progress)
  • Schema introspection tools
  • Query result caching
  • HTTP transport support
  • Write operation support (with strict safety guards)

πŸ’¬ Support


Made with ❀️ by CoreBaseHQ

Directories ΒΆ

Path Synopsis
cmd
coremcp command
pkg
adapter
Package adapter provides a factory for creating database adapters.
Package adapter provides a factory for creating database adapters.
adapter/dummy
Package dummy provides a dummy database adapter for testing purposes.
Package dummy provides a dummy database adapter for testing purposes.
adapter/mssql
Package mssql provides a Microsoft SQL Server database adapter.
Package mssql provides a Microsoft SQL Server database adapter.
config
Package config provides configuration management for CoreMCP.
Package config provides configuration management for CoreMCP.
core
Package core defines the core interfaces and types for CoreMCP database adapters.
Package core defines the core interfaces and types for CoreMCP database adapters.
server
Package server implements the MCP (Model Context Protocol) server for database operations.
Package server implements the MCP (Model Context Protocol) server for database operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL