ccm-mcp-node-server
v1.0.7
Published
MCP stdio server exposing CCM-like tools using Azure Key Vault (Node.js)
Readme
CCM MCP Node Server
A Model Context Protocol (MCP) server implementation in Node.js that provides Central Configuration Manager (CCM) functionality for AI agents and tools.
Overview
This MCP server exposes CCM-like configuration management tools through the Model Context Protocol, allowing AI agents to interact with configuration data stored in Azure Key Vault and other sources. The server implements in-memory caching with a 5-minute TTL to optimize performance.
Features
- Configuration Value Retrieval: Get configuration values by key
- Source-Specific Access: Retrieve values from specific configuration sources
- Value Management: Set and delete configuration values
- Key Listing: List available configuration keys with limits
- Health Checking: Verify configuration accessibility and status
- In-Memory Caching: 5-minute TTL cache keyed by KeyVault URI for optimal performance
- Flexible JSON Input: Supports both full appsettings.json and Ccm-only JSON objects
Installation
From npm (Recommended)
npm install -g ccm-mcp-node-serverFrom Source
git clone <repository-url>
cd CcmMcpNodeServer
npm installUsage
Starting the Server
# If installed globally
ccm-mcp-node-server
# If running from source
npm startThe server uses stdio transport and is designed to be used with MCP-compatible clients like Cursor, Claude Desktop, or other AI development environments.
MCP Client Configuration
Add this server to your MCP client configuration:
For Cursor/Claude Desktop (mcp.json):
{
"mcpServers": {
"ccm-node": {
"command": "ccm-mcp-node-server"
}
}
}Alternative configuration:
{
"mcpServers": {
"ccm-node": {
"command": "node",
"args": ["path/to/server.mjs"]
}
}
}Available Tools
ccm_get_value
Get a configuration value by key name.
Parameters:
key(string, required): The configuration key namedefaultValue(string, optional): Default value if key is missingccmJson(object/string, required): Configuration JSON object
Example:
{
"key": "DatabaseConnectionString",
"defaultValue": "",
"ccmJson": {
"Ccm": {
"KeyVaults": [{"Uri": "https://mykv.vault.azure.net/"}],
"Values": {"DatabaseConnectionString": "Server=..."}
}
}
}ccm_get_value_from_source
Get a value from a specific configuration source.
Parameters:
sourceName(string, required): Name of the configuration sourcekey(string, required): The configuration key nameccmJson(object/string, required): Configuration JSON object
ccm_set_value
Set a configuration value in the cache.
Parameters:
sourceName(string, required): Name of the configuration sourcekey(string, required): The configuration key namevalue(string, required): The value to setccmJson(object/string, required): Configuration JSON object
ccm_delete_value
Delete a configuration value from the cache.
Parameters:
sourceName(string, required): Name of the configuration sourcekey(string, required): The configuration key name to deleteccmJson(object/string, required): Configuration JSON object
ccm_list_keys
List available configuration keys with their values.
Parameters:
limit(number, optional): Maximum number of keys to return (default: 50)ccmJson(object/string, required): Configuration JSON object
ccm_health_check
Verify that the configuration is accessible and get key count.
Parameters:
ccmJson(object/string, required): Configuration JSON object
Configuration Format
The ccmJson parameter accepts configuration in these formats:
Full appsettings.json format:
{
"Ccm": {
"KeyVaults": [
{
"Uri": "https://mykv.vault.azure.net/",
"Name": "MyKeyVault"
}
],
"Values": {
"Key1": "Value1",
"Key2": "Value2"
}
}
}Ccm-only format:
{
"KeyVaults": [
{
"Uri": "https://mykv.vault.azure.net/",
"Name": "MyKeyVault"
}
],
"Values": {
"Key1": "Value1",
"Key2": "Value2"
}
}Caching Behavior
- Cache Key: Derived from the first KeyVault URI found in the ccmJson
- TTL: 5 minutes per cache entry
- Strategy: Cache-first for read operations (get_value, get_value_from_source, list_keys, health_check)
- Invalidation: Cache is updated for write operations (set_value, delete_value)
Dependencies
@modelcontextprotocol/sdk: MCP protocol implementation@azure/identity: Azure authentication (prepared for future Azure integration)@azure/keyvault-secrets: Azure Key Vault integration (prepared for future use)
Development
Project Structure
CcmMcpNodeServer/
├── server.mjs # Main MCP server implementation
├── package.json # Node.js package configuration
└── README.md # This fileRunning in Development
npm install
npm startTesting Tools
You can test the server using any MCP-compatible client or by setting up a simple stdio communication test.
Comparison with C# Version
This Node.js implementation provides feature parity with the C# version (CcmMcpSimpleServer) including:
- Same tool interfaces and parameter structures
- Identical caching strategy (5-minute TTL, KeyVault URI keying)
- Compatible JSON configuration format
- Similar error handling and response formats
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
[Add your license information here]
Support
For issues and questions:
- Check the documentation above
- Review the source code in
server.mjs - Compare with the C# implementation for reference
- Open an issue in the repository
Note: This is a Node.js implementation of CCM functionality designed for MCP clients. For production Azure Key Vault integration, additional authentication and configuration setup may be required.
