We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/arslanmanzoorr/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
CLAUDE_CONNECTION_EXPLAINED.mdβ’3.15 KiB
# π How This Works with Claude
## Understanding the Setup
Your API **already uses Claude AI** internally! Here's how it works:
```
Your API (Vercel)
β
Uses Anthropic API
β
Calls Claude AI
β
Returns reasoning results
```
---
## β οΈ Important: You Need API Key
Your API (`/reason` endpoint) needs `ANTHROPIC_API_KEY` to work because:
1. **User sends question** β Your API receives it
2. **Your API calls Claude** β Uses Anthropic API (needs API key)
3. **Claude processes** β Uses MCP tools (search, validate, evaluate)
4. **Returns result** β Structured reasoning output
**Without the API key:** Step 2 fails β 500 error
---
## β Two Ways to Use Claude
### Option 1: Your API Uses Claude (Current Setup) β
**How it works:**
- User β Your API β Claude AI β Response
- Your API needs `ANTHROPIC_API_KEY` in Vercel
**What you need:**
- Set `ANTHROPIC_API_KEY` in Vercel environment variables
- Your API will automatically use Claude
**Best for:**
- β Production deployment
- β Client-facing demo
- β Permanent API
---
### Option 2: Claude Calls Your API (Alternative)
**How it works:**
- You β Claude Chat β Your API β Response
- Claude can make HTTP requests to your API
**What you need:**
- Your API deployed (β already done!)
- Claude can access the internet
- You give Claude the API URL
**Best for:**
- Testing your API
- Interactive exploration
- Quick demos
**Example with Claude Chat:**
```
You: "Call this API: https://mcp-iota-seven.vercel.app/reason
with question: 'Is a verbal promise enforceable?'"
Claude: [Makes POST request and returns the result]
```
---
## π― What You Need to Do
### To Make Your API Work with Claude:
1. **Get Anthropic API Key**
- Go to [console.anthropic.com](https://console.anthropic.com/)
- Create/get your API key
2. **Add to Vercel**
- Vercel Dashboard β Your Project β Settings
- Environment Variables β Add `ANTHROPIC_API_KEY`
- Redeploy
3. **Test It**
- Your API will now use Claude internally
- `/reason` endpoint will work
---
## π‘ Using Claude Chat to Test Your API
You can also ask Claude (this chat assistant) to test your API:
```
You: "Can you test this API endpoint?
POST https://mcp-iota-seven.vercel.app/reason
Body: {'question': 'Is a verbal promise enforceable?'}"
```
Claude can make the HTTP request and show you the results!
---
## π Summary
| Setup | What Happens | API Key Needed? |
|-------|--------------|-----------------|
| **Your API β Claude** | API uses Claude internally | β Yes (in Vercel) |
| **Claude β Your API** | Claude calls your API | β No (API is public) |
**Current Status:**
- β Your API is deployed
- β API key not set in Vercel
- β οΈ `/reason` endpoint needs API key to use Claude
**To Fix:**
- Add `ANTHROPIC_API_KEY` to Vercel β Redeploy β β Works!
---
## π Next Steps
1. **Get API key** from Anthropic
2. **Add to Vercel** environment variables
3. **Redeploy**
4. **Test** - Your API will use Claude successfully!
---
**Bottom line:** Your API is already designed to use Claude! You just need to add the API key to Vercel so it can authenticate with Anthropic. π