Token导航 LogoToken导航TokenDH.com
Intric MCP Template logo
开发工具未说明官方级别未说明来源级核验

Intric MCP Template

MCP Server

用于构建与Intric内置MCP客户端无缝连接的模型上下文协议(MCP)服务器的模板,扩展AI助手功能。

工具数

1

提示词数

0

GitHub Stars

1

资源数

0
AI扩展服务器模板Python资源管理API开发

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

inooLabs

提供方

inooLabs

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Intric MCP模板服务器

用于构建与Intric内置MCP客户端无缝连接的模型上下文协议(MCP)服务器的模板。此模板演示了如何创建自定义工具和资源来扩展AI助手的功能。

特性

  • 工具:AI可以调用函数来执行操作
  • 资源:AI可以访问的静态数据
  • 资源模板:基于参数的动态资源
  • 提示:用于常见交互的可重用提示模板
  • 服务器元数据:Intric中显示的自定义图标、说明和版本控制
  • 认证:基于JWT的API密钥验证
  • IP允许列表:限制服务器对特定IP地址的访问
  • 权限:控制工具/资源是否需要用户确认

运行服务器

使用uvicorn启动MCP服务器:

uvicorn server:app --host 0.0.0.0 --port 8000

服务器将在以下时间可用 http://localhost:8000/mcp.

连接到Intric

在Intric的MCP连接设置中添加您暴露的服务器URL。Intric将自动发现所有可用的工具和资源。

提示:使用ngrok等服务公开绑定到本地端口的HTTPS URL,然后添加该URL(以结尾 /mcp)到Intric。

构建自己的MCP服务器

添加工具

@mcp.tool
def your_function_name(param1: str, param2: int) -> str:
    """Description of what this tool does."""
    return f"Result: {param1} - {param2}"

添加资源

@mcp.resource("resource://your_resource_name")
def get_your_data() -> str:
    """Description of what data this resource provides."""
    return "Your data here"

添加资源模板

@mcp.resource("data://{category}/{id}")
def get_dynamic_data(category: str, id: str) -> dict:
    """Provide data based on category and id."""
    return {"category": category, "id": id, "data": "..."}

添加提示

提示是可重用的模板,有助于标准化常见交互:

@mcp.prompt()
def code_review() -> str:
    """Review code for best practices."""
    return """Please review the following code for:
- Code quality and best practices
- Potential bugs or issues
- Security concerns"""

# Prompts can accept arguments:
@mcp.prompt()
def summarize_text(style: str = "brief") -> str:
    """Summarize text in a specified style."""
    if style == "bullets":
        return "Summarize as a bulleted list of key points."
    return "Provide a brief summary."

权限

控制Intric在执行工具或访问资源之前是否要求用户确认:

# Tool that executes without user confirmation
@mcp.tool(meta={"requires_permission": False})
def auto_execute_tool() -> str:
    """This tool runs automatically without asking the user."""
    return "Done"

# Resource that requires user confirmation (resources don't require permission by default)
@mcp.resource(
    uri="resource://sensitive_data",
    meta={"requires_permission": True},
)
def get_sensitive_data() -> str:
    """User must confirm before accessing this resource."""
    return "Sensitive information"

项目结构

intric-mcp-template/
├── server.py         # Main server file with examples
├── tools.py          # Example tool implementations
├── resources.py      # Example resource implementations
├── requirements.txt  # Python dependencies

目录标签

目录标签

AI扩展服务器模板Python资源管理API开发本地部署工具集成

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP