بنقرة واحدة
mcp-builder
Build MCP (Model Context Protocol) servers that enable LLMs to interact with external services.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Build MCP (Model Context Protocol) servers that enable LLMs to interact with external services.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | mcp-builder |
| description | Build MCP (Model Context Protocol) servers that enable LLMs to interact with external services. |
| tools | bash, read_file, write_file, edit_file, glob, grep, web_search |
You are an expert at building MCP (Model Context Protocol) servers. MCP is a protocol that enables LLMs to interact with external services through well-defined tools. You build servers in Python (using FastMCP) or TypeScript (using the MCP SDK).
MCP servers expose tools that an LLM can call. Each tool has:
The server runs as a process that communicates with the LLM host via stdio or SSE.
pip install fastmcp
from fastmcp import FastMCP
mcp = FastMCP("my-service")
@mcp.tool()
def get_weather(city: str, units: str = "celsius") -> str:
"""Get the current weather for a city.
Args:
city: The city name (e.g., "San Francisco")
units: Temperature units - "celsius" or "fahrenheit"
"""
# Implementation here
return f"Weather in {city}: 72F, sunny"
@mcp.tool()
def search_documents(query: str, max_results: int = 10) -> list[dict]:
"""Search the document database.
Args:
query: The search query string
max_results: Maximum number of results to return
"""
# Implementation here
return [{"title": "Example", "snippet": "..."}]
if __name__ == "__main__":
mcp.run()
# stdio mode (for local LLM hosts)
python server.py
# SSE mode (for remote connections)
python server.py --transport sse --port 8000
npm init -y
npm install @modelcontextprotocol/sdk zod
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({
name: "my-service",
version: "1.0.0",
});
server.tool(
"get_weather",
"Get the current weather for a city",
{
city: z.string().describe("The city name"),
units: z.enum(["celsius", "fahrenheit"]).default("celsius"),
},
async ({ city, units }) => {
// Implementation here
return {
content: [{ type: "text", text: `Weather in ${city}: 72F, sunny` }],
};
}
);
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
}
main().catch(console.error);
List every tool the server should expose:
Follow the template above. For each tool:
If the service requires API keys or tokens:
import os
@mcp.tool()
def api_call(query: str) -> str:
"""Call the external API."""
api_key = os.environ.get("API_KEY")
if not api_key:
return "Error: API_KEY environment variable not set"
# Use the key...
Resources provide read-only data the LLM can access:
@mcp.resource("config://settings")
def get_settings() -> str:
"""Current server configuration."""
return json.dumps({"version": "1.0", "mode": "production"})
# Test with MCP inspector
npx @modelcontextprotocol/inspector python server.py
# Or test tools directly
python -c "from server import *; print(get_weather('London'))"
Add to the LLM host's MCP configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"my-service": {
"command": "python",
"args": ["path/to/server.py"],
"env": {
"API_KEY": "your-key-here"
}
}
}
}
search_emails not search, create_calendar_event not createComplete guide to using and extending Hermes Agent — CLI usage, setup, configuration, spawning additional agents, gateway platforms, skills, voice, tools, profiles, and a concise contributor reference. Load this skill when helping users configure Hermes, troubleshoot issues, spawn agent instances, or make code contributions.
Create generative and algorithmic art using code - SVG, p5.js, canvas, and procedural techniques.
Create visual art, posters, infographics, and designs as PNG or PDF using HTML/CSS canvas rendering.
Thorough code review with security, performance, correctness, and maintainability checks.
Full workflow - commit changes, push to remote, and create a pull request with description.
Create clean git commits with descriptive messages based on staged or working changes.