Skip to main content
Glama

mcp-google-sheets

community-piece-module.ts1.2 kB
import { PieceMetadataModel } from '@activepieces/pieces-framework' import { AddPieceRequestBody, PrincipalType } from '@activepieces/shared' import { FastifyPluginAsyncTypebox } from '@fastify/type-provider-typebox' import { StatusCodes } from 'http-status-codes' import { pieceService } from './piece-service' export const communityPiecesModule: FastifyPluginAsyncTypebox = async (app) => { await app.register(communityPiecesController, { prefix: '/v1/pieces' }) } const communityPiecesController: FastifyPluginAsyncTypebox = async (app) => { app.post( '/', { config: { allowedPrincipals: [PrincipalType.USER], }, schema: { body: AddPieceRequestBody, }, }, async (req, res): Promise<PieceMetadataModel> => { const platformId = req.principal.platform.id const projectId = req.principal.projectId const pieceMetadata = await pieceService(req.log).installPiece( platformId, projectId, req.body, ) return res.code(StatusCodes.CREATED).send(pieceMetadata) }, ) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server