mcp-database-solution
This project is a database solution built with TypeScript. It aims to manage data and optimize storage efficiency, specifically designed for developers. It emphasizes usability and scalability, allowing integration with various databases.
GitHub Stars
0
User Rating
Not Rated
Favorites
0
Views
30
Forks
0
Issues
0
README
MCP Database Solution
A complete Model Context Protocol (MCP) solution containing both server and client applications for database operations.
🏗️ Architecture
This monorepo contains two main components:
📡 MCP Server (/server)
- Purpose: Provides MCP tools and services
- Technologies: .NET 8.0, Model Context Protocol SDK
- Features:
- Weather information tools
- Random number generation
- Extensible tool architecture
- NuGet package distribution
💻 MCP Client (/client)
- Purpose: Consumes MCP services through Azure OpenAI
- Technologies: .NET 10.0, Azure OpenAI, Microsoft Extensions AI
- Features:
- Azure OpenAI integration
- Interactive chat interface
- Automatic tool invocation
- Environment-based configuration
🚀 Quick Start
Prerequisites
- .NET 8.0+ SDK
- Azure OpenAI service account (for client)
- Visual Studio 2022 or VS Code
Running the Server
cd server
dotnet run
Running the Client
# Set environment variables first
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_API_KEY="your-api-key"
export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o"
export MCP_SERVER_PROJECT_PATH="../server/SampleMcpServer.csproj"
cd client
dotnet run
📁 Project Structure
mcp-database-solution/
├── README.md
├── MCP-Database-Solution.sln # Main solution file
├── server/ # MCP Server Project
│ ├── Program.cs
│ ├── SampleMcpServer.csproj
│ ├── Tools/
│ │ ├── WeatherTools.cs
│ │ └── RandomNumberTools.cs
│ ├── .mcp/
│ │ └── server.json
│ └── .vscode/
│ └── mcp.json
├── client/ # MCP Client Project
│ ├── Program.cs
│ ├── MCPHostApp.csproj
│ └── .env.example
└── docs/ # Documentation
└── setup.md
🔧 Configuration
Server Configuration
The server can be configured through:
- Environment variables (e.g.,
WEATHER_CHOICES) - VS Code MCP settings (
.vscode/mcp.json) - MCP server manifest (
.mcp/server.json)
Client Configuration
Create a .env file in the client directory with:
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_KEY=your-api-key-here
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o
MCP_SERVER_PROJECT_PATH=../server/SampleMcpServer.csproj
🛠️ Development
Building the Solution
dotnet build MCP-Database-Solution.sln
Running Tests
dotnet test
Publishing the Server as NuGet Package
cd server
dotnet pack
📖 Documentation
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
This project is licensed under the MIT License.
🔗 Related Repositories
- mcpserver-database - Standalone server
- mcpclient-database - Standalone client