Documentation
Everything you need to know about building MCP tools and AI agents — explained simply, with working examples.
What is Agent MCP Studio?
Imagine you have a box of magic LEGO bricks. Each brick does one special thing — one fetches weather, one searches Wikipedia, one does math. Agent MCP Studio lets you build those bricks (we call them tools), then snap them together into a smart robot team that works together to answer your questions. And the coolest part? It all happens inside your web browser — no downloading anything!
Agent MCP Studio is a free, browser-based platform for building, testing, and exporting MCP (Model Context Protocol) tools and AI agent teams. Every piece of code runs inside your browser using WebAssembly — no server, no Docker, no Python installation needed.
- Write tools in Python or DuckDB SQL — the browser runs them natively via Pyodide WASM and DuckDB-WASM.
- Generate code from English — describe what you want, the LLM writes the Python or SQL for you.
- Build agent personas — give each AI specialist a name, a role, and a curated set of tools.
- Pick a collaboration strategy — Supervisor, Debate, Mixture of Experts, and 7 more.
- Export a real MCP server — download a runnable Python file for Claude Desktop or any MCP client.
- No account required — free forever. Your data stays in your browser.
The 5-Step Workflow
Most people go from zero to a working AI agent team in under 10 minutes. Here's the path:
? button in the top-right corner and choose "Take the tour".
🐍 Generate Tab
The Generate tab is like a magic typewriter. You tell it "I want a tool that looks up weather", and it types the Python code for you automatically. You can also type the code yourself if you already know Python — like drawing your own LEGO blueprint instead of using the instructions.
Choosing a Runtime
Every tool runs in one of two isolated sandboxes:
| Runtime | Language | Best for | Internet access |
|---|---|---|---|
| Python (Pyodide) | Python 3.12 | API calls, logic, text processing, math | Yes (via http_request) |
| DuckDB SQL | SQL | Data aggregation, filtering, analytics on uploaded files | No (in-memory only) |
Natural-Language Specification
Describe your tool in plain English. Be specific about:
- Tool name — Python snake_case (e.g.
get_stock_price) - Parameters — names and types (
{"symbol": "string", "days": "int"}) - What it fetches or computes — the URL, formula, or logic
- Return value — what fields to include in the result
Create an async MCP tool named get_stock_price that accepts
{"symbol": "string", "days": "int"}.
Fetch https://api.example.com/price/{symbol}?days={days}
via http_request. Return {"symbol", "price", "change_pct"}.
The Code Editor
The right panel is a full CodeMirror editor with Python syntax highlighting. A working starter tool (unit_converter) is pre-loaded so you can click ▶ Register Tool immediately — no LLM or API key needed.
Tools must follow the MCP tool schema: a top-level async def with a typed dict parameter named params. The function docstring becomes the tool description. The decorator @mcp_tool is injected automatically at registration time.
A complete Python tool example
async def github_user(params: dict) -> dict:
"""
Fetch a GitHub user's public profile.
Returns name, bio, followers, and public repos.
"""
username = params["username"]
data = await http_request(
f"https://api.github.com/users/{username}"
)
return {
"name": data.get("name"),
"bio": data.get("bio"),
"followers": data.get("followers"),
"public_repos": data.get("public_repos"),
}
Allowed Python imports
The sandbox allows a curated set of standard-library modules. No third-party packages (pip install) — but you don't need them for most tools:
# Allowed imports
import json, re, math, statistics, datetime, time
import random, hashlib, base64, itertools, functools
import collections, typing, string, decimal, fractions
import struct, copy, textwrap, unicodedata, enum
import dataclasses, abc
# Built-in helpers (always available, no import needed)
await http_request(url, method="GET", headers={}, body=None)
await http_request(url, method="POST", body=json.dumps(payload))
Register vs Validate Only
- ▶ Register Tool — AST-parses your code, checks for syntax errors, and saves it to the Registry. The tool is ready to be called.
- Validate Only — same check, but does NOT save. Use this to proof-read before committing.
- Copy — copies the raw code to your clipboard.
📦 Registry
The Registry is your toy chest. Every tool you build goes in here. You can turn toys on or off, see how they work, and take them out whenever you want. When you're done, you can pack the whole chest into a box and give it to Claude or any other AI assistant.
Managing tools
- Enable / Disable — disabled tools are invisible to the agent team. Toggle per-tool or use "Enable all" / "Disable all".
- Preload All — initializes Pyodide and warms up every tool's sandbox. First call is faster after preloading.
- Clear Cache — forces Pyodide to reload its runtime on next invocation.
Export options
| Action | Output | Use case |
|---|---|---|
| Export MCP Server | mcp_server.py | Plug into Claude Desktop, Cursor, Continue.dev |
| Export JSON | tools.json | Backup, version control, sharing |
| Import | (JSON file) | Restore a backup or import someone else's tool set |
The exported MCP server
The downloaded mcp_server.py is a fully self-contained Python script using the mcp SDK. Run it with:
pip install mcp httpx
python mcp_server.py
Then point Claude Desktop's config at it:
{
"mcpServers": {
"my-tools": {
"command": "python",
"args": ["/path/to/mcp_server.py"]
}
}
}
🧪 Test Tab
The Test tab is like poking your LEGO robot with a stick to see if it does what you built it to do. You pick a tool, type in the instructions it needs (like "username = octocat"), press Run, and watch what comes out. If it breaks, you go back and fix the blueprints.
How to test a tool
{"username": "octocat"}Tool execution is fully sandboxed — each run gets a fresh Python environment. http_request calls are intercepted and routed through a browser-safe fetch wrapper that respects the network allowlist you set in Settings.
🤝 Agents Tab
The Agents tab is where you build your superhero team. Each superhero (persona) has a special power (system prompt telling them what they're good at) and gets some gadgets (tools). Then you decide how the team works together — does one leader give orders, or do they all vote?
Personas
A persona is an AI specialist. It has:
- Name — snake_case identifier, e.g.
financial_expert - System prompt — a paragraph describing the persona's role, tone, and specialty
- Assigned tools — drag tool chips from the palette onto the persona's node in the graph
- Color — visual identifier in the chat and graph views
Example system prompt for a financial_expert persona:
You are a financial analysis expert. You have access to tools
that can fetch stock prices, calculate portfolio metrics, and
retrieve earnings reports. Always cite the data source and
provide confidence levels with your analysis.
The node graph
Every persona appears as a draggable node on the canvas. Edges between nodes are drawn automatically based on the active strategy. The graph reshapes as you switch strategies — a Supervisor strategy puts one node at the center; a Debate strategy creates a ring topology.
Assigning tools to personas
In the left palette (Tools — Drag onto a Persona), each registered tool appears as a chip. Drag a chip onto a persona node to assign that tool. Assignments are saved instantly and survive page reloads.
♟️ Collaboration Strategies
A strategy is the game plan for your superhero team. Do they all take orders from one boss? Do they each try to solve the problem and then vote on the best answer? Or does one superhero check everyone else's work? Pick the plan that fits your mission.
💬 Agent Chat
Agent Chat is like picking up a walkie-talkie and talking to your whole team. When you turn on Agentic mode, the right specialist picks up, uses their tools, and answers you. You can watch each team member thinking out loud in real time — it's like seeing the thought bubbles in a comic strip as they appear.
Modes
- Normal chat — talks directly to the selected LLM backend with no tool use. Great for quick Q&A.
- Agentic mode — enables the full agent team. Your personas, tools, and strategy all activate. Responses stream token-by-token.
Backend selection
| Backend | Speed | Privacy | Cost |
|---|---|---|---|
| OpenAI (GPT-4o) | Fast | Data sent to OpenAI | Pay per token |
| Local LLM (Qwen 1.5 0.5B) | Slower (CPU) | 100% private | Free |
Streaming output
Each persona's turn streams into the chat as it happens — you see tokens appear word by word. A spinning indicator shows which persona is currently "thinking". When a tool call happens, the result is shown inline with the turn.
🦆 Data (SQL) Tab
The Data tab is like having a super-fast calculator that knows SQL. You can drop in a spreadsheet or CSV file, and then ask it questions in SQL — "show me the top 5 sales by region" — and it answers instantly. It all happens in your browser, so your data never leaves your computer.
The Data tab runs DuckDB-WASM — a full analytical SQL engine compiled to WebAssembly. It can query CSV, Parquet, and JSON files you upload directly into the browser's in-memory filesystem.
Creating a SQL tool
-- DuckDB tool: top_products
-- params: {"category": "string", "limit": "int"}
SELECT
product_name,
SUM(revenue) AS total_revenue,
COUNT(*) AS num_orders
FROM sales
WHERE category = $category
GROUP BY product_name
ORDER BY total_revenue DESC
LIMIT $limit;
SQL tool parameters use $param_name placeholders (DuckDB prepared statement syntax). The result set is returned as a JSON array of row objects. Files uploaded in the Data tab are mounted as virtual DuckDB tables.
📚 Knowledge (RAG) Tab
RAG stands for "Retrieval-Augmented Generation" — which is a fancy way of saying "giving your AI a library to look things up in." Instead of the AI having to remember everything, you give it your documents, and when you ask a question it finds the right pages first, then answers using those pages.
How RAG works here
Embeddings are stored in memory (not persisted). The embedding model runs via the Transformers.js library — same model weights as the server-side version, but compiled to run in-browser using ONNX Runtime Web. Default model: Xenova/all-MiniLM-L6-v2 (22M params, fast on CPU).
⌨️ MCP Console
The MCP Console is like a remote control where you can press any button directly. Instead of asking the AI to use a tool, you press the tool's button yourself and see exactly what it returns. It's great for checking if your tools work before trusting an AI agent with them.
The console gives you a direct JSON-RPC-style interface to invoke any registered tool. Pick a tool, enter params, hit Invoke, and see the raw response. This is the fastest way to debug a tool's output format before assigning it to a persona.
// Example invocation
{
"tool": "github_user",
"params": { "username": "torvalds" }
}
// Response
{
"name": "Linus Torvalds",
"bio": "Linux kernel developer",
"followers": 218000,
"public_repos": 7
}
⚙️ Settings
Settings is where you choose which AI brain to borrow. You can borrow OpenAI's brain (you need a special key they give you), or you can use a tiny brain that lives inside your browser for free. You also set a list of websites your tools are allowed to visit — like a parent setting up website blockers, but the other way around.
LLM backend
| Option | How to enable | Notes |
|---|---|---|
| OpenAI GPT-4o | Paste your OpenAI API key | Best quality; costs money per token |
| Local LLM (Qwen 0.5B) | Click "Load local model" (~500 MB download, first time only) | Free; runs on CPU; slower; fully private |
Network allowlist
Tools can only call external URLs that match patterns in the allowlist. This prevents a badly-written (or malicious) tool from calling arbitrary endpoints. Each example specification automatically adds the relevant host:
api.github.com # GitHub REST API
api.openweathermap.org # Weather data
hacker-news.firebaseio.com # HN stories
api.coingecko.com # Crypto prices
*.wikipedia.org # Wikipedia (wildcard supported)
Credentials (secrets)
API keys used by your tools (e.g. an Alpha Vantage key for a stock price tool) go in the Credentials section. They are stored in localStorage and injected into the Pyodide sandbox at runtime — they never appear in your tool's source code.
🚀 Export & Deploy
Exporting is like taking all your LEGO creations and putting them in a box your friend can open. When you export a Python MCP server, you give Claude Desktop (or any other AI app) the exact same tools you built and tested here — so they can use them too.
Export MCP Server
Clicking Export MCP Server downloads a mcp_server.py that includes:
- All enabled tools, translated from browser-WASM Python to standard CPython
- The persona definitions and system prompts
- The selected collaboration strategy as Python code
- The network allowlist enforced via
httpx
Using with Claude Desktop
# 1. Install dependencies
pip install "mcp[cli]" httpx
# 2. Run the server
python mcp_server.py
# 3. Configure Claude Desktop (~/.config/claude/claude_desktop_config.json)
# Add the snippet shown in the export dialog.
Import & share tool packs
Use Export JSON to get a portable tools.json containing all your tool definitions. Share it with teammates — they can Import it into their own Studio instance to start from the same toolset.
❓ Frequently Asked Questions
No. Agent MCP Studio runs 100% in your web browser. Python is executed via Pyodide (Python compiled to WebAssembly), and SQL via DuckDB-WASM. The only exception is the exported mcp_server.py — that file requires Python 3.10+ and the mcp package on the machine where you run it.
Yes. All tool code and data files are stored in your browser's localStorage and in-memory — never uploaded to any server. The only outbound calls are: (a) the LLM API if you choose OpenAI, and (b) http_request calls from within your tools (only to allowlisted domains).
Two options today: OpenAI (GPT-4o via your API key) or the built-in local LLM (Qwen 1.5 0.5B, runs entirely in-browser). Support for Anthropic Claude, Google Gemini, and Ollama endpoints is on the roadmap.
Pyodide (the Python WASM runtime) needs to initialise on first use — it downloads ~8 MB of runtime files and caches them in the browser. Subsequent calls in the same session are fast. Click Preload All in the Registry to warm everything up before you start chatting.
MCP is an open standard (introduced by Anthropic) for connecting AI language models to external tools and data sources. Think of it as a USB-C standard for AI: any MCP-compatible AI client (Claude Desktop, Cursor, Continue.dev) can plug into any MCP-compatible tool server.
An MCP server exposes a list of tools — functions with typed parameters and descriptions. The AI reads the tool list, decides which tool to call, sends a JSON call, and gets a JSON result back. No custom integration code needed.
Yes — use the built-in http_request(url, method, headers, body) async helper. The domain must be in your allowlist (Settings → Network Allowlist). The helper returns parsed JSON automatically when the response Content-Type is application/json; otherwise it returns the raw text.
Not at this time. Pyodide supports a subset of packages that have been compiled to WASM (numpy, pandas, scipy, etc.), but the security sandbox restricts arbitrary package loading. The standard library (including json, math, datetime, re, and 16 more modules) covers most tool use-cases. If you need numpy-style math, DuckDB SQL is often a faster alternative.
The most common cause is the http_request helper: in the browser it uses the Fetch API (which follows CORS rules); in the exported server it uses httpx (no CORS). If an API works in the exported server but not the browser, add the appropriate Origin or authentication headers. If it works in the browser but not the exported server, check firewall or SSL certificate issues.