Are you the author? Sign in to claim
faircom-mcp
[!IMPORTANT] Developers and maintainers: use BUILD.md for build, packaging, and release instructions. This README is product and usage focused.
Connect AI assistants and LLMs to FairCom databases with explicit write controls, Linux packaging, and operational tooling.
┌─────────────────────────────────────────────────────────────┐
│ Your AI Assistant (Claude, Copilot, etc.) │
└────────────────────┬────────────────────────────────────────┘
│ MCP Protocol
│ (HTTP + JSON-RPC)
┌────────────────────▼────────────────────────────────────────┐
│ FairCom MCP Server │
│ • Session management │
│ • Write safety enforcement (confirm_write=true) │
│ • Tool exposure control │
│ • Rate limiting, observability │
└────────────────────┬────────────────────────────────────────┘
│ FairCom JSON API
│ (HTTP REST)
┌────────────────────▼────────────────────────────────────────┐
│ FairCom Database │
│ (Edge, DB, RTG, ISAM, MQ) │
└─────────────────────────────────────────────────────────────┘
Why FairCom MCP?
Let users ask natural-language questions about FairCom data.
Example: "What were our top 5 products by revenue last quarter?"
The AI assistant translates this to SQL, queries FairCom, and summarizes results with visualizations.
# FairCom MCP exposes:
# sql_query(statement, params?) → fetch data
# list_tables(name_like?) → discover schema
# list_table_columns(table_name) → understand structure
Automate data pipelines that read/write to FairCom.
Example: Sync customer data from SaaS → FairCom using AI-guided transformations.
# The AI assistant can:
# 1. List available tables (list_tables)
# 2. Inspect target schema (describe_table)
# 3. Execute transformations (sql_execute with confirm_write=true)
# 4. Validate results (sql_query to spot-check)
Real-time status monitoring and anomaly detection.
Example: "Show me any orders with payment processing delays."
# FairCom MCP provides:
# - /metrics → Prometheus-compatible metrics
# - /diagnostics → System health
# - sql_query → Run diagnostic queries
# Combine for full observability loop
Build internal tools (CRM, inventory, compliance).
Example: Chatbot for warehouse staff to check inventory levels, process returns.
# Sandbox the chatbot with:
# FAIRCOM_TOOL_GROUP_ALLOWLIST=metadata,query
# (write tools disabled for read-only workflows)
#
# FAIRCOM_SQL_DENYLIST=DELETE,DROP
# (prevent destructive operations)
# Start FairCom MCP pointing to your FairCom instance
docker run -d --name faircom-mcp \
-p 8000:8000 \
-e FAIRCOM_API_BASE_URL=http://faircom-host:8080 \
-e FAIRCOM_API_USERNAME=ADMIN \
-e FAIRCOM_API_PASSWORD=ADMIN \
faircomteam/faircom-mcp:latest --transport http
If FairCom is running on your local host machine, use:
-e FAIRCOM_API_BASE_URL=http://host.docker.internal:8080
Debian/Ubuntu:
sudo apt-get install -y ./faircom-mcp_0.1.3_all.deb
sudo systemctl enable --now faircom-mcp
RHEL/Rocky/AlmaLinux:
sudo dnf install -y ./faircom-mcp-0.1.3-1.noarch.rpm
sudo systemctl enable --now faircom-mcp
# Health check
curl -fsS http://127.0.0.1:8000/health
# Output: {"status":"healthy"}
# List available tables
curl -i -X POST http://127.0.0.1:8000/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {"name": "test", "version": "1.0"}
}
}' | head -20
The official image repository is:
faircomteam/faircom-mcpRecommended tag usage:
latest: Recommended default tag for standard usersv* tags (for example vX.Y.Z): Immutable release tags for production pinningPull examples:
# Default current image
docker pull faircomteam/faircom-mcp:latest
# Pin to an immutable release for production
docker pull faircomteam/faircom-mcp:vX.Y.Z
Run example (recommended default):
docker run -d --name faircom-mcp \
-p 8000:8000 \
-e FAIRCOM_API_BASE_URL=http://faircom-host:8080 \
-e FAIRCOM_API_USERNAME=ADMIN \
-e FAIRCOM_API_PASSWORD=ADMIN \
faircomteam/faircom-mcp:latest --transport http
Notes:
latest for normal usage and quick evaluation.v*) only when you need immutable version locking.latest and v* tags are published together from the same release tag workflow.Let's query FairCom using Claude or a local LLM via FairCom MCP.
Step 1: Initialize MCP Session
curl -i -X POST http://127.0.0.1:8000/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {"name": "my-client", "version": "1.0"}
}
}' 2>&1 | grep -i "mcp-session-id"
# Save the session ID from the response, e.g.: abc123
SESSION_ID="abc123"
Step 2: List Tables
curl -X POST http://127.0.0.1:8000/mcp \
-H "Mcp-Session-Id: $SESSION_ID" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}' 2>&1 | grep -A 5 "list_tables"
Step 3: Describe a Table
# Let's examine the "customers" table
curl -X POST http://127.0.0.1:8000/mcp \
-H "Mcp-Session-Id: $SESSION_ID" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "describe_table",
"arguments": {"table_name": "customers"}
}
}' 2>&1 | tail -20
Step 4: Query Data
# Count customers
curl -X POST http://127.0.0.1:8000/mcp \
-H "Mcp-Session-Id: $SESSION_ID" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "sql_query",
"arguments": {
"statement": "SELECT COUNT(*) as total FROM customers"
}
}
}' 2>&1 | tail -20
Step 5: Configure in Claude/Copilot
For Claude Desktop:
{
"mcpServers": {
"faircom": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}
For GitHub Copilot (VS Code):
{
"mcpServers": {
"faircom": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}
Then ask your AI assistant: "Show me a count of customers by region" – it will use FairCom MCP to execute the query.
Edit /etc/faircom-mcp/faircom-mcp.env (package install) or pass as environment variables (Docker):
# Required: FairCom connectivity
FAIRCOM_API_BASE_URL=https://faircom.example.com:9443
FAIRCOM_API_USERNAME=ADMIN # or use FAIRCOM_API_TOKEN
FAIRCOM_API_PASSWORD=ADMIN
# Optional: Server binding
FAIRCOM_HTTP_HOST=0.0.0.0
FAIRCOM_HTTP_PORT=8000
# Optional: TLS
FAIRCOM_TLS_VERIFY=true # Set to false for self-signed certs
# Optional: Safety controls
FAIRCOM_TOOL_GROUP_ALLOWLIST=metadata,query,write,admin,diagnostics
FAIRCOM_SQL_ALLOWLIST=SELECT,INSERT,UPDATE,DELETE
FAIRCOM_SQL_DENYLIST=DROP,TRUNCATE,ALTER
| Tool | Purpose | Safety |
|---|---|---|
list_tables(name_like?) | Discover tables | Read-only |
describe_table(table_name) | Get columns, indexes, constraints | Read-only |
list_table_columns(table_name) | Column names and types | Read-only |
list_table_indexes(table_name) | Index details | Read-only |
sql_query(statement, params?) | Execute SELECT (read-only) | Read-only |
sql_query_page(statement, params?, page, page_size) | Paginated SELECT | Read-only |
sql_execute(statement, params?, confirm_write) | INSERT/UPDATE/DELETE (requires confirm_write=true) | Write |
runtime_status() | Health, version, diagnostics | Read-only |
GET /health # Simple health check (JSON)
GET /healthz # Kubernetes-style liveness
GET /ready # Readiness check (JSON)
GET /readyz # Kubernetes-style readiness
GET /metrics # Prometheus-compatible metrics
GET /diagnostics # Human-readable diagnostics
GET /diagnostics/json # Machine-readable diagnostics
Package install:
journalctl -u faircom-mcp -f # Follow logs
journalctl -u faircom-mcp --since 1h # Last hour
Docker:
docker logs -f faircom-mcp
Package install includes logrotate policy:
/var/log/faircom-mcp/faircom-mcp.log {
daily
rotate 7
compress
delaycompress
notifempty
missingok
}
See BUILD.md for building, testing, and releasing.
Licensed under the Apache License, Version 2.0. See LICENSE for terms.
For FairCom-specific questions: https://www.faircom.com/support For MCP integration issues: Open a GitHub issue
Built for the FairCom community. Query with confidence. Automate with safety.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows