Pica MCP Server
A Model Context Protocol (MCP) server that integrates with the Pica API platform, enabling seamless interaction with various third-party services through a standardized interface. Features enhanced intent detection, improved security, and robust code generation capabilities.
Setup Video: https://youtu.be/JJ62NUEkKAs
Demo Video: https://youtu.be/0jeasO20PyM
Features
🔧 Tools
- list_user_connections_and_available_connectors - List all available connectors and active connections
- get_available_actions - Get available actions for a specific platform
- get_action_knowledge - Get detailed information about a specific action including API documentation
- execute_action - Execute API actions immediately with full parameter support
- generate_action_config_knowledge - Generate secure, production-ready request configurations for code integration
📚 Resources
- pica-platform://{platform} - Browse available actions for a platform
- pica-connection://{platform}/{key} - View connection details
- pica-action://{actionId} - Get detailed action information with knowledge base
Key Capabilities
🎯 Smart Intent Detection
The server automatically detects whether you want to:
- Execute actions immediately: "read my emails", "send this message now"
- Generate integration code: "write code to send emails", "create a UI for messaging"
🔒 Enhanced Security
- Never exposes secrets in generated code
- Uses environment variables:
PICA_SECRET
,PICA_[PLATFORM]_CONNECTION_KEY
- Sanitized request configurations for production use
🌐 Multi-Language Support
Generate production-ready code in:
- TypeScript/JavaScript
- Python
- Go, PHP, and more
- Auto-detects language from context or asks user
⚡ Production-Ready Code Generation
- Real, working HTTP requests (no demo code)
- Proper error handling and type definitions
- Clean, maintainable code structure
- Environment variable best practices
Installation
Deployment Options
Deploy to Vercel
You can deploy this MCP server to Vercel for remote access:
- Install dependencies including Vercel adapter:
- Deploy to Vercel:
- Configure your MCP client to use the remote server:
- For Cursor:
https://your-project.vercel.app/api/mcp
- For Claude/Cline: Use
npx mcp-remote https://your-project.vercel.app/api/mcp
- For Cursor:
See DEPLOYMENT.md for detailed Vercel deployment instructions.
Usage
As a Standalone Server
In Claude Desktop
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
In Cursor
In the Cursor menu, select "MCP Settings" and update the MCP JSON file to include the following:
Using Docker
Build the Docker Image:
Run the Docker Container:
Installing via Smithery
To install pica for Claude Desktop automatically via Smithery:
Usage Examples
🚀 Execute Actions Immediately
Natural Language:
"Read my last 5 emails from Gmail"
What happens:
- Server detects execution intent
- Finds Gmail connection
- Executes action immediately
- Returns actual email data
🔧 Generate Integration Code
Natural Language:
"Create a React UI and write the code to send emails using Gmail"
What happens:
- Server detects code generation intent
- Gets Gmail send email action knowledge
- Generates sanitized request configuration
- AI creates production-ready React + API code
- Uses environment variables for security
Intent Detection Guide
The server automatically detects your intent based on natural language:
✅ Execute Immediately
- "Read my emails"
- "Send this message now"
- "Get my GitHub repositories"
- "Create a new Slack channel"
- "Delete this file"
✅ Generate Code
- "Write code to read emails"
- "Create a UI for messaging"
- "Build an app that syncs data"
- "Show me how to implement this"
- "Generate integration code"
❓ When Unclear
The server will ask: "Would you like me to execute this action now, or generate code for you to use?"
🔐 Required Environment Variables
API Reference
Tools
execute_action
Execute a specific action immediately and return actual results. Use ONLY when the user wants immediate action execution.
When to use: "send this email now", "get my data", "create this item"
Parameters:
actionId
(string, required): Action IDconnectionKey
(string, required): Connection keymethod
(string, required): HTTP methodpath
(string, required): API pathdata
(object, optional): Request bodypathVariables
(object, optional): Path variables for URL templatingqueryParams
(object, optional): Query parametersheaders
(object, optional): Additional headersisFormData
(boolean, optional): Send as multipart/form-dataisFormUrlEncoded
(boolean, optional): Send as URL-encoded
Returns:
result
: Actual API response datarequestConfig
: Sanitized request configuration (no secrets)
generate_action_config_knowledge
Generate secure request configuration for building real integration code. Use when the user wants to build apps, write code, or create integrations.
When to use: "write code", "build an app", "create a UI", "show me how to implement"
Parameters:
platform
(string, required): Platform nameaction
(object, required): Action object with _id and pathmethod
(string, required): HTTP methodconnectionKey
(string, required): Connection keylanguage
(string, optional): Programming languagedata
(object, optional): Request bodypathVariables
(object, optional): Path variables for URL templatingqueryParams
(object, optional): Query parametersheaders
(object, optional): Additional headersisFormData
(boolean, optional): Send as multipart/form-dataisFormUrlEncoded
(boolean, optional): Send as URL-encoded
Returns:
requestConfig
: Sanitized request configuration with environment variablesenvironmentVariables
: Required environment variables and descriptionsactionKnowledge
: API documentation and parameter detailscodeGenerationInstructions
: Guidelines for creating production codeexampleUsage
: Code structure example
Error Handling
The server implements comprehensive error handling:
- ✅ Connection validation before action execution
- ✅ Path variable validation and substitution
- ✅ Missing parameter detection with helpful error messages
- ✅ Graceful handling of API failures
- ✅ Detailed error messages for debugging
- ✅ Security validation for generated configurations
Security
- 🔐 API keys passed via environment variables only
- 🛡️ Connections validated before use
- 🔒 All requests include proper authentication headers
- 🚫 Secrets never exposed in generated code or responses
- ✅ Request configurations sanitized for production use
- ⚡ Platform-specific environment variable naming
- 🔍 Sensitive headers filtered from responses
- 🛡️ Input validation and sanitization
- 🔐 Secure authentication patterns enforced
- ❌ No hardcoded API keys or credentials
- ✅ Production-ready code generation
- 🔒 Environment variable validation on startup
License
GPL-3.0
Support
For support, please contact support@picaos.com or visit https://picaos.com
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Eine TypeScript-Implementierung des Model Context Protocol-Servers für Pica, die es Claude Desktop-Benutzern ermöglicht, über natürliche Sprachbefehle mit verbundenen Plattformen wie Gmail, Google Sheets, Slack und Datenbanken zu interagieren.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityModel Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.Last updated -361812JavaScriptMIT License
- -securityAlicense-qualityA Python-based server that implements the Model Context Protocol to interface with Claude Desktop as an MCP client, supporting interaction through efficient memory management.Last updated -1PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -475TypeScript
- AsecurityAlicenseAqualityA collection of Model Context Protocol servers that enable Claude Desktop to provide development assistance capabilities with filesystem, Git, shell command, and web search functionality without incurring API usage costs.Last updated -219TypeScriptMIT License