Learn more »
Speakeasy Functions ·
CLI ·
Support ·
Contributing
Public function tooling for the Speakeasy AI Control Plane.
This repository contains the TypeScript framework for authoring hosted MCP tools, the scaffolding package for new function projects, and the Go CLI used to authenticate, stage, push, and inspect deployments.
go/cli: Go CLI entrypoint. This depends on the generated Go SDK ingo/sdk, not on server packages.go/sdk: Generated Go SDK for the Speakeasy Control Plane API.ts/create-function: Project scaffolding for new function projects.ts/functions: TypeScript functions framework package.
Create agentic tools from simple TypeScript code using Speakeasy Functions, the functions framework for the Speakeasy AI Control Plane. Functions can be deployed to hosted MCP servers or run locally during development.
The fastest way to get started is with the Speakeasy function scaffolder, which creates a complete TypeScript project with a working function.
# Scaffold a new function project and follow the prompts
npm create @gram-ai/function@latest
# Move into your newly created function directory
cd my_function
# Build and deploy
npm run build
npm run pushA default function is created for you.
import { Gram } from "@gram-ai/functions";
import * as z from "zod/mini";
const functions = new Gram().tool({
name: "add",
description: "Add two numbers together",
inputSchema: { a: z.number(), b: z.number() },
async execute(ctx, input) {
return ctx.json({ sum: input.a + input.b });
},
});
export default functions;The generated project also includes a local MCP server entrypoint so you can
test tools with MCP Inspector using pnpm run dev.
Common function use cases include:
- Powering in-application chat by exposing context from internal APIs or third-party APIs through tools.
- Adding data and actions to AI workflows in platforms such as Zapier and n8n.
- Creating higher-order tools that compose lower-level API calls.
- Managing and securing MCP servers for an organization through a unified control plane.
See the TypeScript functions README for framework details.
The Speakeasy CLI provides scripted access to the Speakeasy AI Control Plane. Use it to authenticate, stage function artifacts, push deployments, and check deployment status.
Install the CLI on macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/cli/main/install-cli.sh | bashInstall the CLI on Windows:
iwr -useb https://raw.githubusercontent.com/speakeasy-api/cli/main/install-cli.ps1 | iexAuthenticate before pushing deployments:
gram authStage and push a function artifact:
gram stage function --slug my-function --location ./dist/function.zip
gram pushSee the CLI README for local development and testing.
- Slack: Join our Slack for support and discussions.
- In-app: When using the Speakeasy application, you can engage with the core maintainers of the product.
- GitHub: Contribute or report issues on this repository.
- Documentation: View the Speakeasy docs for function framework guidance.
Contributions are welcome. Please open an issue or discussion for questions or suggestions before starting significant work.
For package-specific development notes, see the README files in
ts/functions, go/cli, and
go/sdk.