Andre-Buzeli/test-mcp-utilities
If you are the rightful owner of test-mcp-utilities 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.
A comprehensive Model Context Protocol (MCP) server implementation for testing Roots, Sampling, and Elicitation features across different IDEs.
@andrebuzeli/test-mcp-utilities
A comprehensive Model Context Protocol (MCP) server implementation for testing Roots, Sampling, and Elicitation features across different IDEs. Designed for use with npx
and configured in MCP settings.
Overview
This package provides a complete MCP server with four essential tools designed to test and demonstrate the core MCP capabilities:
- Roots Boundaries - File system access control and boundary definition
- Project Info - Get current project name and directory information
- Sampling Request - LLM completion requests through the client
- Elicitation Request - Dynamic user information gathering with structured schemas
Features
- ✅ Roots Management: Define file system boundaries with configurable access control
- ✅ Project Detection: Automatically detect and return current project information
- ✅ LLM Sampling: Request completions through the MCP client with customizable parameters
- ✅ User Elicitation: Gather structured information from users with JSON schema validation
- ✅ Cross-IDE Compatibility: Tested across Trae AI, VSCode, and Cursor AI
- ✅ TypeScript Support: Full TypeScript implementation with type definitions
- ✅ Error Handling: Comprehensive error handling and validation
- ✅ NPX Ready: Configured for direct use with
npx
command
Installation & Configuration
Global Installation (Recommended)
npm install -g @andrebuzeli/test-mcp-utilities
NPX Usage (No Installation Required)
npx @andrebuzeli/test-mcp-utilities
MCP Configuration
Add to your MCP settings file (usually located at %APPDATA%\mcp\mcp.json
on Windows or ~/.config/mcp/mcp.json
on macOS/Linux):
{
"mcpServers": {
"test-mcp-utilities": {
"command": "npx",
"args": ["@andrebuzeli/test-mcp-utilities"]
}
}
}
IDE-Specific Configuration
Trae AI
Add to your Trae AI MCP settings:
{
"mcpServers": {
"test-mcp-utilities": {
"command": "npx",
"args": ["@andrebuzeli/test-mcp-utilities"]
}
}
}
VSCode with MCP Extension
Configure in your VSCode MCP extension settings:
{
"mcp.servers": {
"test-mcp-utilities": {
"command": "npx",
"args": ["@andrebuzeli/test-mcp-utilities"]
}
}
}
Cursor AI
Add to your Cursor AI MCP configuration:
{
"mcpServers": {
"test-mcp-utilities": {
"command": "npx",
"args": ["@andrebuzeli/test-mcp-utilities"]
}
}
}
Tools Documentation
1. roots_boundaries
Define file system boundaries for server access control.
Parameters:
rootPath
(required): Root directory path to set as boundaryallowedExtensions
(optional): Array of allowed file extensionsexcludePaths
(optional): Array of paths to exclude from access
Example:
{
"rootPath": "/path/to/project",
"allowedExtensions": [".js", ".ts", ".json"],
"excludePaths": ["node_modules", ".git"]
}
2. get_project_info
Returns information about the currently opened project in the IDE.
Parameters:
includeStats
(optional): Include additional project statistics (default: false)
Example Response:
{
"projectName": "my-project",
"projectPath": "/path/to/my-project",
"timestamp": "2025-01-26T10:30:00.000Z",
"statistics": {
"totalFiles": 45,
"directories": 8,
"lastModified": "2025-01-26T09:15:00.000Z"
}
}
3. sampling_request
Request LLM completions through the client for agentic behaviors.
Parameters:
prompt
(required): The prompt to send to the LLMmaxTokens
(optional): Maximum tokens to generate (default: 1000)temperature
(optional): Sampling temperature 0.0-1.0 (default: 0.7)modelPreference
(optional): Preferred model to use
Example:
{
"prompt": "Explain the concept of MCP in simple terms",
"maxTokens": 500,
"temperature": 0.5,
"modelPreference": "gpt-4"
}
4. elicitation_request
Dynamically gather specific information from users using structured schemas.
Parameters:
requestTitle
(required): Title for the information requestrequestDescription
(required): Description of what information is neededschema
(required): JSON schema defining the required information structureallowCancel
(optional): Whether user can cancel the request (default: true)
Example:
{
"requestTitle": "Project Configuration",
"requestDescription": "Please provide your project configuration details",
"schema": {
"type": "object",
"properties": {
"projectName": {"type": "string"},
"version": {"type": "string"},
"author": {"type": "string"}
},
"required": ["projectName", "version"]
},
"allowCancel": true
}
Quick Start
-
Install globally or use npx:
npm install -g @andrebuzeli/test-mcp-utilities # OR npx @andrebuzeli/test-mcp-utilities
-
Configure in your IDE's MCP settings:
{ "mcpServers": { "test-mcp-utilities": { "command": "npx", "args": ["@andrebuzeli/test-mcp-utilities"] } } }
-
Restart your IDE and the tools will be available in your MCP-enabled environment.
IDE Compatibility
This package has been tested and verified to work with:
- Trae AI - Full compatibility with all features
- VSCode - Compatible with MCP extension
- Cursor AI - Full MCP protocol support
Development
Building from Source
git clone https://github.com/andrebuzeli/test-mcp-utilities.git
cd test-mcp-utilities
npm install
npm run build
Running Tests
npm test
Local Development
npm run dev
API Reference
Server Capabilities
The server announces the following capabilities:
{
"capabilities": {
"tools": {},
"sampling": {},
"roots": {
"listChanged": true
}
}
}
Error Handling
All tools implement comprehensive error handling and return structured error responses:
{
"content": [
{
"type": "text",
"text": "Error executing tool: [error message]"
}
],
"isError": true
}
Troubleshooting
Common Issues
- Command not found: Make sure Node.js is installed and
npx
is available in your PATH. - Permission errors: On some systems, you may need to run with elevated permissions.
- MCP not connecting: Verify your MCP configuration file syntax and restart your IDE.
Configuration File Locations
- Windows:
%APPDATA%\mcp\mcp.json
- macOS:
~/.config/mcp/mcp.json
- Linux:
~/.config/mcp/mcp.json
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT License - see the file for details.
Author
Andre Buzeli
- GitHub: @andrebuzeli
- NPM: @andrebuzeli
- Email: andre@buzeli.com
Changelog
v1.0.0
- Initial release
- Implemented all four core tools
- Added TypeScript support
- Cross-IDE compatibility testing
- NPX configuration support
- Comprehensive documentation
Support
If you encounter any issues or have questions, please:
- Check the Issues page
- Create a new issue with detailed information
- Include your IDE version and MCP configuration
Keywords: MCP, Model Context Protocol, Roots, Sampling, Elicitation, IDE, VSCode, Cursor, Trae AI, TypeScript, NPX, MCP Server
Tools Documentation
1. roots_boundaries
Define file system boundaries for server access control.
Parameters:
rootPath
(required): Root directory path to set as boundaryallowedExtensions
(optional): Array of allowed file extensionsexcludePaths
(optional): Array of paths to exclude from access
Example:
{
"rootPath": "/path/to/project",
"allowedExtensions": [".js", ".ts", ".json"],
"excludePaths": ["node_modules", ".git"]
}
2. get_project_info
Returns information about the currently opened project in the IDE.
Parameters:
includeStats
(optional): Include additional project statistics (default: false)
Example Response:
{
"projectName": "my-project",
"projectPath": "/path/to/my-project",
"timestamp": "2025-01-26T10:30:00.000Z",
"statistics": {
"totalFiles": 45,
"directories": 8,
"lastModified": "2025-01-26T09:15:00.000Z"
}
}
3. sampling_request
Request LLM completions through the client for agentic behaviors.
Parameters:
prompt
(required): The prompt to send to the LLMmaxTokens
(optional): Maximum tokens to generate (default: 1000)temperature
(optional): Sampling temperature 0.0-1.0 (default: 0.7)modelPreference
(optional): Preferred model to use
Example:
{
"prompt": "Explain the concept of MCP in simple terms",
"maxTokens": 500,
"temperature": 0.5,
"modelPreference": "gpt-4"
}
4. elicitation_request
Dynamically gather specific information from users using structured schemas.
Parameters:
requestTitle
(required): Title for the information requestrequestDescription
(required): Description of what information is neededschema
(required): JSON schema defining the required information structureallowCancel
(optional): Whether user can cancel the request (default: true)
Example:
{
"requestTitle": "Project Configuration",
"requestDescription": "Please provide your project configuration details",
"schema": {
"type": "object",
"properties": {
"projectName": {"type": "string"},
"version": {"type": "string"},
"author": {"type": "string"}
},
"required": ["projectName", "version"]
},
"allowCancel": true
}
IDE Compatibility
This package has been tested and verified to work with:
- Trae AI - Full compatibility with all features
- VSCode - Compatible with MCP extension
- Cursor AI - Full MCP protocol support
Development
Building from Source
git clone https://github.com/andrebuzeli/test-mcp-utilities.git
cd test-mcp-utilities
npm install
npm run build
Running Tests
npm test
Local Development
npm run dev
API Reference
Server Capabilities
The server announces the following capabilities:
{
"capabilities": {
"tools": {},
"sampling": {},
"roots": {
"listChanged": true
}
}
}
Error Handling
All tools implement comprehensive error handling and return structured error responses:
{
"content": [
{
"type": "text",
"text": "Error executing tool: [error message]"
}
],
"isError": true
}
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT License - see the file for details.
Author
Andre Buzeli
- GitHub: @andrebuzeli
- NPM: @andrebuzeli
Changelog
v1.0.0
- Initial release
- Implemented all four core tools
- Added TypeScript support
- Cross-IDE compatibility testing
- Comprehensive documentation
Support
If you encounter any issues or have questions, please:
- Check the Issues page
- Create a new issue with detailed information
- Include your IDE version and MCP configuration
Keywords: MCP, Model Context Protocol, Roots, Sampling, Elicitation, IDE, VSCode, Cursor, Trae AI, TypeScript