br-mcp-server
Demo PoC MCP server to be used in other PoC
Documentation
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 .envEdit `.env` and provide your database credentials and Azure OpenAI settings.
| Variable | Description | Required | Default |
|---|---|---|---|
| `BITS_DB_SERVER` | The hostname or IP address of the SQL Server database. | Yes | `missing.domain` |
| `BITS_DB_USERNAME` | The username for database authentication. | Yes | `missing.username` |
| `BITS_DB_PWD` | The password for database authentication. | Yes | `missing.password` |
| `BITS_DB_DATABASE` | The name of the specific database to connect to. | Yes | `missing.dbname` |
| `HOST` | The host address the MCP server will bind to. | No | `0.0.0.0` |
| `PORT` | The port the MCP server will listen on. | No | `8000` |
| `MCP_SERVER_URL` | The URL where the MCP server is accessible (used by client). | No | `http://127.0.0.1:8000/mcp` |
| `CORS_ALLOW_ORIGINS` | Comma-separated list of origins allowed to bridge to the MCP server. | No | `http://localhost,http://127.0.0.1` |
| `CORS_ALLOW_CREDENTIALS` | Whether to allow credentials (cookies, auth headers) in CORS requests. | No | `false` |
| `AZURE_OPENAI_ENDPOINT` | The endpoint URI for your Azure OpenAI resource (used by client). | Yes (Client) | - |
| `AZURE_OPENAI_VERSION` | The API version for Azure OpenAI. | No | `2024-05-01-preview` |
| `CLIENT_ID` | OAuth2 Client ID for authentication (experimental). | No | - |
| `CLIENT_SECRET` | OAuth2 Client Secret for authentication (experimental). | No | - |
| `REDIRECT_URI` | OAuth2 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.pyNavigate 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:localpymssql 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-isolationAlso 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-isolationDeployment
CI/CD
TODO
Manual
This is how you can deploy manually in Azure via the CLI.
az webapp deployment source config-local-git \
--name \
--resource-group
git remote add azure
git push azure mainDocumentation
- Using this as tutorial on how to build the demo.
- FastMCP documentation
- MCP OAuth 2.0 Authentication
Frequently asked questions
What is br-mcp-server?
br-mcp-server is Demo PoC MCP server to be used in other PoC
How do I install br-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is br-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/dto-btn/br-mcp-server.
Related MCP tools
Damn Vulnerable MCP Server Python-based implementation. Trusted by 1200+ developers. Trusted by 1200+ developers. Trusted by 1200+ developers.
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases Python-based implementation. Trusted by 900+ developers.
Query MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning...
Model Context Protocol with Neo4j Python-based implementation. Trusted by 700+ developers. Trusted by 700+ developers. Trusted by 700+ developers.
An MCP server that provides control over Android devices via adb Python-based implementation. Trusted by 500+ developers.
A Model Context Protocol (MCP) server for PostgreSQL databases with enhanced capabilities for AI agents. Python-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP