I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

xai-mcp
A Xircuits component library for defining MCP servers.
3 years
Works with Finder
0
Github Watches
1
Github Forks
0
Github Stars
Xircuits MCP Component Library
A Xircuits component library for implementing Model Context Protocol (MCP) servers. This library provides components that make it easy to create, configure, and run MCP servers using the Xircuits visual programming interface.
What is Model Context Protocol (MCP)?
The Model Context Protocol (MCP) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
- Expose data through Resources (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
- Provide functionality through Tools (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
- Define interaction patterns through Prompts (reusable templates for LLM interactions)
- And more!
Prerequisites
- Python 3.8 or higher
- Xircuits
- MCP Python SDK
Installation
To use this component library, ensure you have Xircuits installed, then simply run:
xircuits install https://github.com/xpressai/xai-mcp
Alternatively, you may manually copy the directory / clone or submodule the repository to your working Xircuits project directory then install the packages using:
pip install -r requirements.txt
Components
This library provides components for implementing MCP servers, organized into several categories:
Server Setup Components
- MCPCreateServer: Creates a FastMCP server instance with the specified name and optional dependencies.
- MCPRunServer: Starts the MCP server and keeps it running until interrupted.
Start Node Components
These components act as entry points for defining MCP server capabilities. They can be dragged onto the canvas to implement responses to events:
- MCPDefineTool (Royal Blue): Defines a tool for the MCP server, allowing LLMs to perform actions and computations.
- MCPDefineResource (Lime Green): Defines a resource for the MCP server, allowing LLMs to access data through URI patterns.
- MCPDefinePrompt (Dark Orchid): Defines a prompt template for the MCP server, providing reusable interaction patterns for LLMs.
- MCPServerOnStart (Dark Orange): Defines code to execute when the MCP server starts.
- MCPServerOnShutdown (Firebrick): Defines code to execute when the MCP server shuts down.
Result Setting Components
These components are used within the body of start nodes to set the results of tool, resource, or prompt executions:
- MCPSetToolResult (Royal Blue): Sets the result of a tool execution.
- MCPSetResourceResult (Lime Green): Sets the result of a resource execution.
- MCPSetPromptResult (Dark Orchid): Sets the result of a prompt execution.
Utility Components
- MCPCreateImage: Creates an Image object for use with MCP tools and resources.
- MCPGetArgument: Gets an argument from the args dictionary.
- MCPReportProgress: Reports progress for a long-running operation.
- MCPReadResource: Reads a resource from the MCP server.
- MCPCreateUserMessage: Creates a user message for use in prompts.
- MCPCreateAssistantMessage: Creates an assistant message for use in prompts.
- MCPCreateMessageList: Creates a list of messages for use in prompts.
Usage Example
Here's an example of how to use this component library to create an MCP server:
- Create a new Xircuits workflow
- Add an MCPCreateServer component to create a server instance
- Add MCPDefineTool, MCPDefineResource, and MCPDefinePrompt start nodes to define the server's capabilities
- For each start node, connect components to implement the logic for the tool, resource, or prompt
- Use MCPSetToolResult, MCPSetResourceResult, or MCPSetPromptResult to set the results
- Optionally, add MCPServerOnStart and MCPServerOnShutdown start nodes to define server lifecycle behavior
- Add an MCPRunServer component to start the server
Example: Creating a Calculator Tool
- Drag an MCPDefineTool start node onto the canvas
- Set its name to "add" and description to "Add two numbers"
- Connect an MCPGetArgument component to get the "a" argument
- Connect another MCPGetArgument component to get the "b" argument
- Connect a component that adds the two numbers
- Connect an MCPSetToolResult component to set the result
Example: Server Lifecycle Management
- Drag an MCPServerOnStart start node onto the canvas
- Connect components to initialize resources, load data, or perform other startup tasks
- Drag an MCPServerOnShutdown start node onto the canvas
- Connect components to clean up resources, save data, or perform other shutdown tasks
Documentation
- Model Context Protocol documentation
- Model Context Protocol specification
- Officially supported servers
License
Apache License 2.0
相关推荐
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.
Converts Figma frames into front-end code for various mobile frameworks.
Advanced software engineer GPT that excels through nailing the basics.
Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.
Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx
A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.
Mirror ofhttps://github.com/agentience/practices_mcp_server
Mirror ofhttps://github.com/bitrefill/bitrefill-mcp-server
Reviews

user_8dtM4zZu
I have been using the xai-mcp by XpressAI and it has significantly impressed me with its performance and robustness. The utility and ease of integration into my workflow are unmatched. If you're looking for a reliable and efficient mcp application, this is definitely the one to go for. Highly recommended!