debreu-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # Debreu.ai MCP Server
2
+
3
+ Connect your AI assistant to Debreu.ai to manage companies and contacts directly from Claude, Cursor, or any MCP-compatible client.
4
+
5
+ ## Quick Start
6
+
7
+ ### 1. Get an API Key
8
+
9
+ Log into Debreu.ai and create an API key:
10
+
11
+ ```bash
12
+ curl -X POST https://api.debreu.ai/api/v1/api-keys \
13
+ -H "Authorization: Bearer <YOUR_FIREBASE_TOKEN>" \
14
+ -H "Content-Type: application/json" \
15
+ -d '{"name": "My MCP key"}'
16
+ ```
17
+
18
+ The response includes a `raw_key` field (e.g., `dbr_a1b2c3d4...`). **Save it immediately** — it cannot be retrieved again.
19
+
20
+ ### 2. Configure Your Client
21
+
22
+ No install needed — `npx` downloads and runs it automatically.
23
+
24
+ #### Claude Desktop
25
+
26
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "debreu": {
32
+ "command": "npx",
33
+ "args": ["-y", "debreu-mcp"],
34
+ "env": {
35
+ "DEBREU_API_KEY": "dbr_your_key_here"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ #### Claude Code
43
+
44
+ Add to your project's `.mcp.json`:
45
+
46
+ ```json
47
+ {
48
+ "mcpServers": {
49
+ "debreu": {
50
+ "command": "npx",
51
+ "args": ["-y", "debreu-mcp"],
52
+ "env": {
53
+ "DEBREU_API_KEY": "dbr_your_key_here"
54
+ }
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ #### Cursor
61
+
62
+ Go to **Settings > MCP Servers > Add**, then:
63
+ - **Name**: Debreu.ai
64
+ - **Command**: `npx -y debreu-mcp`
65
+ - **Environment**: `DEBREU_API_KEY=dbr_your_key_here`
66
+
67
+ ## Available Tools
68
+
69
+ ### Companies
70
+
71
+ | Tool | Description |
72
+ |------|-------------|
73
+ | `list_companies` | List companies with optional search and pagination (`skip`, `limit`, `search`) |
74
+ | `get_company` | Get a single company by UUID |
75
+ | `create_company` | Create a company (requires `name`, `website`; optional: `description`, `city`, `state`, `country`, `ticker`, `tags`) |
76
+ | `update_company` | Update company fields by UUID (only provided fields are changed) |
77
+
78
+ ### People
79
+
80
+ | Tool | Description |
81
+ |------|-------------|
82
+ | `list_people` | List people with optional search and pagination (`skip`, `limit`, `search`) |
83
+ | `get_person` | Get a single person by UUID |
84
+ | `create_person` | Create a person (requires `name`, `company_id`; optional: `email`, `phone`, `role`) |
85
+ | `update_person` | Update person fields by UUID (only provided fields are changed) |
86
+
87
+ ## Configuration
88
+
89
+ | Environment Variable | Required | Default | Description |
90
+ |---------------------|----------|---------|-------------|
91
+ | `DEBREU_API_KEY` | Yes | — | Your Debreu.ai API key |
92
+ | `DEBREU_API_URL` | No | `https://api.debreu.ai` | API base URL (override for self-hosted or dev) |
93
+
94
+ ## REST API
95
+
96
+ The same endpoints are available as a standard REST API if you prefer direct HTTP calls over MCP:
97
+
98
+ ```bash
99
+ # List companies
100
+ curl https://api.debreu.ai/api/v1/ext/companies \
101
+ -H "Authorization: Bearer dbr_your_key_here"
102
+
103
+ # Create a company
104
+ curl -X POST https://api.debreu.ai/api/v1/ext/companies \
105
+ -H "Authorization: Bearer dbr_your_key_here" \
106
+ -H "Content-Type: application/json" \
107
+ -d '{"name": "Acme Corp", "website": "acme.com"}'
108
+
109
+ # Search people
110
+ curl "https://api.debreu.ai/api/v1/ext/people?search=Alice" \
111
+ -H "Authorization: Bearer dbr_your_key_here"
112
+ ```
113
+
114
+ ### Endpoints
115
+
116
+ | Method | Path | Description |
117
+ |--------|------|-------------|
118
+ | `GET` | `/api/v1/ext/companies` | List companies (`?skip=0&limit=50&search=`) |
119
+ | `GET` | `/api/v1/ext/companies/{uuid}` | Get company |
120
+ | `POST` | `/api/v1/ext/companies` | Create company |
121
+ | `PUT` | `/api/v1/ext/companies/{uuid}` | Update company |
122
+ | `GET` | `/api/v1/ext/people` | List people (`?skip=0&limit=50&search=`) |
123
+ | `GET` | `/api/v1/ext/people/{uuid}` | Get person |
124
+ | `POST` | `/api/v1/ext/people` | Create person |
125
+ | `PUT` | `/api/v1/ext/people/{uuid}` | Update person |
126
+
127
+ ## API Key Management
128
+
129
+ ```bash
130
+ # Create a key
131
+ curl -X POST https://api.debreu.ai/api/v1/api-keys \
132
+ -H "Authorization: Bearer <FIREBASE_TOKEN>" \
133
+ -d '{"name": "My key"}'
134
+
135
+ # List your keys
136
+ curl https://api.debreu.ai/api/v1/api-keys \
137
+ -H "Authorization: Bearer <FIREBASE_TOKEN>"
138
+
139
+ # Revoke a key
140
+ curl -X DELETE https://api.debreu.ai/api/v1/api-keys/{uuid} \
141
+ -H "Authorization: Bearer <FIREBASE_TOKEN>"
142
+ ```
143
+
144
+ ## Data Scoping
145
+
146
+ All data is scoped to your user and team. You will only see companies and people that your team has access to in Debreu.ai. Creating records through the API links them to your account automatically.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,285 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ const API_URL = (process.env.DEBREU_API_URL || "https://api.debreu.ai").replace(/\/$/, "");
6
+ const API_KEY = process.env.DEBREU_API_KEY || "";
7
+ if (!API_KEY) {
8
+ console.error("Error: DEBREU_API_KEY environment variable is required");
9
+ process.exit(1);
10
+ }
11
+ // ---------------------------------------------------------------------------
12
+ // HTTP helpers
13
+ // ---------------------------------------------------------------------------
14
+ function authHeaders() {
15
+ return {
16
+ Authorization: `Bearer ${API_KEY}`,
17
+ "Content-Type": "application/json",
18
+ };
19
+ }
20
+ async function apiGet(path, params) {
21
+ const url = new URL(`${API_URL}${path}`);
22
+ if (params) {
23
+ for (const [k, v] of Object.entries(params)) {
24
+ if (v !== undefined && v !== null)
25
+ url.searchParams.set(k, v);
26
+ }
27
+ }
28
+ const resp = await fetch(url.toString(), { headers: authHeaders() });
29
+ if (!resp.ok) {
30
+ const body = await resp.text();
31
+ throw new Error(`HTTP ${resp.status}: ${body}`);
32
+ }
33
+ return resp.json();
34
+ }
35
+ async function apiPost(path, body) {
36
+ const resp = await fetch(`${API_URL}${path}`, {
37
+ method: "POST",
38
+ headers: authHeaders(),
39
+ body: JSON.stringify(body),
40
+ });
41
+ if (!resp.ok) {
42
+ const text = await resp.text();
43
+ throw new Error(`HTTP ${resp.status}: ${text}`);
44
+ }
45
+ return resp.json();
46
+ }
47
+ async function apiPut(path, body) {
48
+ const resp = await fetch(`${API_URL}${path}`, {
49
+ method: "PUT",
50
+ headers: authHeaders(),
51
+ body: JSON.stringify(body),
52
+ });
53
+ if (!resp.ok) {
54
+ const text = await resp.text();
55
+ throw new Error(`HTTP ${resp.status}: ${text}`);
56
+ }
57
+ return resp.json();
58
+ }
59
+ function textResult(data) {
60
+ return {
61
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
62
+ };
63
+ }
64
+ function errorResult(error) {
65
+ return {
66
+ content: [
67
+ {
68
+ type: "text",
69
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`,
70
+ },
71
+ ],
72
+ isError: true,
73
+ };
74
+ }
75
+ /** Pick non-undefined values as strings — use for query parameters. */
76
+ function pickDefined(args, keys) {
77
+ const result = {};
78
+ for (const k of keys) {
79
+ if (args[k] !== undefined && args[k] !== null)
80
+ result[k] = String(args[k]);
81
+ }
82
+ return result;
83
+ }
84
+ /** Pick non-undefined values preserving original types — use for request bodies. */
85
+ function pickDefinedBody(args, keys) {
86
+ const result = {};
87
+ for (const k of keys) {
88
+ if (args[k] !== undefined && args[k] !== null)
89
+ result[k] = args[k];
90
+ }
91
+ return result;
92
+ }
93
+ // ---------------------------------------------------------------------------
94
+ // Tool definitions
95
+ // ---------------------------------------------------------------------------
96
+ const TOOLS = [
97
+ {
98
+ name: "list_companies",
99
+ description: "List companies. Optionally search by name.",
100
+ inputSchema: {
101
+ type: "object",
102
+ properties: {
103
+ skip: { type: "number", description: "Number of records to skip", default: 0 },
104
+ limit: { type: "number", description: "Max records to return (1-200)", default: 50 },
105
+ search: { type: "string", description: "Search companies by name" },
106
+ },
107
+ },
108
+ },
109
+ {
110
+ name: "get_company",
111
+ description: "Get a company by its UUID.",
112
+ inputSchema: {
113
+ type: "object",
114
+ properties: {
115
+ uuid: { type: "string", description: "Company UUID" },
116
+ },
117
+ required: ["uuid"],
118
+ },
119
+ },
120
+ {
121
+ name: "create_company",
122
+ description: "Create a new company. Name and website are required.",
123
+ inputSchema: {
124
+ type: "object",
125
+ properties: {
126
+ name: { type: "string", description: "Company name" },
127
+ website: { type: "string", description: "Company website (e.g. acme.com)" },
128
+ description: { type: "string", description: "Company description" },
129
+ city: { type: "string", description: "City" },
130
+ state: { type: "string", description: "US state 2-letter code (e.g. NY, CA)" },
131
+ country: { type: "string", description: "ISO 3166-1 alpha-3 country code (e.g. USA, GBR)" },
132
+ ticker: { type: "string", description: "Stock ticker symbol" },
133
+ tags: { type: "string", description: "Tags as comma-separated string" },
134
+ },
135
+ required: ["name", "website"],
136
+ },
137
+ },
138
+ {
139
+ name: "update_company",
140
+ description: "Update a company by UUID. Only provided fields are changed.",
141
+ inputSchema: {
142
+ type: "object",
143
+ properties: {
144
+ uuid: { type: "string", description: "Company UUID" },
145
+ name: { type: "string", description: "Company name" },
146
+ website: { type: "string", description: "Company website" },
147
+ description: { type: "string", description: "Company description" },
148
+ city: { type: "string", description: "City" },
149
+ state: { type: "string", description: "US state 2-letter code" },
150
+ country: { type: "string", description: "ISO 3166-1 alpha-3 country code" },
151
+ ticker: { type: "string", description: "Stock ticker symbol" },
152
+ tags: { type: "string", description: "Tags as comma-separated string" },
153
+ },
154
+ required: ["uuid"],
155
+ },
156
+ },
157
+ {
158
+ name: "list_people",
159
+ description: "List people. Optionally search by name.",
160
+ inputSchema: {
161
+ type: "object",
162
+ properties: {
163
+ skip: { type: "number", description: "Number of records to skip", default: 0 },
164
+ limit: { type: "number", description: "Max records to return (1-200)", default: 50 },
165
+ search: { type: "string", description: "Search people by name" },
166
+ },
167
+ },
168
+ },
169
+ {
170
+ name: "get_person",
171
+ description: "Get a person by their UUID.",
172
+ inputSchema: {
173
+ type: "object",
174
+ properties: {
175
+ uuid: { type: "string", description: "Person UUID" },
176
+ },
177
+ required: ["uuid"],
178
+ },
179
+ },
180
+ {
181
+ name: "create_person",
182
+ description: "Create a new person. Name and company_id are required.",
183
+ inputSchema: {
184
+ type: "object",
185
+ properties: {
186
+ name: { type: "string", description: "Person name" },
187
+ company_id: { type: "string", description: "UUID of the company this person belongs to" },
188
+ email: { type: "string", description: "Email address" },
189
+ phone: { type: "string", description: "Phone number" },
190
+ role: { type: "string", description: "Job title or role" },
191
+ },
192
+ required: ["name", "company_id"],
193
+ },
194
+ },
195
+ {
196
+ name: "update_person",
197
+ description: "Update a person by UUID. Only provided fields are changed.",
198
+ inputSchema: {
199
+ type: "object",
200
+ properties: {
201
+ uuid: { type: "string", description: "Person UUID" },
202
+ name: { type: "string", description: "Person name" },
203
+ company_id: { type: "string", description: "UUID of the company" },
204
+ email: { type: "string", description: "Email address" },
205
+ phone: { type: "string", description: "Phone number" },
206
+ role: { type: "string", description: "Job title or role" },
207
+ },
208
+ required: ["uuid"],
209
+ },
210
+ },
211
+ ];
212
+ // ---------------------------------------------------------------------------
213
+ // Tool handlers
214
+ // ---------------------------------------------------------------------------
215
+ async function handleTool(name, args) {
216
+ try {
217
+ switch (name) {
218
+ case "list_companies": {
219
+ const params = pickDefined(args, ["skip", "limit", "search"]);
220
+ return textResult(await apiGet("/api/v1/ext/companies", params));
221
+ }
222
+ case "get_company":
223
+ return textResult(await apiGet(`/api/v1/ext/companies/${args.uuid}`));
224
+ case "create_company": {
225
+ const body = pickDefinedBody(args, [
226
+ "name", "website", "description", "city", "state", "country", "ticker", "tags",
227
+ ]);
228
+ return textResult(await apiPost("/api/v1/ext/companies", body));
229
+ }
230
+ case "update_company": {
231
+ const { uuid, ...rest } = args;
232
+ const body = pickDefinedBody(rest, [
233
+ "name", "website", "description", "city", "state", "country", "ticker", "tags",
234
+ ]);
235
+ return textResult(await apiPut(`/api/v1/ext/companies/${uuid}`, body));
236
+ }
237
+ case "list_people": {
238
+ const params = pickDefined(args, ["skip", "limit", "search"]);
239
+ return textResult(await apiGet("/api/v1/ext/people", params));
240
+ }
241
+ case "get_person":
242
+ return textResult(await apiGet(`/api/v1/ext/people/${args.uuid}`));
243
+ case "create_person": {
244
+ const body = pickDefinedBody(args, ["name", "company_id", "email", "phone", "role"]);
245
+ return textResult(await apiPost("/api/v1/ext/people", body));
246
+ }
247
+ case "update_person": {
248
+ const { uuid, ...rest } = args;
249
+ const body = pickDefinedBody(rest, [
250
+ "name", "company_id", "email", "phone", "role",
251
+ ]);
252
+ return textResult(await apiPut(`/api/v1/ext/people/${uuid}`, body));
253
+ }
254
+ default:
255
+ return errorResult(`Unknown tool: ${name}`);
256
+ }
257
+ }
258
+ catch (e) {
259
+ return errorResult(e);
260
+ }
261
+ }
262
+ // ---------------------------------------------------------------------------
263
+ // Server setup
264
+ // ---------------------------------------------------------------------------
265
+ const server = new Server({ name: "debreu-mcp", version: "1.0.0" }, // keep in sync with package.json version
266
+ { capabilities: { tools: {} } });
267
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
268
+ tools: TOOLS,
269
+ }));
270
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
271
+ const { name, arguments: args } = request.params;
272
+ return handleTool(name, (args ?? {}));
273
+ });
274
+ // ---------------------------------------------------------------------------
275
+ // Start
276
+ // ---------------------------------------------------------------------------
277
+ async function main() {
278
+ const transport = new StdioServerTransport();
279
+ await server.connect(transport);
280
+ }
281
+ main().catch((error) => {
282
+ console.error("Fatal error:", error);
283
+ process.exit(1);
284
+ });
285
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,uBAAuB,CAAC,CAAC,OAAO,CAC7E,KAAK,EACL,EAAE,CACH,CAAC;AACF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;AAEjD,IAAI,CAAC,OAAO,EAAE,CAAC;IACb,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;IACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,SAAS,WAAW;IAClB,OAAO;QACL,aAAa,EAAE,UAAU,OAAO,EAAE;QAClC,cAAc,EAAE,kBAAkB;KACnC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,MAAM,CACnB,IAAY,EACZ,MAA+B;IAE/B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,OAAO,GAAG,IAAI,EAAE,CAAC,CAAC;IACzC,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;gBAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,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AoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "debreu-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Debreu.ai — manage companies and contacts from any AI assistant",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "debreu-mcp": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc && chmod +x dist/index.js",
15
+ "prepare": "npm run build",
16
+ "dev": "node dist/index.js"
17
+ },
18
+ "keywords": [
19
+ "mcp",
20
+ "debreu",
21
+ "ai"
22
+ ],
23
+ "license": "MIT",
24
+ "engines": {
25
+ "node": ">=18"
26
+ },
27
+ "dependencies": {
28
+ "@modelcontextprotocol/sdk": "^1.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^20.0.0",
32
+ "typescript": "^5.0.0"
33
+ }
34
+ }