Skip to main content
Glama

Finizi B4B MCP Server

by finizi-app
MIT License
test_session_issue.py•772 B
#!/usr/bin/env python3 """Test to demonstrate the session ID issue.""" class MockSession: """Mock session object.""" pass def test_session_id_stability(): """Test if id() is stable across different calls.""" # Simulate first tool call session1 = MockSession() id1 = id(session1) print(f"First call - Session ID: {id1}") # Simulate second tool call - NEW session object session2 = MockSession() id2 = id(session2) print(f"Second call - Session ID: {id2}") # In MCP, each tool call gets a NEW Context object # but we need persistent session state print(f"\nAre they the same? {id1 == id2}") print(f"This is why tokens are lost between tool calls!") if __name__ == "__main__": test_session_id_stability()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/finizi-app/finizi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server