What is MCP?
MCP (Model Context Protocol) is an open protocol that enables AI agents to securely connect to external data sources and tools. Think of it as a plugin system for AI agents.MCP servers expose tools, resources, and prompts that agents can use during execution.
Benefits
Extend Agent Capabilities
Give agents access to databases, APIs, file systems, and more without modifying agent code.
Secure Access
MCP handles authentication and authorization, keeping credentials secure.
Standardized Interface
One protocol works with all compatible agents and tools.
Composable
Combine multiple MCP servers to build powerful workflows.
How Superset Uses MCP
Superset integrates MCP in two ways:- Built-in MCP Server: Superset exposes its own MCP server that allows agents to create workspaces, switch between them, manage tasks, and more.
- MCP Client: Superset agents can connect to external MCP servers like Neon, Linear, Sentry, and custom servers.
Configuring MCP Servers
MCP servers are configured in.mcp.json at the root of your repository:
.mcp.json
Server Types
- HTTP (Remote)
- Stdio (Local)
Remote MCP servers accessed via HTTP/HTTPS:
Remote servers handle authentication on their end, often via OAuth.
OpenCode Configuration
For agents using OpenCode, MCP servers are configured inopencode.json:
opencode.json
Available MCP Servers
Superset MCP Server
Superset’s built-in MCP server provides workspace and task management. URL:https://api.superset.sh/api/agent/mcp (production) or http://localhost:3001/api/agent/mcp (local)
Available Tools:
| Tool | Description |
|---|---|
create_workspace | Create a new workspace |
delete_workspace | Delete a workspace |
switch_workspace | Switch to a different workspace |
list_workspaces | List all workspaces |
get_workspace_details | Get detailed workspace info |
update_workspace | Update workspace metadata |
list_projects | List available projects |
create_task | Create a new task |
update_task | Update task status |
delete_task | Delete a task |
list_tasks | List all tasks |
get_task | Get task details |
Neon MCP Server
Manage Neon PostgreSQL databases and branches. URL:https://mcp.neon.tech/mcp
Tools: Create branches, delete branches, run queries, manage databases
Linear MCP Server
Interact with Linear issues and projects. URL:https://mcp.linear.app/mcp
Tools: Create issues, update issues, list issues, manage projects
Sentry MCP Server
Access Sentry error tracking and monitoring. URL:https://mcp.sentry.dev/mcp
Tools: List errors, get error details, resolve issues
Expo MCP Server
Manage Expo projects and builds. URL:https://mcp.expo.dev/mcp
Tools: Start builds, check build status, manage releases
The Expo MCP server is disabled by default in Superset. Set
"enabled": true to use it.Maestro MCP Server
Mobile UI testing automation. Command:maestro mcp
Type: Local (stdio)
Tools: Run tests, capture screenshots, interact with mobile apps
Desktop Automation MCP Server
Control the Superset desktop app via Chrome DevTools Protocol. Command:bun run packages/desktop-mcp/src/bin.ts
Type: Local (stdio)
Available Tools:
| Tool | Description |
|---|---|
navigate | Navigate to a URL |
click | Click an element |
type_text | Type text into an input |
send_keys | Send keyboard keys |
take_screenshot | Capture screenshot |
inspect_dom | Inspect DOM structure |
evaluate_js | Execute JavaScript |
get_window_info | Get window information |
get_console_logs | Retrieve console logs |
Building Custom MCP Servers
You can build your own MCP servers to integrate custom tools.TypeScript Example
Python Example
server.py
.mcp.json:
Local vs Remote Servers
Local (Stdio) Servers
Pros:- Full control over implementation
- No network latency
- Can access local file system and processes
- Easy to debug
- Must be installed on every machine
- No centralized updates
- Process management required
Remote (HTTP) Servers
Pros:- Centrally hosted and updated
- No client installation needed
- Can scale independently
- Easier to manage authentication
- Network latency
- Requires internet connection
- Harder to debug
Authentication
OAuth for Remote Servers
Remote MCP servers often use OAuth for authentication. In OpenCode:opencode.json
Environment Variables for Local Servers
Local servers can read credentials from environment variables:.env
Troubleshooting
Server won't start
Server won't start
If a local MCP server fails to start:
- Check that the command is correct in
.mcp.json - Verify the executable exists:
which bun - Test the command manually in terminal
- Check for error messages in agent output
- Make sure dependencies are installed
Agent can't see tools
Agent can't see tools
If agents don’t recognize MCP tools:
- Verify the server is configured in
.mcp.jsonoropencode.json - Restart the agent
- Check that
tools/listhandler is implemented - Test with a simple tool first
Authentication fails
Authentication fails
If OAuth or auth fails:
- Check that credentials are set in environment variables
- Verify OAuth configuration in
opencode.json - Try re-authenticating: delete cached tokens
- Check server logs for auth errors
Remote server timeout
Remote server timeout
If remote MCP servers time out:
- Check internet connection
- Verify the URL is correct
- Check if the server is down (try in browser)
- Look for rate limiting or API quota issues
Best Practices
Start with Remote Servers
Use hosted MCP servers (Neon, Linear, Sentry) before building your own. They’re maintained and production-ready.
Keep Servers Simple
Each MCP server should do one thing well. Don’t build monolithic servers with dozens of tools.
Use Environment Variables
Never hardcode credentials. Use environment variables and
.env files.Document Your Tools
Provide clear descriptions for tools. Agents rely on descriptions to know when to use them.
Handle Errors Gracefully
Return helpful error messages. Agents need context to understand what went wrong.
Version Your Servers
Use semantic versioning for custom MCP servers. Breaking changes should increment major version.
Example: Full MCP Server
Here’s a complete example of a GitHub MCP server:github-mcp.ts
.mcp.json
Related Topics
Running Agents
Learn how agents use MCP tools
Setup Scripts
Configure MCP servers in setup scripts
Integrations
Connect Superset with external tools
MCP Specification
Read the full MCP specification