MCP Servers
Expose your application's tools, resources, and prompts to AI clients through a complete MCP server implementation.
The BoxLang AI Module provides a complete MCP (Model Context Protocol) server implementation that allows you to expose tools, resources, and prompts to AI clients.
What is an MCP Server?
An MCP Server is a service that exposes capabilities to AI clients using the standardized Model Context Protocol. It enables:
π§ Expose Tools: Register functions that AI clients can invoke
π Serve Resources: Provide documents and data to AI clients
π¬ Offer Prompts: Define reusable prompt templates
π HTTP & STDIO Transports: Expose your MCP server via web or command-line
ποΈ MCP Architecture
Documentation
π Getting Started
Build your first server in 5 minutes
π Transports
HTTP vs STDIO β choose what fits your deployment
π§ Server Configuration
Authentication, CORS, IP allow lists, body limits, API keys
Manual registration with inline MCPServer calls
Auto-register with @mcpTool, @mcpResource, @mcpPrompt
ποΈ Class-Based Servers
Extend MCPServer for better organization
Set up custom HTTP endpoints
Statistics, events, and real-time monitoring
βΈοΈ Pause & Resume
Temporarily halt servers for maintenance
β Best Practices
Security, design patterns, production setup
π‘ Examples & Use Cases
Complete working code examples
Quick Start
Access at: POST http://localhost/~bxai/mcp.bxm?server=myApp
External Resources
Last updated