MCP Protocol

MCP (Model Context Protocol) is a protocol for AI models to interact with external tools and data sources. These libraries connect to MCP servers and author MCP tools that can be used by AI agents: a client for calling server-exposed tools, and helpers for creating tools.

Available Libraries

Library Description
scriptling.mcp MCP client for connecting to MCP servers
scriptling.mcp.tool Helper library for authoring MCP tools
Writing MCP Tools Guide Guide for creating MCP tools

Quick Start

import scriptling.mcp as mcp

# Connect to an MCP server
client = mcp.Client("http://localhost:8080/mcp")

# List available tools
tools = client.tools()

# Call a tool
result = client.call_tool("search", {"query": "hello"})

See Also