We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/daveosterjr/postcardai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { client } from '../client.js';
export function registerAccountTools(server: McpServer): void {
server.tool(
'get_account',
'Get your PostcardAI account information including organization details, subscription plan, credit balance, usage statistics, and rate limit status.',
{},
async () => {
try {
const account = await client.get('/account');
return {
content: [
{
type: 'text' as const,
text: JSON.stringify(account, null, 2),
},
],
};
} catch (error) {
return {
content: [
{
type: 'text' as const,
text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
},
],
isError: true,
};
}
}
);
}