@runtypelabs/mcp
v0.1.1
Published
Model Context Protocol (MCP) server for Runtype API
Maintainers
Readme
@runtypelabs/mcp
Model Context Protocol (MCP) server for Runtype API.
Official MCP client package available on npm
Installation
npm install @runtypelabs/mcp
# or
pnpm add @runtypelabs/mcpUsage
Local CLI (stdio transport)
Run the MCP server locally for use with Claude Desktop, Cursor, or other MCP clients:
RUNTYPE_API_KEY=tv_xxx npx @runtypelabs/mcpClaude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"runtype": {
"command": "npx",
"args": ["@runtypelabs/mcp"],
"env": {
"RUNTYPE_API_KEY": "tv_your_api_key_here"
}
}
}
}Cursor Configuration
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"runtype": {
"command": "npx",
"args": ["@runtypelabs/mcp"],
"env": {
"RUNTYPE_API_KEY": "tv_your_api_key_here"
}
}
}
}Hosted Endpoint (HTTP transport)
You can also use the hosted MCP endpoint at https://api.runtype.com/v1/mcp/protocol:
{
"mcpServers": {
"runtype": {
"url": "https://api.runtype.com/v1/mcp/protocol",
"headers": {
"Authorization": "Bearer tv_your_api_key_here"
}
}
}
}Programmatic Usage
import { createMcpServer, RuntypeApiClient } from "@runtypelabs/mcp"
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
// Create API client
const client = new RuntypeApiClient({
apiKey: "tv_xxx",
baseUrl: "https://api.runtype.com",
})
// Create MCP server
const server = createMcpServer({ apiClient: client })
// Connect with your transport of choice
const transport = new StdioServerTransport()
await server.connect(transport)Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| RUNTYPE_API_KEY | Your Runtype API key | (required) |
| RUNTYPE_API_URL | API base URL | https://api.runtype.com |
Available Tools
| Tool | Description |
|------|-------------|
| dispatch | Execute a flow with optional record context |
| list_flows | List available flows |
| get_flow | Get flow details |
| run_flow | Execute a flow by ID |
| list_records | List records |
| get_record | Get record details |
| create_record | Create a new record |
| update_record | Update a record |
| list_tools | List available tools |
| execute_tool | Execute a tool |
| run_prompt | Run a prompt directly |
License
MIT
