trackmcp
Back to directory
BoscoBecker

mcpservercsharp

View on GitHub

MCP Server com C# + Firebird

4 stars C#Servers & Infrastructure Updated Oct 12, 2025

Documentation

๐Ÿ› ๏ธ 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

bash
dotnet add package ModelContextProtocol --prerelease

๐Ÿ”ง `appsettings.json` File

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

json
{
"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

code
src/
โ”œโ”€โ”€ MCPServer/
โ”‚ โ”œโ”€โ”€ Factory/
โ”‚ โ”‚ โ””โ”€โ”€ FbConnectionFactory.cs
โ”‚ โ”œโ”€โ”€ Tools/
โ”‚ โ”‚ โ””โ”€โ”€ FbQueries.cs
โ”‚ โ”œโ”€โ”€ Program.cs
โ”‚ โ””โ”€โ”€ appsettings.json

๐Ÿงฉ MCP Tool Available

๐Ÿ” ListTable

csharp
[McpTool, Description("List all records from a Firebird table")]
public List> 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:

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

Run MCP server

bash
npx @modelcontextprotocol/inspector dotnet run
{58D6C0FD-B032-48FC-9F16-8769A9403E82}

Frequently asked questions

What is mcpservercsharp?

mcpservercsharp is MCP Server com C# + Firebird

How do I install mcpservercsharp?

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 mcpservercsharp open source?

Yes โ€” it is hosted on GitHub at https://github.com/BoscoBecker/MCPServerCSharp and has 4 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP