Pica MCP Server

Pica MCP Server

Integrates with the Pica API platform to enable seamless interaction with various third-party services through a standardized interface.

Category
访问服务器

README

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

🔧 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
  • execute_action - Execute API actions with full parameter support
  • generate_action_config_knowledge - Generate request configurations for code generation

📚 Resources

  • pica-platform://{platform} - Browse available actions for a platform
  • pica-connection://{platform}/{key} - View connection details
  • pica-action://{actionId} - Get detailed action information

💬 Prompts

  • create-api-integration - Generate code for API integrations
  • list-platform-actions - Get formatted lists of platform actions

🤖 Sampling

The server supports the MCP sampling capability for generating contextual responses based on conversation history.

Architecture

graph TB
    Client["MCP Client<br/>(Claude, VS Code, etc.)"]
    Server["Pica MCP Server"]
    Transport["StdioServerTransport"]
    PicaAPI["Pica API"]
    
    Client <-->|"JSON-RPC<br/>over stdio"| Transport
    Transport <--> Server
    Server -->|"HTTP/REST"| PicaAPI

Installation

npm install @picahq/pica-mcp

Deployment Options

Deploy to Vercel

You can deploy this MCP server to Vercel for remote access:

  1. Install dependencies including Vercel adapter:

    npm install @vercel/mcp-adapter zod
    
  2. Deploy to Vercel:

    vercel
    
  3. 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

See DEPLOYMENT.md for detailed Vercel deployment instructions.

Configuration

Set the following environment variables:

# Required
export PICA_SECRET="your-pica-secret-key"

# Optional
export PICA_BASE_URL="https://api.picaos.com"  # Default
export DEBUG="true"  # Enable debug logging

Usage

As a Standalone Server

# Using npx
npx @picahq/pica-mcp

# Or if installed globally
pica-mcp

With MCP Inspector

npm run inspector

In Claude Desktop

Add to your Claude configuration file:

{
  "mcpServers": {
    "pica": {
      "command": "npx",
      "args": ["@picahq/pica-mcp"],
      "env": {
        "PICA_SECRET": "your-pica-secret-key"
      }
    }
  }
}

Examples

List Available Connections

// Using the list_user_connections_and_available_connectors tool
const result = await client.callTool({
  name: "list_user_connections_and_available_connectors"
});

Get Platform Actions

// Using the get_available_actions tool
const actions = await client.callTool({
  name: "get_available_actions",
  arguments: {
    platform: "slack"
  }
});

Execute an Action

// Using the execute_action tool
const result = await client.callTool({
  name: "execute_action",
  arguments: {
    actionId: "action-id",
    connectionKey: "connection-key",
    method: "POST",
    path: "/api/messages",
    data: {
      channel: "#general",
      text: "Hello from MCP!"
    }
  }
});

Generate Integration Code

// Using the generate_action_config_knowledge tool
const config = await client.callTool({
  name: "generate_action_config_knowledge",
  arguments: {
    platform: "slack",
    action: {
      _id: "send-message",
      path: "/api/messages"
    },
    method: "POST",
    connectionKey: "slack-connection-key",
    data: {
      channel: "#general",
      text: "Hello!"
    }
  }
});

Development

Building

npm run build

Watching for Changes

npm run watch

Running with Debug Mode

DEBUG=true npm run build && node build/index.js

API Reference

Tools

list_user_connections_and_available_connectors

Lists all connections in the user's Pica account and available connectors.

Parameters: None

Returns:

  • connections: Array of active connections
  • availablePicaConnectors: Array of available connectors

get_available_actions

Get available actions for a specific platform.

Parameters:

  • platform (string, required): Platform name

Returns:

  • actions: Array of available actions with id, title, and tags

get_action_knowledge

Get detailed information about a specific action.

Parameters:

  • actionId (string, required): Action ID

Returns:

  • action: Detailed action information including knowledge base

execute_action

Execute a specific action through the Pica API.

Parameters:

  • actionId (string, required): Action ID
  • connectionKey (string, required): Connection key
  • method (string, required): HTTP method
  • path (string, required): API path
  • data (object, optional): Request body
  • pathVariables (object, optional): Path variables
  • queryParams (object, optional): Query parameters
  • headers (object, optional): Additional headers
  • isFormData (boolean, optional): Send as multipart/form-data
  • isFormUrlEncoded (boolean, optional): Send as URL-encoded

Returns:

  • result: API response data
  • requestConfig: Request configuration details

generate_action_config_knowledge

Generate request configuration for code generation.

Parameters:

  • platform (string, required): Platform name
  • action (object, required): Action object with _id and path
  • method (string, required): HTTP method
  • connectionKey (string, required): Connection key
  • data (object, optional): Request body
  • pathVariables (object, optional): Path variables
  • queryParams (object, optional): Query parameters
  • headers (object, optional): Additional headers
  • isFormData (boolean, optional): Send as multipart/form-data
  • isFormUrlEncoded (boolean, optional): Send as URL-encoded

Returns:

  • requestConfig: Complete request configuration
  • typeScriptCode: Example TypeScript code

Resources

Resources can be read using the MCP resource protocol:

  • pica-platform://{platform} - List of actions for a platform
  • pica-connection://{platform}/{key} - Connection details
  • pica-action://{actionId} - Detailed action information

Prompts

create-api-integration

Generate code for API integrations.

Arguments:

  • platform (string, required): Target platform
  • action (string, required): Action to perform
  • language (string, optional): Programming language (default: "typescript")

list-platform-actions

Get a formatted list of available actions.

Arguments:

  • platform (string, required): Target platform

Error Handling

The server implements comprehensive error handling:

  • Connection validation before action execution
  • Path variable validation and substitution
  • Graceful handling of API failures
  • Detailed error messages for debugging

Security

  • API keys are passed via environment variables
  • Connections are validated before use
  • All requests include proper authentication headers

License

GPL-3.0

Support

For support, please contact support@picaos.com or visit https://picaos.com

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选