🎉 Join our Discord server for chat support & discuss with other community members.

RapidMCP

Working Example (OpenAI)

Get up and running with Rapid MCP and build your first MCP tool with a weather API

This guide will walk you through setting up a working example of RapidMCP with OpenAI's platform. You'll learn how to connect an MCP server to an AI Agent to get real-time weather information.

Prerequisites

  • An OpenAI account with access to AI Agents
  • A RapidMCP account
  • Basic familiarity with OpenAI's platform

First, go to the OpenAI platform to create a new AI Agent:

  1. Open your browser and navigate to https://platform.openai.com/chat/edit
  2. Sign in to your OpenAI account if you haven't already
  3. You'll see the AI Agent creation interface where you can start building your custom assistant
OpenAI GPT Editor Interface

Copy Your RapidMCP Server URL

Now you need to get your MCP server URL from RapidMCP:

  1. Log into your RapidMCP dashboard
  2. Navigate to your project or create a new one
  3. Find the server URL in your project settings
  4. Copy the complete URL (it should look something like https://rapidmcp.com/mcp/<serverId>/stream)

Option 1: Use our predefined demo weather server

  • We've created a ready-to-use weather MCP server for this example
  • Simply use the demo server URL provided in your RapidMCP dashboard

Option 2: Build your own weather server

  • Create a new MCP server in RapidMCP
  • Configure it with weather API endpoints
  • Use your custom server URL
Copy RapidMCP Server URL

Add MCP Server Details to OpenAI

Back in the OpenAI AI Agent editor, you'll configure the MCP server:

  1. In the AI Agent editor, look for the "Actions" or "Tools" section
  2. Click on "Add Custom MCP Server" or "Create MCP Server"
  3. Paste the RapidMCP server URL you copied in the previous step
  4. Configure any additional settings as needed (set Authentication to "None" for now)
  5. Save the configuration
Add MCP Server Details to OpenAI

Test Your Integration

Now it's time to test your MCP integration:

  1. Start a new conversation with your AI Agent
  2. Ask it to get weather information for a specific location
Hey bot, what's the weather in Tokyo?
  1. The AI Agent will approximate the latitude and longitude to call the tool to get precise weather for that location.
  2. Try different locations and weather queries to verify everything is working.

A key insight is when the model generated the latitude and longitude values for "Tokyo" to call the MCP tool. The model can generate values for your tool call arguments which you can define in RapidMCP.

Test MCP Integration with OpenAI

Monitor and Debug

Keep an eye on your MCP server logs to ensure everything is working correctly:

  1. Go back to your RapidMCP dashboard
  2. Navigate to the logs or monitoring section
  3. You should see API calls being made when you interact with your AI Agent
  4. Check for any errors or issues that might need attention
Monitor MCP Server Logs

What You've Accomplished

Congratulations! You've successfully:

  • Created an AI Agent in OpenAI
  • Connected it to your RapidMCP weather API (using either the demo server or your own)
  • Tested the integration with real weather queries
  • Set up monitoring to track API usage

Next Steps

Now that you have a working example, you can:

  • Customize the weather API responses
  • Add more MCP tools to your server
  • Create additional AI Agents with different capabilities
  • Share your MCP Server with others or publish it to the MCP Server store

Troubleshooting

If you encounter any issues:

  1. Connection Problems: Double-check that your RapidMCP server URL is correct and accessible
  2. No Responses: Check the RapidMCP logs to see if requests are being received
  3. Rate Limiting: Monitor your API usage to stay within limits

For more detailed troubleshooting, refer to the RapidMCP documentation or contact support.