Sample MCP Server

Sample MCP Server

sample-mcp•byjasoet

A sample Model Context Protocol server written in Go with GORM that connects to a PostgreSQL database for financial account, category, and transaction management.

License: MIT License•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Manages accounts with create, read, update, and delete operations.
  • •Manages categories with create, read, update, and delete operations.
  • •Tracks transactions with create, read, update, and delete operations.
  • •Aggregates transactions by summing and counting per account.

BEST FOR

  • •Working with financial accounts, categories, and transactions stored in a PostgreSQL database through MCP.
  • •Projects needing transaction sum and count aggregation by account.

ABOUT SAMPLE-MCP

Sample MCP Server is cataloged as an MCP server attributed to jasoet. A sample Model Context Protocol server written in Go with GORM that connects to a PostgreSQL database for financial account, category, and transaction management. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Sample MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which databases does the server support?

The default database type is PostgreSQL, and the configuration also supports MySQL and MSSQL.

How is the configuration file specified?

It can be placed beside the binary or its path set via the MCP_SERVER_CONFIG environment variable.

上游原版 README

在 GitHub 查看同一版本原文

README.md · c6a1381f96bc · 采集于 2026-11-13 13:30:09 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Sample MCP Server

A sample MCP (Model Context Protocol) server that connects to a PostgreSQL database.

Overview

It uses Go with GORM for database operations and PostgreSQL for data storage.

Features

  • Account management (create, read, update, delete)
  • Category management (create, read, update, delete)
  • Transaction tracking (create, read, update, delete)
  • Transaction aggregation (sum, count by account)

Project Structure

  • compose/ - Docker Compose configuration for local development
  • db/ - Database related code
    • entity/ - Data model definitions
    • migrations/ - Database migration scripts
    • repository/ - Data access layer implementations
  • pkg/ - Shared packages and utilities
  • vendor/ - Vendored dependencies

Data Model

The application uses the following data model:

  • Account: Represents financial accounts with ID, name, and type
  • Category: Represents transaction categories with ID, name, and type
  • Transaction: Represents financial transactions with amount, date, description, and relationships to accounts and categories

Prerequisites

  • Go 1.24 or higher (as specified in go.mod)
  • Mage build tool
  • Docker and Docker Compose
  • PostgreSQL (or use the provided Docker setup)

Installing Mage

To install Mage, run:

go install github.com/magefile/mage@vlatest

Make sure the Go bin directory is in your PATH.

Getting Started

Setup with Docker

  1. Clone the repository
  2. Start the PostgreSQL database:
    mage docker:up
    
  3. Build and run the application:
    mage build
    

Development Mode

To start the application in development mode:

mage dev

This will build the application and start the required Docker services.

Testing

Running Unit Tests

mage test

Running Integration Tests

mage integrationtest

This will start the required Docker services, wait for PostgreSQL to initialize, and run the integration tests.

Build Commands

This project uses Mage for build automation. Available commands:

  • mage build - Build the application using GoReleaser
  • mage compilebuild - Build using standard Go build
  • mage test - Run unit tests
  • mage integrationtest - Run integration tests
  • mage lint - Run linter
  • mage dev - Build and start Docker services
  • mage docker:up - Start Docker services
  • mage docker:down - Stop Docker services
  • mage docker:logs - Show Docker logs
  • mage docker:restart - Restart Docker services
  • mage clean - Clean build artifacts

Configuration

Configuration File

The application can be configured using a config.yml file. The configuration file can be placed in the same directory as the binary or specified using the MCP_SERVER_CONFIG environment variable.

A sample configuration file is provided in config.yml.sample. You can copy this file to config.yml and modify it according to your needs.

# Copy the sample configuration file
cp config.yml.sample config.yml

# Edit the configuration file
nano config.yml

Environment Variable

You can specify the path to the configuration file using the MCP_SERVER_CONFIG environment variable:

export MCP_SERVER_CONFIG=/path/to/your/config.yml

Database Configuration

The PostgreSQL database is configured with the following default settings:

  • Type: POSTGRES (also supports MYSQL and MSSQL)
  • Host: localhost (or postgres in Docker network)
  • Port: 5432
  • User: jasoet
  • Password: localhost
  • Database: mcp_db
  • Timeout: 3 seconds
  • Max Idle Connections: 5
  • Max Open Connections: 10

License

This project is licensed under the MIT License - see below for details:

MIT License

Copyright (c) 2025 Sample MCP Server

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Sample MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/sample-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage