Arif MCP
Building a Custom MCP Server
You can create your own MCP server to extend Arif AI with custom tools. For a comprehensive guide on building MCP servers, refer to the official MCP documentation:
Build an MCP Server — Model Context Protocol
Overview
An MCP server exposes two main endpoints:
- Tool Discovery — Returns a list of available tools with their schemas
- Tool Invocation — Executes a specific tool with validated parameters
Once your server is deployed, configure its endpoint in Arif AI Settings and your custom tools will be automatically discovered and available in the chat.
Quick Example
from fastapi import FastAPI
app = FastAPI()
@app.get("/mcp/tools")
async def get_tools():
return {
"tools": [{
"name": "custom_analysis",
"description": "Analyze business data",
"inputSchema": {
"type": "object",
"properties": {
"data": {"type": "string"},
"metric": {"type": "string"}
},
"required": ["data", "metric"]
}
}]
}
@app.post("/mcp/invoke/{tool_name}")
async def invoke_tool(tool_name: str, params: dict):
result = analyze_data(params["data"], params["metric"])
return {"success": True, "result": result}Next Steps
- Build your MCP server following the official guide
- Deploy it to your infrastructure
- Configure the endpoint in Arif AI Settings > MCP
- Your tools will be automatically discovered and available in the chat