How deeparajasabeson/mcp-tools-api-sql works
This repository contains two MCP tool demos: one exposes JSONPlaceholder API operations, and the other exposes a SQL Server query. In each demo, a client initializes an MCP session, lists tools, invokes a tool, and prints the result. The REST server fetches data from an external API; the SQL server queries the users table and returns rows. A separate SQL script directly inspects the database. The README documents running a server and client separately. Relationships are limited to those shown in the excerpts or README.
Main entry points: mcp-client.py REST client · mcp-server.py REST tool server · sql-client.py SQL client · sql-server.py SQL tool server
Components 8
REST MCP demo
- REST client
rest-mcp/mcp-client.py - REST tool server
rest-mcp/mcp-server.py
SQL MCP demo
- SQL client
sql-mcp/sql-client.py - SQL tool server
sql-mcp/sql-server.py - SQL inspection script
sql-mcp/python.py
External systems
- JSONPlaceholder API
- SQL Server database
Other components
- User
Connections 7
- User → REST client: runs client
README.md - REST client → REST tool server: calls tools
rest-mcp/mcp-client.py - REST tool server → JSONPlaceholder API: fetches API data
rest-mcp/mcp-server.py - User → SQL client: runs client
README.md - SQL client → SQL tool server: calls tools
sql-mcp/sql-client.py - SQL tool server → SQL Server database: queries users
sql-mcp/sql-server.py - SQL inspection script → SQL Server database: inspects tables
sql-mcp/python.py