|
| 1 | +# Wayfound MCP Server |
| 2 | + |
| 3 | +[See description](https://www.wayfound.ai/pages/wayfound-mcp) |
| 4 | + |
| 5 | +## What is the Wayfound MCP Remote Server? |
| 6 | + |
| 7 | +The Wayfound MCP remote server is a specialized Model Context Protocol server that provides AI agents with access to organizational data and tools. It enables agents to: |
| 8 | + |
| 9 | +- List and interact with agents in your organization |
| 10 | +- Get details about agents including their role, goal, guidelines, etc. |
| 11 | +- Get performance analysis of agents including guideline violations, knowledge gaps, user ratings, sentiment and more. |
| 12 | +- Get agent improvement suggestions based on performance analysis and feedback. |
| 13 | + |
| 14 | +MCP (Model Context Protocol) is an open standard that allows AI applications to connect to external data sources and tools in a secure, standardized way. Think of it as a universal connector that lets your AI agents interact with real-world services and data. |
| 15 | + |
| 16 | +## Available MCP Tools |
| 17 | + |
| 18 | +The Wayfound MCP server provides the following tools for interacting with your organization's agents: |
| 19 | + |
| 20 | +### `list_agents` |
| 21 | +**Description**: Get the list of all Agents in your Wayfound organization. |
| 22 | + |
| 23 | +**Usage**: Ask questions like "What agents are in my organization?" or "List all available agents" |
| 24 | + |
| 25 | +**Returns**: A comprehensive list of all agents configured in your Wayfound organization, including their names and basic information. |
| 26 | + |
| 27 | +### `get_agent_details` |
| 28 | +**Description**: Get the details of a specific Agent in your Wayfound organization. |
| 29 | + |
| 30 | +**Usage**: Ask questions like "Tell me about the Customer Support agent" or "What are the details for agent X?" |
| 31 | + |
| 32 | +**Returns**: Detailed information about a specific agent including: |
| 33 | +- Agent role and purpose |
| 34 | +- Goals and objectives |
| 35 | +- Guidelines and constraints |
| 36 | +- Configuration settings |
| 37 | +- Other relevant metadata |
| 38 | + |
| 39 | +### `get_manager_analysis_for_agent` |
| 40 | +**Description**: Get Wayfound Manager analysis for a specific Agent. This includes top topics, potential issues, tool call data, knowledge gaps, user ratings, sentiment, and guideline issues. |
| 41 | + |
| 42 | +**Usage**: Ask questions like "What's the performance analysis for my Sales agent?" or "Show me the manager analysis for agent X" |
| 43 | + |
| 44 | +**Returns**: Comprehensive performance analysis including: |
| 45 | +- **Top Topics**: Most frequently discussed subjects |
| 46 | +- **Potential Issues**: Identified problems or concerns |
| 47 | +- **Tool Call Data**: Usage statistics and patterns |
| 48 | +- **Knowledge Gaps**: Areas where the agent lacks information |
| 49 | +- **User Ratings**: Customer satisfaction scores |
| 50 | +- **Sentiment Analysis**: Overall user sentiment trends |
| 51 | +- **Guideline Issues**: Violations or deviations from established guidelines |
| 52 | + |
| 53 | +### `get_improvement_suggestions_for_agent` |
| 54 | +**Description**: Get improvement suggestions for a specific Agent. This includes suggested system prompt updates and additional knowledge needed. |
| 55 | + |
| 56 | +**Usage**: Ask questions like "How can I improve my Customer Service agent?" or "What suggestions do you have for agent X?" |
| 57 | + |
| 58 | +**Returns**: Actionable improvement recommendations including: |
| 59 | +- **System Prompt Updates**: Suggested modifications to the agent's instructions |
| 60 | +- **Additional Knowledge**: Recommended knowledge base additions |
| 61 | +- **Training Suggestions**: Areas for further development |
| 62 | +- **Best Practice Recommendations**: Industry-standard improvements |
| 63 | + |
| 64 | +## Example Queries |
| 65 | + |
| 66 | +Here are some example questions you can ask your agent: |
| 67 | + |
| 68 | +```python |
| 69 | +# Basic agent information |
| 70 | +"What are all the agents in my organization?" |
| 71 | +"Give me details about the Customer Support agent" |
| 72 | + |
| 73 | +# Performance analysis |
| 74 | +"Show me the manager analysis for my Sales agent" |
| 75 | +"What are the top topics and issues for the Marketing agent?" |
| 76 | + |
| 77 | +# Improvement recommendations |
| 78 | +"How can I improve my Customer Service agent's performance?" |
| 79 | +"What knowledge gaps exist for the Technical Support agent?" |
| 80 | + |
| 81 | +# Combined queries |
| 82 | +"List all agents and show me which ones have the most issues" |
| 83 | +"Compare the performance of my Sales and Marketing agents" |
| 84 | +``` |
| 85 | + |
| 86 | + |
| 87 | +## Project Structure |
| 88 | + |
| 89 | +``` |
| 90 | +wayfound-mcp-example/ |
| 91 | +├── main.py # Main example script |
| 92 | +├── .env # Environment variables (create this file based on .env.example) |
| 93 | +├── README.md # This file |
| 94 | +└── requirements.txt # Python dependencies |
| 95 | +``` |
| 96 | + |
| 97 | +## Setup Instructions |
| 98 | + |
| 99 | +### 1. Clone and Navigate |
| 100 | + |
| 101 | +```bash |
| 102 | +git clone https://github.com/Wayfound-AI/wayfound-mcp-example |
| 103 | +cd wayfound-mcp-example |
| 104 | +``` |
| 105 | + |
| 106 | +### 2. Install Dependencies |
| 107 | + |
| 108 | +Make sure you have Python 3.10+ installed, then install the required packages: |
| 109 | + |
| 110 | +```bash |
| 111 | +pip install -r requirements.txt |
| 112 | +``` |
| 113 | + |
| 114 | +### 3. Configure Environment Variables |
| 115 | + |
| 116 | +Create a `.env` file in the project root with the following configuration: |
| 117 | + |
| 118 | +```env |
| 119 | +# Wayfound MCP Server Configuration |
| 120 | +WAYFOUND_MCP_API_KEY=your_mcp_api_key_here |
| 121 | +
|
| 122 | +# OpenAI Configuration (required for the Agents SDK) |
| 123 | +OPENAI_API_KEY=your_openai_api_key_here |
| 124 | +``` |
| 125 | + |
| 126 | +**Important**: |
| 127 | +- Replace `your_api_key_here` with your actual Wayfound MCP API key |
| 128 | +- Replace `your_openai_api_key_here` with your OpenAI API key |
| 129 | +- Keep the `.env` file secure and never commit it to version control |
| 130 | + |
| 131 | +## Running the Example |
| 132 | + |
| 133 | +Run the main example script: |
| 134 | + |
| 135 | +```bash |
| 136 | +python main.py |
| 137 | +``` |
| 138 | + |
| 139 | +The script will: |
| 140 | + |
| 141 | +1. Connect to the Wayfound MCP remote server using SSE (Server-Sent Events) |
| 142 | +2. Create an AI agent with access to MCP tools |
| 143 | +3. Execute example queries to demonstrate the available functionality |
| 144 | +4. Display the results and provide a trace URL for debugging |
| 145 | + |
| 146 | +### Example Output |
| 147 | + |
| 148 | +``` |
| 149 | +View trace: https://platform.openai.com/traces/trace?trace_id=<trace_id> |
| 150 | +
|
| 151 | +Running: What are all the agents in my organization? |
| 152 | +[Agent response with list of organizational agents] |
| 153 | +``` |
| 154 | + |
| 155 | +## Customizing the Example |
| 156 | + |
| 157 | +You can modify `main.py` to: |
| 158 | + |
| 159 | +- Change the agent instructions |
| 160 | +- Add new queries or tool calls |
| 161 | +- Adjust model settings |
| 162 | +- Add error handling and logging |
| 163 | + |
| 164 | +## Troubleshooting |
| 165 | + |
| 166 | +### Debug Mode |
| 167 | + |
| 168 | +Enable debug logging to see more detailed information: |
| 169 | + |
| 170 | +```python |
| 171 | +import logging |
| 172 | +logging.basicConfig(level=logging.DEBUG) |
| 173 | +``` |
| 174 | + |
| 175 | +## Learn More |
| 176 | + |
| 177 | +- [OpenAI Agents SDK Documentation](https://openai.github.io/openai-agents-python/) |
| 178 | +- [Model Context Protocol Specification](https://modelcontextprotocol.io/) |
0 commit comments