cdf-datamodelling-mcp-server
v1.0.0
Published
A Node.js MCP (Model Context Protocol) server
Maintainers
Readme
Dune MCP Server
A Node.js implementation of a Model Context Protocol (MCP) server. This server provides example tools and resources that can be used with MCP-compatible clients like Claude Desktop.
Features
- Tools: Interactive functions that can be called by MCP clients
echo: Echo back input textget_current_time: Get the current date and timeget_config: Get current server configuration (without sensitive data)
- Resources: Static or dynamic content that can be read by MCP clients
- Server information and configuration
Installation
From npm (when published)
npm install -g dune-mcp-serverFrom source
- Clone the repository:
git clone https://github.com/yourusername/dune-mcp-server.git
cd dune-mcp-server- Install dependencies:
npm install- Configure environment variables:
cp env.example .env
# Edit .env with your actual values- Build the project:
npm run buildConfiguration
The server requires the following environment variables to be set:
CLIENT_ID: Your API client IDCLIENT_SECRET: Your API client secretBASE_URL: The base URL for your API (e.g.,https://api.example.com)PROJECT: Your project identifier
Environment Variables Setup
Using .env file (recommended for development):
cp env.example .envThen edit
.envwith your actual values.Using system environment variables:
export CLIENT_ID="your_client_id" export CLIENT_SECRET="your_client_secret" export BASE_URL="https://api.example.com" export PROJECT="your_project"Using Claude Desktop configuration:
{ "mcpServers": { "dune-mcp-server": { "command": "dune-mcp-server", "env": { "CLIENT_ID": "your_client_id", "CLIENT_SECRET": "your_client_secret", "BASE_URL": "https://api.example.com", "PROJECT": "your_project" } } } }
Usage
Running the server
npm startOr if installed globally:
dune-mcp-serverDevelopment
To run in development mode with automatic rebuilding:
npm run devUsing with Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"dune-mcp-server": {
"command": "node",
"args": ["/path/to/dune-mcp-server/build/index.js"]
}
}
}Or if installed globally:
{
"mcpServers": {
"dune-mcp-server": {
"command": "dune-mcp-server"
}
}
}API
Tools
echo
Echoes back the provided text.
Parameters:
text(string): The text to echo back
Example:
{
"name": "echo",
"arguments": {
"text": "Hello, world!"
}
}get_current_time
Returns the current date and time in ISO format.
Parameters: None
Example:
{
"name": "get_current_time",
"arguments": {}
}get_config
Returns the current server configuration (excluding sensitive data like client secret).
Parameters: None
Example:
{
"name": "get_config",
"arguments": {}
}Response:
{
"baseUrl": "https://api.example.com",
"project": "your_project",
"clientId": "your_client_id"
}Resources
config://server-info
Returns information about the server including its capabilities and available tools.
Development
Project Structure
dune-mcp-server/
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript (generated)
├── package.json # Package configuration
├── tsconfig.json # TypeScript configuration
├── LICENSE # MIT License
└── README.md # This fileBuilding
npm run buildCleaning
npm run cleanPublishing to npm
- Update the version in
package.json - Update the repository URLs in
package.jsonto point to your actual repository - Build the project:
npm run build - Publish:
npm publish
The prepublishOnly script will automatically clean and build the project before publishing.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see the LICENSE file for details.
