Tools
Postgres
Run the agent and tool in a Meshagent Room in the cloud with the following steps:
-
Set Required Environment Variables
POSTGRES_URL
: The connection string for your PostgreSQL instance.
Example:postgresql://host.docker.internal:5432/mydb
-
Install Meshagent
-
Sign Up and Authenticate
- Follow the steps at Meshagent CLI Getting Started to create an account and authenticate your CLI session.
-
Start the MCP Server in a Meshagent Room
- This command launches the MCP server in a Meshagent Room with the specified environment vars. Rooms close if they go inactive.
-
Start a Chatbot Agent with the PostgreSQL Toolkit
- This launches a chatbot in the Meshagent Room, enabling it to use the PostgreSQL MCP toolkit.
- Multiple toolkits can be added to the same Room.
- A link to interact with the room will appear in the CLI output.
Summary of Required Environment Variables
- POSTGRES_URL: PostgreSQL connection string (e.g.,
postgresql://host.docker.internal:5432/mydb
) - MESHAGENT_PORT: The port used by the MCP service inside the meshagent room (
8001
in the above example)
Tools Available
This MCP Server provides tools for read-only access to PostgreSQL databases. Agents can inspect schemas and run read-only queries.
Tools Provided
Tool Name | Short Description |
---|---|
query | Run a read-only SQL query |
Tool Details
Tool: query
- Description: Run a read-only SQL query.
- Parameters:
sql
(string
, optional): The SQL statement(s) to execute.
Meshagent Resources
- Meshagent Website: https://www.meshagent.com/
- Getting Started with Rooms: https://docs.meshagent.com/room_api/get_started
- Room API Overview: https://docs.meshagent.com/room_api/overview
- Docker Image for Tool: meshagent/mcp-postgres on Docker Hub
By wrapping the MCP PostgreSQL server with Meshagent, you unlock access to powerful data tools in a collaborative, cloud-native environment—ideal for AI agents, chatbots, and team workflows.