BoscoBecker/MCPServerCSharp
If you are the rightful owner of MCPServerCSharp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project is an MCP server created in C#, with support for custom tools and dynamic query execution in a Firebird database.
š ļø 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)
Example of use:
{
"tool": "ListTable",
"args": {
"tableName": "CUSTOMERS",
"filter": "STATUS = 'ACTIVE'",
"limitRecords": 10
}
}
Run MCP server
npx @modelcontextprotocol/inspector dotnet run