ONE-MCP
# MCP ONE
MCP server for the **ONE Framework ERP** — gives Claude autonomous access to explore your data model, run queries, and understand business logic.
## Setup
### 1. Install dependencies
```bash
npm install
```
### 2. Configure
Copy `.env.example` to `.env` and fill in your instance details:
```bash
cp .env.example .env
```
```
ONE_URL=https://your-instance.oneerp.ro
ONE_API_KEY=your-api-key-here
```
### 3. Register with Claude Code (project-level)
The project already has a `.mcp.json` file. Update it with your credentials, then restart Claude Code.
Or manually add a project-level MCP server:
```json
// .mcp.json (project root)
{
"mcpServers": {
"one": {
"command": "npx",
"args": ["tsx", "src/index.ts"],
"cwd": "D:\\ONE-Projects\\MCP-ONE",
"env": {
"ONE_URL": "https://your-instance.oneerp.ro",
"ONE_API_KEY": "your-api-key"
}
}
}
}
```
## Tools
### Discovery & Reading
| Tool | Description |
|------|-------------|
| `get_instance_info` | Server version + authenticated user |
| `fetch_query` | Execute FETCH queries (filter, link, aggregate) |
| `list_entities` | Discover all entities in the system |
| `get_entity_schema` | Full schema: properties + relationships |
| `get_entity_record` | Read a single record by entity name + key |
### Write Operations
| Tool | Description |
|------|-------------|
| `create_entity_record` | Create a new record ⚠️ |
| `update_entity_record` | Update an existing record ⚠️ |
### Workflows
| Tool | Description |
|------|-------------|
| `list_workflows` | Workflow definitions + event bindings |
| `get_workflow` | Workflow source code + metadata |
| `execute_workflow` | Run a workflow method with arguments |
## Security
- **No DELETE tool** — the MCP does not expose a delete operation
- API key permissions are inherited from the associated user's roles — ensure the user has only View + Create/Update access in ONE
- All FETCH queries run under the security context of the authenticated user
- Create/Update tools require explicit user confirmation (MCP permission model)
## Development
```bash
npm run dev # Run with tsx (stdio transport)
npm run build # Compile TypeScript
npm run typecheck # Type checking only
```
TDQS
Scored across 10 tools
Each tool targets a distinct action and resource: instance info, querying, entity metadata, entity records, and workflows. Even overlapping tools like fetch_query and get_entity_record are clearly differentiated by purpose (discovery vs. direct lookup).
Most tools follow a verb_noun pattern (get_, list_, create_, update_, execute_), but 'fetch_query' deviates from the get_/list_ convention. Entity-specific tools share a consistent 'get_entity_*' prefix, and workflow tools follow 'list/get/execute_workflow'.
With 10 tools, the set is well-scoped for the server's purpose: exploring the data model, querying data, managing entities, and executing workflows. No tool feels redundant, and the count supports a complete workflow without being bloated.
The tool surface covers metadata discovery, querying, record creation/update, and workflow execution. The explicit lack of delete functionality is a notable gap, but it is acknowledged and likely intentional for safety. Read and update paths are fully covered, so agents can accomplish most tasks.