MCP server for organizations and devices

MCP server for organizations and devices

mcp-server-demo-tanjibpa•bytanjibpa

A demo MCP server backed by PostgreSQL that manages organizations and devices and exposes tools for querying them and calculating device-to-organization distances.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Connects to a PostgreSQL database to manage organizations and devices.
  • •Calculates distances between devices and their associated organizations using the Haversine formula.
  • •Provides MCP tools to fetch organizations and devices and calculate distances.
  • •Offers tools for fetching all organizations, all devices, devices by organization, and listing devices with distance.

BEST FOR

  • •Querying an organization and device database through an MCP client.
  • •Finding devices belonging to a specific organization.
  • •Listing devices together with how far each is from its organization's address.

ABOUT MCP-SERVER-DEMO-TANJIBPA

MCP server for organizations and devices is cataloged as an MCP server attributed to tanjibpa. A demo MCP server backed by PostgreSQL that manages organizations and devices and exposes tools for querying them and calculating device-to-organization distances. 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: Not specified. 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 MCP server for organizations and devices 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

What MCP tools does this server provide?

It provides get_organizations, get_devices, get_devices_by_organization, and list_devices_with_distance.

How are device-to-organization distances calculated?

The server uses the Haversine formula to calculate distances between devices and their associated organizations.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 58eaf176f245 · 采集于 2026-11-13 11:48:00 UTC

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

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

MCP Demo

This repository contains a demo implementation of a Model Context Protocol (MCP) server. The server is designed to manage organizations and devices, calculate distances between devices and their associated organizations, and provide a set of tools for interacting with the data.

Features

  • Database Integration: Connects to a PostgreSQL database to manage organizations and devices.
  • Distance Calculation: Uses the Haversine formula to calculate distances between devices and their associated organizations.
  • MCP Tools: Provides tools to fetch organizations, devices, and calculate distances.

Prerequisites

  • Python 3.12.5
  • PostgreSQL database

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd mcp-demo
    
  2. Set up a virtual environment:

    uv venv
    source .venv/bin/activate
    
  3. Configure the environment variables in a .env file:

    DB_NAME=mcp
    DB_USER=mcp_user
    DB_PASSWORD=pa$$word
    DB_HOST=localhost
    DB_PORT=5432
    
  4. Set up the database:

    psql -U <username> -d <database> -f tables.sql
    

Usage

  1. Run the MCP server:

    uv run main.py
    
  2. Use the provided tools to interact with the server:

    • get_organizations: Fetch all organizations from the database.
    • get_devices: Fetch all devices from the database.
    • get_devices_by_organization: Fetch devices for a specific organization.
    • list_devices_with_distance: List devices and their distances from their associated organizations.

Project Structure

  • main.py: Main entry point for the MCP server.
  • tables.sql: SQL script to set up the database schema and seed data.
  • .env: Environment variables for database configuration.
  • pyproject.toml: Project metadata and dependencies.

Dependencies

  • httpx: HTTP client for Python.
  • mcp[cli]: MCP framework for building servers.
  • psycopg2: PostgreSQL database adapter for Python.

Claude Desktop MCP Server Configuration

To configure Claude Desktop for this MCP server project, follow these steps:

  1. Install Claude Desktop on your machine from the official website.

  2. Open Claude Desktop and navigate to the settings menu.

  3. Add a new project configuration for the MCP server:

     code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  4. Add the mcp servers

{
    "mcpServers": {
        "devices": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/mcp-demo",
                "run",
                "main.py"
            ],
            "env": {
                "DB_NAME": "mcp",
                "DB_USER": "mcp_user",
                "DB_PASSWORD": "pa$$word",
                "DB_HOST": "localhost",
                "DB_PORT": "5432"
            }
        }
    }
}
  1. Run query, for example: List the devices in DB and show me how far are they from their organization address. Also, add get the mac addresses of the devices.

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 MCP server for organizations and devices 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/mcp-server-demo-tanjibpa)

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