The Model Context Protocol (MCP) is a standardized protocol that enables AI models to interact with external tools, resources, and data sources. guMCP implements MCP servers that expose tools and resources to AI assistants through this protocol.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dvlpjrs/guMCP/llms.txt
Use this file to discover all available pages before exploring further.
Protocol Overview
MCP defines a client-server architecture where:- MCP Clients: AI assistants or applications that want to use external tools
- MCP Servers: Services that expose tools, resources, and prompts to clients
- Transports: Communication layers that connect clients and servers (stdio, SSE, HTTP)
Core Concepts
Tools
Tools are functions that AI models can invoke to perform actions. Each tool has:- A unique name
- A description of what it does
- An input schema defining required and optional parameters
- An implementation that executes the tool logic
Resources
Resources represent data that can be accessed by the AI model. They provide context without requiring tool execution:- Documents
- Database records
- API responses
- File contents
Prompts
Prompts are pre-defined templates that help structure interactions with the AI model. They can include:- System instructions
- User message templates
- Context from resources
- Tool usage examples
Server Initialization
Every MCP server needs to provide initialization options that describe its capabilities:- What protocol version is supported
- What capabilities the server provides
- Server metadata and configuration
Message Flow
- Initialization: Client connects and exchanges capability information
- Discovery: Client requests available tools, resources, and prompts
- Invocation: Client calls tools with parameters
- Response: Server executes tool and returns results
- Resource Access: Client fetches resource contents as needed
MCP uses JSON-RPC 2.0 for message formatting, enabling structured request/response communication over various transports.
Server Implementation in guMCP
guMCP servers follow a consistent pattern:1. Create the Server Instance
2. Define Tool Handlers
3. Define Resource Handlers
4. Run the Server
Servers are launched using transport-specific runners:Session Management
In guMCP, each user session can have its own server instance, maintaining separate state and credentials across connections.
- User credentials are isolated
- State persists across reconnections
- Each user has independent tool execution context
Error Handling
MCP servers should return structured errors when operations fail:Next Steps
- Learn about Transports for connecting clients and servers
- Understand Authentication for secure access to services
- Explore server implementations in the
src/servers/directory