We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarijanMiletic/mcp_salesforce_revenue_cloud'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
#!/usr/bin/env python
"""
Test script for the MCP server to verify tools are properly registered and callable.
This test does NOT require a valid Salesforce connection.
"""
import asyncio
import sys
async def test_mcp_server():
"""Test that the MCP server is properly set up."""
try:
# Import the server
import server
print("=" * 60)
print("MCP Server Test Suite")
print("=" * 60)
# Test 1: Server name
print(f"\n✓ Test 1: Server Name")
print(f" Server Name: {server.mcp.name}")
assert server.mcp.name == "Salesforce Revenue Cloud", "Server name mismatch"
# Test 2: Tools registration
print(f"\n✓ Test 2: Tools Registration")
tools = await server.mcp.get_tools()
print(f" Number of tools: {len(tools)}")
print(f" Registered tools: {', '.join(tools)}")
expected_tools = ['get_products', 'get_price_books', 'get_quotes', 'get_orders', 'query_salesforce']
for tool_name in expected_tools:
assert tool_name in tools, f"Tool {tool_name} not found"
# Test 3: Tool functions exist (verify through MCP's public interface)
print(f"\n✓ Test 3: Tool Functions Exist")
for tool_name in expected_tools:
# Verify tool exists in server module
assert hasattr(server, tool_name), f"Function {tool_name} not found in server module"
# Verify tool is registered in MCP server (already confirmed in Test 2)
assert tool_name in tools, f"Tool {tool_name} not registered in MCP server"
print(f" - {tool_name}: OK")
# Test 4: Tool documentation (description)
print(f"\n✓ Test 4: Tool Documentation")
for tool_name in expected_tools:
tool = getattr(server, tool_name)
# FunctionTool has a description attribute
assert hasattr(tool, 'description'), f"Tool {tool_name} missing description"
desc = tool.description.strip().split('\n')[0] if tool.description else "No description"
print(f" - {tool_name}: {desc}")
print("\n" + "=" * 60)
print("✓ All tests passed!")
print("=" * 60)
print("\nNote: These tests verify the MCP server structure.")
print("To test Salesforce connectivity, set SALESFORCE_SESSION_ID")
print("and SALESFORCE_DOMAIN_URL in your .env file and run:")
print(" python salesforce_auth.py")
return True
except Exception as e:
print(f"\n✗ Test failed: {e}")
import traceback
traceback.print_exc()
return False
if __name__ == "__main__":
result = asyncio.run(test_mcp_server())
sys.exit(0 if result else 1)