Model Context Protocol (MCP) is an open standard that enables frontier LLMs to produce more relevant responses by safely interacting with external tools and resources where data lives. For more details, go to MCP Concepts.
AgentSphere MCP Server Intro
AgentSphere provides an official MCP server that you can use in your MCP client.
Configurations
To configure this server in Cursor, Efflux, or other MCP-compatible clients, add the following configuration to your MCP config file:
JSON{ "mcpServers": { "agentsphere": { "command": "uvx", "args": ["agentsphere-mcp-server"], "env": { "AGENTSPHERE_API_KEY": "your_api_key_here" } } } }
Notes:
-
Replace
your_api_key_here
with your actual AgentSphere API key. -
Make sure your internet connection is stable and
uv
(a modern Python dependency and project manager) is installed.
Tools
The AgentSphere MCP server includes the following three tools:
Tool Name | Function Description | Parameters | Return Value |
---|---|---|---|
exec_command | Executes Linux system commands within the sandbox | - cmd (string): The command to execute | Object containing stdout , stderr , and success |
get_preview_link | Retrieves the access URL of a web service in sandbox | - port (int): The port number of the preview link | Object containing the accessible URL |
upload_files_to_sandbox | Uploads local files/folders to a specified path in sandbox | - local_path (string): Absolute local path- target_path (string, optional): Target sandbox directory (default: /user_uploaded_files/ ) | List of successfully uploaded files or error info |
Work with Cursor
The following example demonstrates how to connect to AgentSphere MCP server in your Cursor desktop and then generate a live chart for your desired data.
Let's say, you have a file named product.csv
in your disk and it contains the following data:
ID | Name | Category | Price | Stock |
---|---|---|---|---|
1 | Wireless Mouse | Electronics | 29.99 | 150 |
2 | Bluetooth Keyboard | Electronics | 49.99 | 80 |
3 | USB-C Cable | Electronics | 12.99 | 200 |
4 | LED Desk Lamp | Home | 24.99 | 60 |
5 | Stainless Steel Water Bottle | Kitchen | 19.99 | 100 |
6 | Ceramic Mug | Kitchen | 9.99 | 120 |
7 | Noise-Cancelling Headphones | Electronics | 89.99 | 50 |
8 | Portable Charger | Electronics | 34.99 | 90 |
9 | Yoga Mat | Sports | 29.99 | 70 |
10 | Running Shoes | Sports | 59.99 | 40 |
11 | Backpack | Accessories | 39.99 | 85 |
12 | Sunglasses | Accessories | 14.99 | 110 |
13 | Wireless Earbuds | Electronics | 69.99 | 65 |
14 | Non-Stick Frying Pan | Kitchen | 29.99 | 55 |
15 | Desk Organizer | Office | 15.99 | 130 |
16 | Notebook Set | Office | 8.99 | 200 |
17 | Smart Watch | Electronics | 129.99 | 30 |
18 | Coffee Maker | Kitchen | 79.99 | 45 |
19 | Travel Pillow | Accessories | 19.99 | 75 |
20 | Fitness Tracker | Electronics | 49.99 | 95 |
-
In your Cursor client, select Cursor Settings > Tools & Integrations > New MCP Server.
-
Copy and paste the following JSON, and replace
your_api_key_here
with the API key you get from AgentSphere.JSON{ "mcpServers": { "agentsphere": { "command": "uvx", "args": ["agentsphere-mcp-server"], "env": { "AGENTSPHERE_API_KEY": "your_api_key_here", } } } }
-
Launch a new chat in your Cursor client, add the
product.csv
file as context, and call AgentSphere MCP server in the chat to visualize the data inside the table using streamlit in a sandbox.You will get an open URL like
https://<portNumber-UID>.agentsphere.run
and the following is an example of the output.
Tip: You can try out AgentSphere MCP server in Raycast, Efflux, Gemini CLI and more MCP clients.