mcpField
M
mcp-server-demo

mcp-server-demo

Local
github.com/dto-btnDeveloper Tools0Updated 6w ago

About mcp-server-demo

mcp-server-demo is a proof-of-concept MCP server for business-request data, with a companion client configured to use Azure OpenAI. It connects to SQL Server and includes tools for searching and filtering request records.

Key features

  1. 01Connect to a SQL Server database
  2. 02Search business requests
  3. 03Filter returned results
  4. 04Run locally or in Docker

Use cases

  1. 01Find requests using field filters
  2. 02Narrow search results by column values
  3. 03Test an MCP server and client proof of concept

MCP support

It provides an MCP server for business-request search and result filtering, with configurable host, port, and server URL. The README also describes a client using Azure OpenAI.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Business Request Server

Demo PoC MCP server to be used in other PoC

Devs

Configuration

Before running the server or client, create a .env file from the example:

cp .env.example .env

Edit .env and provide your database credentials and Azure OpenAI settings.

VariableDescriptionRequiredDefault
BITS_DB_SERVERThe hostname or IP address of the SQL Server database.Yesmissing.domain
BITS_DB_USERNAMEThe username for database authentication.Yesmissing.username
BITS_DB_PWDThe password for database authentication.Yesmissing.password
BITS_DB_DATABASEThe name of the specific database to connect to.Yesmissing.dbname
HOSTThe host address the MCP server will bind to.No0.0.0.0
PORTThe port the MCP server will listen on.No8000
MCP_SERVER_URLThe URL where the MCP server is accessible (used by client).Nohttp://127.0.0.1:8000/mcp
CORS_ALLOW_ORIGINSComma-separated list of origins allowed to bridge to the MCP server.Nohttp://localhost,http://127.0.0.1
CORS_ALLOW_CREDENTIALSWhether to allow credentials (cookies, auth headers) in CORS requests.Nofalse
AZURE_OPENAI_ENDPOINTThe endpoint URI for your Azure OpenAI resource (used by client).Yes (Client)-
AZURE_OPENAI_VERSIONThe API version for Azure OpenAI.No2024-05-01-preview
CLIENT_IDOAuth2 Client ID for authentication (experimental).No-
CLIENT_SECRETOAuth2 Client Secret for authentication (experimental).No-
REDIRECT_URIOAuth2 Redirect URI for authentication (experimental).No-
Installation
uv venv
uv pip install -e .
# then run it locally
mcp dev server.py
# or alternatively
python server.py

Navigate to the URL it showed to test your server.

And then you can test functions such as Templates, and then search_business_requests:

Pass in this for query:

{
  "query_filters": [
    {
      "name": "BR_SHORT_TITLE",
      "value": "Server",
      "operator": "="
    }
  ]
}

and for select_fields:

{
  "fields": [
    "BR_SHORT_TITLE"
  ]
}

And then you can filter on the results via filter_results:

[
  {
    "column": "RPT_GC_ORG_NAME_EN",
    "operator": "contains",
    "value": "Correctional"
  }
]

Running via Docker

docker build -t mcp-bits:local .
docker run -p 8080:8080 --env-file ./.env --name mcp-bits-container mcp-bits:local

pymssql issues

pymssql on Mac OSX

pymssql has dependency with FreeTDS, as such ensure you install it beforehand brew install freetds.

After which if you have issues with running the code please do the following:

uv pip uninstall pymssql
uv pip install --pre --no-binary :all: pymssql --no-cache --no-build-isolation

Also you can add to uv pyproject.toml

[tool.uv]
no-binary-package = ["pymssql"]

After this all should be working.

NOTE: Known issue with cython==3.1.0 found here

Here is how to get around it for now (please remove this once this issue is fixed):

uv pip uninstall pymssql
export CFLAGS="-I$(brew --prefix freetds)/include"
export LDFLAGS="-L$(brew --prefix freetds)/lib"
uv pip install "packaging>=24" "setuptools>=54.0" "setuptools_scm[toml]>=8.0" "wheel>=0.36.2" "Cython==3.0.10" "tomli"
uv pip install --pre --no-binary :all: pymssql --no-cache --no-build-isolation

Deployment

CI/CD

TODO

Manual

This is how you can deploy manually in Azure via the CLI.

az webapp deployment source config-local-git \
  --name <WebAppName> \
  --resource-group <ResourceGroupName>
git remote add azure <GitURLFromPreviousStep>
git push azure main

Documentation

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.