MCP Toolkit MCP server

Provides AI assistants with access to local and network resources through specialized tools for file system operations, database connections, GitHub API access, web content extraction, and command execution with configurable security constraints.
Back to servers
Provider
zxfgds
Release date
Mar 05, 2025
Language
TypeScript
Package
Stats
451 downloads
1 star

This MCP Toolkit server provides a comprehensive set of tools for AI assistants to interact with local systems, files, databases, and external services. It extends AI capabilities with real-world interactions while maintaining security and control.

Installation

Install the MCP Toolkit using npm:

npm install mcp-toolkit

Configuration

Create a config.json file in your project to set up workspace paths, network options, and database connections:

{
  "workspace": {
    "rootPath": "/path/to/workspace",
    "allowedPaths": ["/allowed/path1", "/allowed/path2"]
  },
  "network": {
    "proxy": "http://proxy-server:port"  // Optional
  },
  "database": {
    "mysql": {
      "host": "localhost",
      "port": 3306,
      "user": "user",
      "password": "password",
      "database": "dbname"
    }
    // Similar configuration for PostgreSQL and Redis
  }
}

Getting Started

To start the MCP server, create a simple TypeScript file:

import { Server } from 'mcp-toolkit';

const server = new Server({
  configPath: './config.json'
});

server.start();

Available Tools

File Operations

These tools help manage files and directories:

  • Reading Files: Access file contents

    // Example of reading a file
    read_file("/path/to/file.txt")
    
  • Writing Files: Create or update files

    // Example of writing to a file
    write_to_file("/path/to/file.txt", "File content here")
    
  • Directory Management: List and search files

    // Example of listing directory contents
    list_files("/path/to/directory")
    
    // Example of searching files using regex
    search_files("/path/to/directory", "*.js")
    
  • Code Analysis: Extract code definitions

    // Extract code definitions from a file
    list_code_definition_names("/path/to/code.js")
    

Database Integration

Connect and interact with various databases:

  • MySQL/PostgreSQL/Redis Support:

    // Connect to a database
    db_connect("mysql", {
      host: "localhost",
      port: 3306,
      user: "user",
      password: "password",
      database: "dbname"
    })
    
    // Execute a query
    db_query("SELECT * FROM users WHERE age > ?", [18])
    
  • Transaction Management:

    // Begin a transaction
    db_begin_transaction()
    
    // Commit changes
    db_commit_transaction()
    
    // Rollback changes
    db_rollback_transaction()
    

GitHub Integration

Work with GitHub repositories:

// List repository contents
github_ls("username/repo", "path/to/directory")

// View file contents
github_cat("username/repo", "path/to/file.js")

// Search code in repositories
github_search_code("username/repo", "search term")

Web Capabilities

Interact with web content:

// Extract webpage content
read_webpage("https://example.com")

// Execute a web search
brave_search("search query")

// Send HTTP requests
http_request("GET", "https://api.example.com/data", {
  headers: { "Authorization": "Bearer token" }
})

System Tools

Execute system operations:

// Run a command
execute_command("ls -la")

// Search files with Everything
everything_search("query")

// Write to logs
logger("info", "Operation completed successfully")

Security Features

The MCP Toolkit includes several security measures:

  • Workspace Restrictions: Limit file access to specific directories
  • Command Execution Controls: Restrict which commands can be executed
  • Database Access Management: Securely manage database connections
  • Authentication: Token-based authentication for external services

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later