mcpField
πŸ› 
πŸ› οΈ MCP Server with C# + Firebird

πŸ› οΈ MCP Server with C# + Firebird

Local
github.com/BoscoBeckerDatabases5Updated 73w ago

About πŸ› οΈ MCP Server with C# + Firebird

This C# MCP server connects to Firebird databases for developers who need database queries through MCP. Its query tool supports SQL filters and a limit on returned records.

Key features

  1. 01Built with C#
  2. 02Connects to Firebird
  3. 03Filters table records
  4. 04Limits record count
  5. 05Configured through appsettings.json

Use cases

  1. 01Query Firebird table data
  2. 02Filter records by conditions
  3. 03Limit query results

MCP support

The MCP server exposes Firebird table queries through the ListTable tool. MCP clients can specify a table, SQL filter, and record limit.

Configuration

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

mcp.json Β· Universal config
{
"mcpServers": {
"MCPServerCSharp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector"
]
}
}
}
Run commandnpx -y @modelcontextprotocol/inspector

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@modelcontextprotocol/inspector

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

πŸ› οΈ MCP Server with C# + Firebird

This project is an MCP ( Model Context Protocol ) server created in C#, with support for custom tools. One of the features included is the execution of dynamic queries in a Firebird database with filter and record limit.


πŸ“¦ Technologies Used

  • NPX
  • C# (.NET 9)
  • MCP ( Model Context Protocol )
  • FirebirdSql.Data.FirebirdClient
  • Dependency Injection via Host.CreateApplicationBuilder
  • Configuration via appsettings.json

βš™οΈ Configuration

Install dependencies by nuget

dotnet add package ModelContextProtocol --prerelease
πŸ”§ appsettings.json File

Create an appsettings.json file in the project root with the following content:

{
"ConnectionStrings": {
"FirebirdDb": "Database=C:\\yourdata.fdb;User=SYSDBA;Password=masterkey;Dialect=3;Charset=NONE;" }
}

πŸ“ Change the path of the .FDB file according to the location of your database.

πŸ“‚ Recommended Project Structure

src/
β”œβ”€β”€ MCPServer/
β”‚ β”œβ”€β”€ Factory/
β”‚ β”‚ └── FbConnectionFactory.cs
β”‚ β”œβ”€β”€ Tools/
β”‚ β”‚ └── FbQueries.cs
β”‚ β”œβ”€β”€ Program.cs
β”‚ └── appsettings.json

🧩 MCP Tool Available

πŸ” ListTable
[McpTool, Description("List all records from a Firebird table")]
public List<Dictionary<string, object>> ListTable(string tableName, string filter = "", int limitRecords = 0)

This tool returns records from a Firebird database table with:

πŸ”Ž Conditional filter via SQL

πŸ”’ Limitation of number of records (using FIRST)

{DF1F6239-E983-45A0-87E3-645291A6D2C7}

Example of use:

{
  "tool": "ListTable",
  "args": {
    "tableName": "CUSTOMERS",
    "filter": "STATUS = 'ACTIVE'",
    "limitRecords": 10
  }
}

Run MCP server

  npx @modelcontextprotocol/inspector dotnet run

{58D6C0FD-B032-48FC-9F16-8769A9403E82}

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.