mcp-agent-tools
Provides a read-only MySQL query tool (query_mysql) that allows AI agents to execute SELECT queries against a configured MySQL database, with a guardrail enforcing SELECT-only operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-agent-toolsWhat's in the config file at ./settings.json?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π€ mcp-agent-tools
A custom MCP (Model Context Protocol) server that gives AI agents real-world tools: file access, read-only MySQL queries, web summarization, calculations, and system info. Built to understand how agentic tool calling works end-to-end β server side and client side.
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Client (AI Agent) β
β Claude Code / Qwen Code / Claude Desktop β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β stdio (JSON-RPC)
βββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β MCP Server (this) β
β β
β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββββ β
β βread_file β βquery_ β βsummarize_β βcalculator β β
β βlist_dir β βmysql β βurl β βget_datetimeβ β
β β β β(SELECT β β β βsysinfo β β
β β β β only) β β β βword_count β β
β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββRelated MCP server: mcp-devtools
Tools (8)
Tool | What it does | Safety |
| Read a text file (first 5000 chars) | read-only, path validation |
| List directory contents with type indicators | read-only |
| Query MySQL database | SELECT-only guardrail |
| Fetch & summarize a webpage | no writes, timeout protected |
| Evaluate math expressions safely | AST-based (no eval) |
| Current date/time (UTC + local) | read-only |
| System information (OS, Python, arch) | read-only |
| Count words, chars, lines, sentences | read-only |
Quick start
# 1. Clone and set up
git clone https://github.com/zyay/mcp-agent-tools.git
cd mcp-agent-tools
python -m venv venv && venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set up MySQL (optional β for query_mysql tool)
mysql -u root -p < setup.sql
# 4. Test the server
python client_test.pyConnecting an MCP client
Option 1: Qwen Code
qwen mcp add agent-tools -- python /full/path/to/server.pyOr add to .qwen/settings.json:
{
"mcpServers": {
"agent-tools": {
"command": "python",
"args": ["/full/path/to/mcp-agent-tools/server.py"]
}
}
}Option 2: Claude Code
claude mcp add agent-tools -- python /full/path/to/server.pyOption 3: Claude Desktop
Edit claude_desktop_config.json:
{
"mcpServers": {
"agent-tools": {
"command": "python",
"args": ["/full/path/to/mcp-agent-tools/server.py"]
}
}
}Location:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Option 4: Any MCP client
The server uses stdio transport (JSON-RPC over stdin/stdout). Any MCP-compatible client can connect.
Usage examples
Once connected, the AI agent can use these tools naturally:
File operations
User: "What's in the config file at ./settings.json?"
Agent: [calls read_file("./settings.json")]Database queries
User: "Show me all clients with projects over $1000"
Agent: [calls query_mysql("SELECT * FROM clients WHERE price > 1000")]Web research
User: "What does the Python docs say about async generators?"
Agent: [calls summarize_url("https://docs.python.org/3/reference/expressions.html")]Calculations
User: "If I have 150 items at $12.99 each with 15% discount, what's the total?"
Agent: [calls calculator("150 * 12.99 * 0.85")]System debugging
User: "What Python version am I running and what OS?"
Agent: [calls sysinfo()]MySQL setup
The query_mysql tool connects to a demo database. Set up:
# Load demo data
mysql -u root -p < setup.sql
# Verify
mysql -u root -p -e "SELECT * FROM demo.clients;"Environment variables
Variable | Default | Description |
|
| MySQL server host |
|
| MySQL username |
| (empty) | MySQL password |
|
| Database name |
Example with custom credentials:
set MYSQL_HOST=localhost
set MYSQL_USER=myuser
set MYSQL_PASS=mypassword
python server.pyDesign decisions
Decision | Why |
SELECT-only guardrail | An agent with DROP TABLE access is a bug waiting to happen. Least-privilege by default. |
AST calculator | No |
stdio transport | Simplest, works with any MCP client. No HTTP server needed. |
Docstrings = tool descriptions | The |
Error messages, not exceptions | Tools return error strings instead of raising β the agent can read the error and adapt. |
No state between calls | Each tool call is independent. No shared state = no race conditions. |
Testing
# Run the test client β lists all tools and calls each one
python client_test.py
# Expected output:
# π§ Tools (8): ['read_file', 'list_dir', 'query_mysql', 'summarize_url', ...]
# β
query_mysql: [{'id': 1, 'name': 'Firma A', ...}, ...]
# β
calculator: 100.0
# β
get_datetime: UTC: 2026-08-11 ...
# ...Adding your own tools
@mcp.tool()
def my_tool(param: str) -> str:
"""Describe what this tool does β the LLM reads this description.
Be specific about:
- What it does
- What parameters it takes
- What it returns
- Any safety considerations
"""
# Your implementation
return f"Result for {param}"Then restart the server. The new tool appears automatically.
Production upgrade path
Human-in-the-loop β add confirmation prompts for destructive operations
Auth / permissions β per-tool access control, API keys
HTTP transport β deploy as a remote MCP server (streamable-http)
Rate limiting β prevent abuse of web fetching / database queries
Logging β structured logs for debugging and auditing
More databases β PostgreSQL, SQLite, MongoDB adapters
What I learned
MCP protocol: JSON-RPC over stdio, tool schema from docstrings
Why guardrails matter: agents are powerful but need boundaries
AST-based evaluation: safe math without
eval()security risksTool description quality directly affects agent behavior
The MCP ecosystem is growing fast β Claude, Qwen Code, Cursor all support it
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn educational MCP server that exposes system tools (like IP, hostname, file operations, ping) for AI agents to execute via HTTP.270MIT
- AlicenseBqualityDmaintenanceProduction-grade MCP server that gives AI agents safe access to your local dev environment: filesystem, databases, processes, and OpenAPI specs.15323MIT
- Alicense-qualityCmaintenanceA secure, production-grade MCP server that provides filesystem operations, AST math evaluation, and system diagnostics for LLM agents.MIT
- FlicenseBqualityCmaintenanceA lightweight MCP server that enables AI assistants to interact with the local machine through terminal, filesystem, and Python execution tools.91
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zyay/mcp-agent-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server